[gtksourceview/wip/minimap] Make the font-desc readwrite
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/minimap] Make the font-desc readwrite
- Date: Thu, 7 May 2015 13:17:24 +0000 (UTC)
commit fe993b3c9720bbccc2eb2cd2b7c05957c1cac839
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu May 7 14:58:03 2015 +0200
Make the font-desc readwrite
gtksourceview/gtksourcemap.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/gtksourceview/gtksourcemap.c b/gtksourceview/gtksourcemap.c
index 500d9eb..5a8463f 100644
--- a/gtksourceview/gtksourcemap.c
+++ b/gtksourceview/gtksourcemap.c
@@ -569,9 +569,16 @@ gtk_source_map_get_property (GObject *object,
GParamSpec *pspec)
{
GtkSourceMap *map = GTK_SOURCE_MAP (object);
+ GtkSourceMapPrivate *priv;
+
+ priv = gtk_source_map_get_instance_private (map);
switch (prop_id)
{
+ case PROP_FONT_DESC:
+ g_value_set_boxed (value, priv->font_desc);
+ break;
+
case PROP_VIEW:
g_value_set_object (value, gtk_source_map_get_view (map));
break;
@@ -591,14 +598,14 @@ gtk_source_map_set_property (GObject *object,
switch (prop_id)
{
- case PROP_FONT_DESC:
- gtk_source_map_set_font_desc (map, g_value_get_boxed (value));
- break;
-
case PROP_VIEW:
gtk_source_map_set_view (map, g_value_get_object (value));
break;
+ case PROP_FONT_DESC:
+ gtk_source_map_set_font_desc (map, g_value_get_boxed (value));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -630,7 +637,7 @@ gtk_source_map_class_init (GtkSourceMapClass *klass)
_("Font Description"),
_("The Pango font description to use."),
PANGO_TYPE_FONT_DESCRIPTION,
- (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
+ (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_properties (object_class, LAST_PROP, pspecs);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]