sadrul.gtkblist-theme: e039ff6c: Mark the description of the properties f...
sadrul at pidgin.im
sadrul at pidgin.im
Sat Apr 18 19:30:34 EDT 2009
-----------------------------------------------------------------
Revision: e039ff6ca69e4028101db0b3b484cceca6d0a52e
Ancestor: 408c04a7b04e850ba1577bcfae598fb5e4135891
Author: sadrul at pidgin.im
Date: 2009-04-18T23:27:38
Branch: im.pidgin.sadrul.gtkblist-theme
URL: http://d.pidgin.im/viewmtn/revision/info/e039ff6ca69e4028101db0b3b484cceca6d0a52e
Modified files:
pidgin/gtkblist-theme.c pidgin/plugins/themeedit.c
ChangeLog:
Mark the description of the properties for translation. Show the
description in the theme editor as a tooltip.
-------------- next part --------------
============================================================
--- pidgin/gtkblist-theme.c 2b4bed7a60022ef9316adb8f31b92576e8ab698f
+++ pidgin/gtkblist-theme.c 0e6e2151b2784b35bb93d6dd71b36cedfe172972
@@ -363,80 +363,80 @@ pidgin_blist_theme_class_init(PidginBlis
/* Buddy List */
pspec = g_param_spec_boxed("background-color", _("Background Color"),
- "The background color for the buddy list",
+ _("The background color for the buddy list"),
GDK_TYPE_COLOR, G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_BACKGROUND_COLOR, pspec);
pspec = g_param_spec_pointer("layout", _("Layout"),
- "The layout of icons, name, and status of the blist",
+ _("The layout of icons, name, and status of the blist"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_LAYOUT, pspec);
/* Group */
pspec = g_param_spec_boxed("expanded-color", _("Expanded Background Color"),
- "The background color of an expanded group",
+ _("The background color of an expanded group"),
GDK_TYPE_COLOR, G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_EXPANDED_COLOR, pspec);
pspec = g_param_spec_pointer("expanded-text", _("Expanded Text"),
- "The text information for when a group is expanded",
+ _("The text information for when a group is expanded"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_EXPANDED_TEXT, pspec);
pspec = g_param_spec_boxed("collapsed-color", _("Collapsed Background Color"),
- "The background color of a collapsed group",
+ _("The background color of a collapsed group"),
GDK_TYPE_COLOR, G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_COLLAPSED_COLOR, pspec);
pspec = g_param_spec_pointer("collapsed-text", _("Collapsed Text"),
- "The text information for when a group is collapsed",
+ _("The text information for when a group is collapsed"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_COLLAPSED_TEXT, pspec);
/* Buddy */
pspec = g_param_spec_boxed("contact-color", _("Contact/Chat Background Color"),
- "The background color of a contact or chat",
+ _("The background color of a contact or chat"),
GDK_TYPE_COLOR, G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_CONTACT_COLOR, pspec);
pspec = g_param_spec_pointer("contact", _("Contact Text"),
- "The text information for when a contact is expanded",
+ _("The text information for when a contact is expanded"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_CONTACT, pspec);
pspec = g_param_spec_pointer("online", _("On-line Text"),
- "The text information for when a buddy is online",
+ _("The text information for when a buddy is online"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_ONLINE, pspec);
pspec = g_param_spec_pointer("away", _("Away Text"),
- "The text information for when a buddy is away",
+ _("The text information for when a buddy is away"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_AWAY, pspec);
pspec = g_param_spec_pointer("offline", _("Off-line Text"),
- "The text information for when a buddy is off-line",
+ _("The text information for when a buddy is off-line"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_OFFLINE, pspec);
pspec = g_param_spec_pointer("idle", _("Idle Text"),
- "The text information for when a buddy is idle",
+ _("The text information for when a buddy is idle"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_IDLE, pspec);
pspec = g_param_spec_pointer("message", _("Message Text"),
- "The text information for when a buddy has an unread message",
+ _("The text information for when a buddy has an unread message"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_MESSAGE, pspec);
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 nick",
+ _("The text information for when a chat has an unread message that mentions your nick"),
G_PARAM_READWRITE);
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",
+ _("The text information for a buddy's status"),
G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_STATUS, pspec);
}
============================================================
--- pidgin/plugins/themeedit.c 2c3b1419d2faec40a9d52deac5895e153ab08c64
+++ pidgin/plugins/themeedit.c 9f515c429992162f5d280bd860e26253851e1fdb
@@ -145,7 +145,7 @@ static GtkWidget *
}
static GtkWidget *
-pidgin_theme_create_color_selector(const char *text, const char *prop,
+pidgin_theme_create_color_selector(const char *text, const char *blurb, const char *prop,
GtkSizeGroup *sizegroup)
{
GtkWidget *color;
@@ -157,6 +157,9 @@ pidgin_theme_create_color_selector(const
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
gtk_size_group_add_widget(sizegroup, label);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION(2, 12, 0)
+ gtk_widget_set_tooltip_text(label, blurb);
+#endif
color = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_COLOR,
PIDGIN_BUTTON_HORIZONTAL);
@@ -168,7 +171,7 @@ static GtkWidget *
}
static GtkWidget *
-pidgin_theme_create_font_selector(const char *text, const char *prop,
+pidgin_theme_create_font_selector(const char *text, const char *blurb, const char *prop,
GtkSizeGroup *sizegroup)
{
GtkWidget *color, *font;
@@ -180,6 +183,9 @@ pidgin_theme_create_font_selector(const
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
gtk_size_group_add_widget(sizegroup, label);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION(2, 12, 0)
+ gtk_widget_set_tooltip_text(label, blurb);
+#endif
font = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT,
PIDGIN_BUTTON_HORIZONTAL);
@@ -254,14 +260,16 @@ pidgin_blist_theme_edit(void)
vbox = pidgin_make_frame(box, _(sections[i].header));
for (j = 0; sections[i].props[j]; j++) {
const char *label;
+ const char *blurb;
spec = g_object_class_find_property(klass, sections[i].props[j]);
label = g_param_spec_get_nick(spec);
+ blurb = g_param_spec_get_blurb(spec);
if (G_IS_PARAM_SPEC_BOXED(spec)) {
- hbox = pidgin_theme_create_color_selector(label,
+ hbox = pidgin_theme_create_color_selector(label, blurb,
sections[i].props[j], group);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
} else {
- hbox = pidgin_theme_create_font_selector(label,
+ hbox = pidgin_theme_create_font_selector(label, blurb,
sections[i].props[j], group);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
}
More information about the Commits
mailing list