cpw.rekkanoryo.prefs_window: 23b195ee: Remove some code duplication which also ...
qulogic at pidgin.im
qulogic at pidgin.im
Mon Nov 16 03:15:41 EST 2009
-----------------------------------------------------------------
Revision: 23b195ee466a16623c26be2604cba4a8c5b889b2
Ancestor: 0e267f147f372b6a6db202408b73d23ee991ea1f
Author: qulogic at pidgin.im
Date: 2009-11-16T07:08:27
Branch: im.pidgin.cpw.rekkanoryo.prefs_window
URL: http://d.pidgin.im/viewmtn/revision/info/23b195ee466a16623c26be2604cba4a8c5b889b2
Modified files:
pidgin/gtkprefs.c
ChangeLog:
Remove some code duplication which also fixes a small inconsistency in the
formatting.
-------------- next part --------------
============================================================
--- pidgin/gtkprefs.c ec39380901ef8c10e7b1630770cbe0f81785f14b
+++ pidgin/gtkprefs.c 6078369d498f6bf187a2ba6a82af95aa75e80612
@@ -342,6 +342,17 @@ delete_prefs(GtkWidget *asdf, void *gdsa
notebook_page = 0;
}
+static gchar *
+get_theme_markup(const char *name, gboolean custom, const char *author,
+ const char *description)
+{
+
+ return g_strdup_printf("<b>%s</b>%s%s%s%s\n<span foreground='dim grey'>%s</span>",
+ name, custom ? " " : "", custom ? _("(Custom)") : "",
+ author != NULL ? " - " : "", author != NULL ? author : "",
+ description != NULL ? description : "");
+}
+
static void
theme_refresh_theme_list(void)
{
@@ -356,9 +367,8 @@ theme_refresh_theme_list(void)
while (themes) {
struct smiley_theme *theme = themes->data;
- char *description = g_strdup_printf("<span size='larger' weight='bold'>%s</span> - %s\n"
- "<span size='smaller' foreground='dim grey'>%s</span>",
- _(theme->name), _(theme->author), _(theme->desc));
+ char *description = get_theme_markup(_(theme->name), FALSE,
+ _(theme->author), _(theme->desc));
gtk_list_store_append(prefs_smiley_themes, &iter);
/*
@@ -381,17 +391,6 @@ theme_refresh_theme_list(void)
}
}
-static gchar *
-get_theme_markup(const char *name, gboolean custom, const char *author,
- const char *description)
-{
-
- return g_strdup_printf("<b>%s</b>%s%s%s%s\n<span foreground='dim grey'>%s</span>",
- name, custom ? " " : "", custom ? _("(Custom)") : "",
- author != NULL ? " - " : "", author != NULL ? author : "",
- description != NULL ? description : "");
-}
-
/* Rebuild the markup for the sound theme selection for "(Custom)" themes */
static void
pref_sound_generate_markup(void)
More information about the Commits
mailing list