Mercurial > pidgin.yaz
changeset 26661:9b6619a28f5d
Mark the description of the properties for translation. Show the
description in the theme editor as a tooltip.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 18 Apr 2009 23:27:38 +0000 |
parents | e9e253607e35 |
children | 0dddfdb3a24a |
files | pidgin/gtkblist-theme.c pidgin/plugins/themeedit.c |
diffstat | 2 files changed, 27 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist-theme.c Sat Apr 18 23:21:56 2009 +0000 +++ b/pidgin/gtkblist-theme.c Sat Apr 18 23:27:38 2009 +0000 @@ -363,80 +363,80 @@ /* 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); }
--- a/pidgin/plugins/themeedit.c Sat Apr 18 23:21:56 2009 +0000 +++ b/pidgin/plugins/themeedit.c Sat Apr 18 23:27:38 2009 +0000 @@ -145,7 +145,7 @@ } 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 @@ 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 * -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 @@ 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 @@ 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); }