/soc/2013/ankitkv/gobjectification: 5dbe8b930aef: Merged soc.201...
Ankit Vani
a at nevitus.org
Sat Nov 16 16:40:30 EST 2013
Changeset: 5dbe8b930aef0fd7236ff2f204270fbf02b063cf
Author: Ankit Vani <a at nevitus.org>
Date: 2013-11-17 03:09 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/5dbe8b930aef
Description:
Merged soc.2013.gobjectification branch
diffstat:
finch/gntmedia.c | 2 +-
finch/libgnt/gntbox.c | 9 +-
finch/libgnt/gntlabel.c | 4 +-
finch/libgnt/gntline.c | 2 +-
finch/libgnt/gnttree.c | 5 +-
pidgin/gtkblist-theme-loader.c | 2 +-
pidgin/gtkblist-theme.c | 101 +++++++++++++++++++++++---------------
pidgin/gtkcellrendererexpander.c | 2 +-
pidgin/gtkconv-theme.c | 8 ++-
pidgin/gtkimhtml.c | 24 ++++----
pidgin/gtkmedia.c | 4 +-
pidgin/gtkmenutray.c | 2 +-
pidgin/gtkstatusbox.c | 4 +-
pidgin/minidialog.c | 19 +++---
pidgin/plugins/themeedit.c | 2 +-
15 files changed, 105 insertions(+), 85 deletions(-)
diffs (truncated from 661 to 300 lines):
diff --git a/finch/gntmedia.c b/finch/gntmedia.c
--- a/finch/gntmedia.c
+++ b/finch/gntmedia.c
@@ -140,7 +140,7 @@ finch_media_class_init (FinchMediaClass
"PurpleMedia",
"The PurpleMedia associated with this media.",
PURPLE_TYPE_MEDIA,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
finch_media_signals[MESSAGE] = g_signal_new("message", G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL,
diff --git a/finch/libgnt/gntbox.c b/finch/libgnt/gntbox.c
--- a/finch/libgnt/gntbox.c
+++ b/finch/libgnt/gntbox.c
@@ -592,7 +592,7 @@ gnt_box_class_init(GntBoxClass *klass)
g_param_spec_boolean("vertical", "Vertical",
"Whether the child widgets in the box should be stacked vertically.",
TRUE,
- G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+ G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS
)
);
g_object_class_install_property(gclass,
@@ -600,7 +600,7 @@ gnt_box_class_init(GntBoxClass *klass)
g_param_spec_boolean("homogeneous", "Homogeneous",
"Whether the child widgets in the box should have the same size.",
TRUE,
- G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+ G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS
)
);
@@ -662,11 +662,10 @@ gnt_box_get_gtype(void)
GntWidget *gnt_box_new(gboolean homo, gboolean vert)
{
- GntWidget *widget = g_object_new(GNT_TYPE_BOX, NULL);
+ GntWidget *widget = g_object_new(GNT_TYPE_BOX, "homogeneous", homo,
+ "vertical", vert, NULL);
GntBox *box = GNT_BOX(widget);
- box->homogeneous = homo;
- box->vertical = vert;
box->alignment = vert ? GNT_ALIGN_LEFT : GNT_ALIGN_MID;
return widget;
diff --git a/finch/libgnt/gntlabel.c b/finch/libgnt/gntlabel.c
--- a/finch/libgnt/gntlabel.c
+++ b/finch/libgnt/gntlabel.c
@@ -123,7 +123,7 @@ gnt_label_class_init(GntLabelClass *klas
g_param_spec_string("text", "Text",
"The text for the label.",
NULL,
- G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+ G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
)
);
@@ -135,7 +135,7 @@ gnt_label_class_init(GntLabelClass *klas
GNT_TEXT_FLAG_NORMAL|GNT_TEXT_FLAG_BOLD|GNT_TEXT_FLAG_UNDERLINE|
GNT_TEXT_FLAG_BLINK|GNT_TEXT_FLAG_DIM|GNT_TEXT_FLAG_HIGHLIGHT,
GNT_TEXT_FLAG_NORMAL,
- G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+ G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
)
);
GNTDEBUG;
diff --git a/finch/libgnt/gntline.c b/finch/libgnt/gntline.c
--- a/finch/libgnt/gntline.c
+++ b/finch/libgnt/gntline.c
@@ -120,7 +120,7 @@ gnt_line_class_init(GntLineClass *klass)
g_param_spec_boolean("vertical", "Vertical",
"Whether it's a vertical line or a horizontal one.",
TRUE,
- G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+ G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
)
);
}
diff --git a/finch/libgnt/gnttree.c b/finch/libgnt/gnttree.c
--- a/finch/libgnt/gnttree.c
+++ b/finch/libgnt/gnttree.c
@@ -1009,7 +1009,6 @@ gnt_tree_set_property(GObject *obj, guin
if (tree->priv->expander_level == g_value_get_int(value))
break;
tree->priv->expander_level = g_value_get_int(value);
- g_object_notify(obj, "expander-level");
default:
break;
}
@@ -1054,7 +1053,7 @@ gnt_tree_class_init(GntTreeClass *klass)
g_param_spec_int("columns", "Columns",
"Number of columns in the tree.",
1, G_MAXINT, 1,
- G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+ G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
)
);
g_object_class_install_property(gclass,
@@ -1062,7 +1061,7 @@ gnt_tree_class_init(GntTreeClass *klass)
g_param_spec_int("expander-level", "Expander level",
"Number of levels to show expander in the tree.",
0, G_MAXINT, 1,
- G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+ G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
)
);
diff --git a/pidgin/gtkblist-theme-loader.c b/pidgin/gtkblist-theme-loader.c
--- a/pidgin/gtkblist-theme-loader.c
+++ b/pidgin/gtkblist-theme-loader.c
@@ -218,7 +218,7 @@ pidgin_blist_loader_build(const gchar *t
"offline", offline,
"idle", idle,
"message", message,
- "message_nick_said", message_nick_said,
+ "message-nick-said", message_nick_said,
"status", status, NULL);
for (i = 0; lookups[i].tag; i++) {
diff --git a/pidgin/gtkblist-theme.c b/pidgin/gtkblist-theme.c
--- a/pidgin/gtkblist-theme.c
+++ b/pidgin/gtkblist-theme.c
@@ -346,6 +346,12 @@ pidgin_blist_theme_finalize(GObject *obj
}
static void
+pidgin_blist_theme_init(PidginBlistTheme *theme)
+{
+ PIDGIN_BLIST_THEME_GET_PRIVATE(theme)->opacity = 1.0;
+}
+
+static void
pidgin_blist_theme_class_init(PidginBlistThemeClass *klass)
{
GObjectClass *obj_class = G_OBJECT_CLASS(klass);
@@ -362,104 +368,85 @@ pidgin_blist_theme_class_init(PidginBlis
/* Buddy List */
pspec = g_param_spec_boxed("background-color", "Background Color",
"The background color for the buddy list",
- GDK_TYPE_COLOR, G_PARAM_READWRITE);
+ GDK_TYPE_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_BACKGROUND_COLOR, pspec);
+ pspec = g_param_spec_double("opacity", "Opacity",
+ "The opacity of the buddy list",
+ 0.0, 1.0, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property(obj_class, PROP_OPACITY, pspec);
+
pspec = g_param_spec_pointer("layout", "Layout",
"The layout of icons, name, and status of the buddy list",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_LAYOUT, pspec);
/* Group */
- /* Note to translators: These two strings refer to the background color
- of a buddy list group when in its expanded state */
pspec = g_param_spec_boxed("expanded-color", "Expanded Background Color",
"The background color of an expanded group",
- GDK_TYPE_COLOR, G_PARAM_READWRITE);
+ GDK_TYPE_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_EXPANDED_COLOR, pspec);
- /* Note to translators: These two strings refer to the font and color
- of a buddy list group when in its expanded state */
pspec = g_param_spec_pointer("expanded-text", "Expanded Text",
"The text information for when a group is expanded",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_EXPANDED_TEXT, pspec);
- /* Note to translators: These two strings refer to the background color
- of a buddy list group when in its collapsed state */
pspec = g_param_spec_boxed("collapsed-color", "Collapsed Background Color",
"The background color of a collapsed group",
- GDK_TYPE_COLOR, G_PARAM_READWRITE);
+ GDK_TYPE_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_COLLAPSED_COLOR, pspec);
- /* Note to translators: These two strings refer to the font and color
- of a buddy list group when in its collapsed state */
pspec = g_param_spec_pointer("collapsed-text", "Collapsed Text",
"The text information for when a group is collapsed",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_COLLAPSED_TEXT, pspec);
/* Buddy */
- /* Note to translators: These two strings refer to the background color
- of a buddy list contact or chat room */
pspec = g_param_spec_boxed("contact-color", "Contact/Chat Background Color",
"The background color of a contact or chat",
- GDK_TYPE_COLOR, G_PARAM_READWRITE);
+ GDK_TYPE_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_CONTACT_COLOR, pspec);
- /* Note to translators: These two strings refer to the font and color
- of a buddy list contact when in its expanded state */
pspec = g_param_spec_pointer("contact", "Contact Text",
"The text information for when a contact is expanded",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_CONTACT, pspec);
- /* Note to translators: These two strings refer to the font and color
- of a buddy list buddy when it is online */
pspec = g_param_spec_pointer("online", "Online Text",
"The text information for when a buddy is online",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_ONLINE, pspec);
- /* Note to translators: These two strings refer to the font and color
- of a buddy list buddy when it is away */
pspec = g_param_spec_pointer("away", "Away Text",
"The text information for when a buddy is away",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_AWAY, pspec);
- /* Note to translators: These two strings refer to the font and color
- of a buddy list buddy when it is offline */
pspec = g_param_spec_pointer("offline", "Offline Text",
"The text information for when a buddy is offline",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_OFFLINE, pspec);
- /* Note to translators: These two strings refer to the font and color
- of a buddy list buddy when it is idle */
pspec = g_param_spec_pointer("idle", "Idle Text",
"The text information for when a buddy is idle",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_IDLE, pspec);
- /* Note to translators: These two strings refer to the font and color
- of a buddy list buddy when they have sent you a new message */
pspec = g_param_spec_pointer("message", "Message Text",
"The text information for when a buddy has an unread message",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_MESSAGE, pspec);
- /* Note to translators: These two strings refer to the font and color
- of a buddy list buddy when they have sent you a new message */
- pspec = g_param_spec_pointer("message_nick_said", "Message (Nick Said) Text",
+ pspec = g_param_spec_pointer("message-nick-said", "Message (Nick Said) Text",
"The text information for when a chat has an unread message that mentions your nickname",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_MESSAGE_NICK_SAID, pspec);
pspec = g_param_spec_pointer("status", "Status Text",
"The text information for a buddy's status",
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property(obj_class, PROP_STATUS, pspec);
}
@@ -477,7 +464,7 @@ pidgin_blist_theme_get_type (void)
NULL, /* class_data */
sizeof(PidginBlistTheme),
0, /* n_preallocs */
- NULL, /* instance_init */
+ (GInstanceInitFunc)pidgin_blist_theme_init, /* instance_init */
NULL, /* value table */
};
type = g_type_register_static (PURPLE_TYPE_THEME,
@@ -698,6 +685,8 @@ pidgin_blist_theme_set_background_color(
if (priv->bgcolor)
gdk_color_free(priv->bgcolor);
priv->bgcolor = color ? gdk_color_copy(color) : NULL;
+
+ g_object_notify(G_OBJECT(theme), "background-color");
}
void
@@ -710,6 +699,8 @@ pidgin_blist_theme_set_opacity(PidginBli
priv = PIDGIN_BLIST_THEME_GET_PRIVATE(theme);
priv->opacity = opacity;
+
+ g_object_notify(G_OBJECT(theme), "opacity");
}
void
@@ -723,6 +714,8 @@ pidgin_blist_theme_set_layout(PidginBlis
g_free(priv->layout);
priv->layout = g_memdup(layout, sizeof(PidginBlistLayout));
+
+ g_object_notify(G_OBJECT(theme), "layout");
}
void
@@ -737,6 +730,8 @@ pidgin_blist_theme_set_expanded_backgrou
More information about the Commits
mailing list