pidgin: cc84ce56: disapproval of revision '9cbb69e06e19c58...

rlaager at pidgin.im rlaager at pidgin.im
Sat May 10 05:30:51 EDT 2008


-----------------------------------------------------------------
Revision: cc84ce5643c451b4a6d379e839e7c7531cabd9ee
Ancestor: 9cbb69e06e19c581b9691f6acb2c48f204050dd6
Author: rlaager at pidgin.im
Date: 2008-05-10T09:24:52
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/cc84ce5643c451b4a6d379e839e7c7531cabd9ee

Modified files:
        ChangeLog pidgin/gtkimhtmltoolbar.c

ChangeLog: 

disapproval of revision '9cbb69e06e19c581b9691f6acb2c48f204050dd6'
Comments: 

The toolbar code works perfectly with my test .purple directory, but fails
with my real one.

-------------- next part --------------
============================================================
--- ChangeLog	431cfdf19ab0d719e460fdfc880f833d06348bc5
+++ ChangeLog	79712a51bc722eb8813ca8646c6c114727695154
@@ -39,9 +39,6 @@ version 2.x.x:
 	  lines.
 	* Moved the "Local alias" field in the Modify Account dialog to be below
 	  the "User Options" heading on the "Basic" tab.
-	* The formatting toolbar will now respect your system-wide GTK+ toolbar
-	  setting (to the extent possible with our two choices).  You can still
-	  override it by right-clicking on the formatting toolbar.
 
 	General:
 	* The configure script now dies on more absent dependencies.  The
============================================================
--- pidgin/gtkimhtmltoolbar.c	f05b05b7d41e8bfa55f1fbcd4342da9cbcf68eb8
+++ pidgin/gtkimhtmltoolbar.c	bb0f6cb4e8a66237645d15ecb440332f6444b5b6
@@ -42,49 +42,12 @@ static GtkHBoxClass *parent_class = NULL
 #include <gdk/gdkkeysyms.h>
 
 static GtkHBoxClass *parent_class = NULL;
-static GtkSettings *settings = NULL;
 
 static void toggle_button_set_active_block(GtkToggleButton *button,
 										   gboolean is_active,
 										   GtkIMHtmlToolbar *toolbar);
 
-static gboolean get_gtk_wide(void);
 
-/* If we're not overriding GTK+, grab its potentially new default and use that. */
-static void toolbar_style_changed_cb(GObject *obj, GParamSpec *pspec, gpointer data)
-{
-	/* If we're not overriding GTK+, grab its potentially new default and use that.
-	 * Otherwise, if the potentially new default matches the user's setting, we
-	 * no longer want to override. */
-        if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/override_gtk"))
-        {
-                purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/wide",
-                                get_gtk_wide());
-        }
-	else
-	{
-		gboolean gtk_wide = get_gtk_wide();
-		gboolean pidgin_wide = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/wide");
-		purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/override_gtk", (gtk_wide != pidgin_wide));
-	}
-}
-
-static gboolean get_gtk_wide()
-{
-	gint style;
-
-	if (settings == NULL)
-	{
-		settings = gtk_settings_get_default();
-		g_signal_connect(settings, "notify::gtk-toolbar-style",
-		                 G_CALLBACK(toolbar_style_changed_cb), NULL);
-	}
-
-	g_object_get(settings, "gtk-toolbar-style", &style, NULL);
-
-	return (style == GTK_TOOLBAR_ICONS);
-}
-
 static void do_bold(GtkWidget *bold, GtkIMHtmlToolbar *toolbar)
 {
 	g_return_if_fail(toolbar != NULL);
@@ -1070,16 +1033,10 @@ static void
 }
 
 static void
-switch_toolbar_view(GtkWidget *item, gpointer data)
+switch_toolbar_view(GtkWidget *item, GtkIMHtmlToolbar *toolbar)
 {
-	gboolean gtk_wide;    /* The current GTK+ default. */
-	gboolean pidgin_wide; /* The desired Pidgin setting. */
-
-	gtk_wide = get_gtk_wide();
-	pidgin_wide = !purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/wide");
-
-	purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/override_gtk", (gtk_wide != pidgin_wide));
-	purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/wide", pidgin_wide);
+	purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/wide",
+			!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/wide"));
 }
 
 static gboolean
@@ -1096,7 +1053,7 @@ gtk_imhtmltoolbar_popup_menu(GtkWidget *
 
 	menu = gtk_menu_new();
 	item = gtk_menu_item_new_with_mnemonic(wide ? _("Group Items") : _("Ungroup Items"));
-	g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(switch_toolbar_view), NULL);
+	g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(switch_toolbar_view), toolbar);
 	gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
 	gtk_widget_show(item);
 
@@ -1117,7 +1074,6 @@ static void gtk_imhtmltoolbar_class_init
 
 	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/conversations/toolbar");
 	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/wide", FALSE);
-	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/toolbar/override_gtk", FALSE);
 }
 
 static void gtk_imhtmltoolbar_create_old_buttons(GtkIMHtmlToolbar *toolbar)
@@ -1357,7 +1313,6 @@ static void gtk_imhtmltoolbar_init (GtkI
 	g_object_set_data(G_OBJECT(hbox), "lean-view", box);
 	gtk_widget_show(box);
 
-	toolbar_style_changed_cb(NULL, NULL, NULL);
 	purple_prefs_connect_callback(toolbar, PIDGIN_PREFS_ROOT "/conversations/toolbar/wide",
 			imhtmltoolbar_view_pref_changed, toolbar);
 	g_signal_connect_data(G_OBJECT(toolbar), "realize",


More information about the Commits mailing list