cpw.rekkanoryo.prefs_window: 44de2beb: Move the status icon and blist theme com...
rekkanoryo at pidgin.im
rekkanoryo at pidgin.im
Wed Nov 11 11:31:37 EST 2009
-----------------------------------------------------------------
Revision: 44de2bebf06a92157de199163675019afaa96a70
Ancestor: 13fd4c7e72843a6f5a0bb6a596af65d9cbb4bffa
Author: rekkanoryo at pidgin.im
Date: 2009-11-11T16:14:34
Branch: im.pidgin.cpw.rekkanoryo.prefs_window
URL: http://d.pidgin.im/viewmtn/revision/info/44de2bebf06a92157de199163675019afaa96a70
Modified files:
pidgin/gtkprefs.c
ChangeLog:
Move the status icon and blist theme comboboxes to the Themes tab. This looks
ridiculously ugly thus far.
-------------- next part --------------
============================================================
--- pidgin/gtkprefs.c 032034e6a5520aa7cda447875854ce760089e013
+++ pidgin/gtkprefs.c c2652fa235c3e491f103914d804c64beb4ec11d2
@@ -1104,6 +1104,49 @@ remove_theme_button_clicked_cb(GtkWidget
g_free(theme_name);
}
+/* sets the current buddy list theme */
+static void
+prefs_set_blist_theme_cb(GtkComboBox *combo_box, gpointer user_data)
+{
+ PidginBlistTheme *theme = NULL;
+ GtkTreeIter iter;
+ gchar *name = NULL;
+
+ if(gtk_combo_box_get_active_iter(combo_box, &iter)) {
+
+ gtk_tree_model_get(GTK_TREE_MODEL(prefs_blist_themes), &iter, 2, &name, -1);
+
+ if(!name || !g_str_equal(name, ""))
+ theme = PIDGIN_BLIST_THEME(purple_theme_manager_find_theme(name, "blist"));
+
+ g_free(name);
+
+ pidgin_blist_set_theme(theme);
+ }
+}
+
+/* sets the current icon theme */
+static void
+prefs_set_status_icon_theme_cb(GtkComboBox *combo_box, gpointer user_data)
+{
+ PidginStatusIconTheme *theme = NULL;
+ GtkTreeIter iter;
+ gchar *name = NULL;
+
+ if(gtk_combo_box_get_active_iter(combo_box, &iter)) {
+
+ gtk_tree_model_get(GTK_TREE_MODEL(prefs_status_icon_themes), &iter, 2, &name, -1);
+
+ if(!name || !g_str_equal(name, ""))
+ theme = PIDGIN_STATUS_ICON_THEME(purple_theme_manager_find_theme(name, "status-icon"));
+
+ g_free(name);
+
+ pidgin_stock_load_status_icon_theme(theme);
+ pidgin_blist_refresh(purple_get_blist());
+ }
+}
+
static GtkWidget *
theme_page(void)
{
@@ -1123,10 +1166,42 @@ theme_page(void)
{"text/uri-list", 0, 1},
{"STRING", 0, 2}
};
+ GtkWidget *themesel_hbox;
ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE);
gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER);
+ /* Buddy List Themes */
+ themesel_hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+
+ label = gtk_label_new(_("Buddy List Theme:"));
+ gtk_box_pack_start(GTK_BOX(themesel_hbox), label, FALSE, FALSE, 0);
+
+ prefs_blist_themes_combo_box = prefs_build_theme_combo_box(prefs_blist_themes,
+ purple_prefs_get_string(PIDGIN_PREFS_ROOT "/blist/theme"),
+ "blist");
+
+ gtk_box_pack_start(GTK_BOX(themesel_hbox), prefs_blist_themes_combo_box, FALSE, FALSE, 0);
+ g_signal_connect(G_OBJECT(prefs_blist_themes_combo_box), "changed", (GCallback)prefs_set_blist_theme_cb, NULL);
+
+ gtk_box_pack_start(GTK_BOX(ret), themesel_hbox, FALSE, FALSE, 0);
+
+ /* Status Icon Themes */
+ themesel_hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+
+ label = gtk_label_new(_("Status Icon Theme:"));
+ gtk_box_pack_start(GTK_BOX(themesel_hbox), label, FALSE, FALSE, 0);
+
+ prefs_status_themes_combo_box = prefs_build_theme_combo_box(prefs_status_icon_themes,
+ purple_prefs_get_string(PIDGIN_PREFS_ROOT "/status/icon-theme"),
+ "icon");
+
+ gtk_box_pack_start(GTK_BOX(themesel_hbox), prefs_status_themes_combo_box, FALSE, FALSE, 0);
+ g_signal_connect(G_OBJECT(prefs_status_themes_combo_box), "changed", (GCallback)prefs_set_status_icon_theme_cb, NULL);
+
+ gtk_box_pack_start(GTK_BOX(ret), themesel_hbox, FALSE, FALSE, 0);
+
+ /* Smiley Themes */
label = gtk_label_new(_("Select a smiley theme that you would like to use from the list below."
" New themes can be installed by dragging and dropping them onto the theme list."));
@@ -1407,49 +1482,6 @@ keyboard_shortcuts(GtkWidget *page)
gtk_box_pack_start(GTK_BOX(vbox), checkbox, FALSE, FALSE, 0);
}
-/* sets the current buddy list theme */
-static void
-prefs_set_blist_theme_cb(GtkComboBox *combo_box, gpointer user_data)
-{
- PidginBlistTheme *theme = NULL;
- GtkTreeIter iter;
- gchar *name = NULL;
-
- if(gtk_combo_box_get_active_iter(combo_box, &iter)) {
-
- gtk_tree_model_get(GTK_TREE_MODEL(prefs_blist_themes), &iter, 2, &name, -1);
-
- if(!name || !g_str_equal(name, ""))
- theme = PIDGIN_BLIST_THEME(purple_theme_manager_find_theme(name, "blist"));
-
- g_free(name);
-
- pidgin_blist_set_theme(theme);
- }
-}
-
-/* sets the current icon theme */
-static void
-prefs_set_status_icon_theme_cb(GtkComboBox *combo_box, gpointer user_data)
-{
- PidginStatusIconTheme *theme = NULL;
- GtkTreeIter iter;
- gchar *name = NULL;
-
- if(gtk_combo_box_get_active_iter(combo_box, &iter)) {
-
- gtk_tree_model_get(GTK_TREE_MODEL(prefs_status_icon_themes), &iter, 2, &name, -1);
-
- if(!name || !g_str_equal(name, ""))
- theme = PIDGIN_STATUS_ICON_THEME(purple_theme_manager_find_theme(name, "status-icon"));
-
- g_free(name);
-
- pidgin_stock_load_status_icon_theme(theme);
- pidgin_blist_refresh(purple_get_blist());
- }
-}
-
static GtkWidget *
interface_page(void)
{
@@ -1465,24 +1497,6 @@ interface_page(void)
sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
- /* Buddy List Themes */
- vbox = pidgin_make_frame(ret, _("Buddy List Theme"));
-
- prefs_blist_themes_combo_box = prefs_build_theme_combo_box(prefs_blist_themes,
- purple_prefs_get_string(PIDGIN_PREFS_ROOT "/blist/theme"),
- "blist");
-
- gtk_box_pack_start(GTK_BOX (vbox), prefs_blist_themes_combo_box, FALSE, FALSE, 0);
- g_signal_connect(G_OBJECT(prefs_blist_themes_combo_box), "changed", (GCallback)prefs_set_blist_theme_cb, NULL);
-
- /* Status Icon Themes */
- prefs_status_themes_combo_box = prefs_build_theme_combo_box(prefs_status_icon_themes,
- purple_prefs_get_string(PIDGIN_PREFS_ROOT "/status/icon-theme"),
- "icon");
-
- gtk_box_pack_start(GTK_BOX (vbox), prefs_status_themes_combo_box, FALSE, FALSE, 0);
- g_signal_connect(G_OBJECT(prefs_status_themes_combo_box), "changed", (GCallback)prefs_set_status_icon_theme_cb, NULL);
-
/* System Tray */
vbox = pidgin_make_frame(ret, _("System Tray Icon"));
label = pidgin_prefs_dropdown(vbox, _("_Show system tray icon:"), PURPLE_PREF_STRING,
More information about the Commits
mailing list