cpw.rekkanoryo.prefs_window: 5431b25b: Kill the use of the GNOME document font ...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Nov 15 18:21:09 EST 2009


-----------------------------------------------------------------
Revision: 5431b25b1d602af66026c3803fbb4cae4cf040c9
Ancestor: 16ab61e2eb4e7c27e58c33cdaeb7dbb820a2e603
Author: rekkanoryo at pidgin.im
Date: 2009-11-15T20:34:26
Branch: im.pidgin.cpw.rekkanoryo.prefs_window
URL: http://d.pidgin.im/viewmtn/revision/info/5431b25b1d602af66026c3803fbb4cae4cf040c9

Modified files:
        pidgin/gtkconv.c pidgin/gtkprefs.c pidgin/gtkutils.c

ChangeLog: 

Kill the use of the GNOME document font and the prefs to override it.  The font
can be set via the theme control plugin.  This makes the Themes and Sounds tabs
the tallest, and I believe I've accomplished my initial goal of fitting on the
shorter screens for netbooks.

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	faf74b7eba3611d8749e62037710ab646fd075a1
+++ pidgin/gtkconv.c	99f80a19b12b9603073a35ee771275f95e400144
@@ -7931,9 +7931,6 @@ pidgin_conversations_init(void)
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/tab_side", GTK_POS_TOP);
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/scrollback_lines", 4000);
 
-	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font", TRUE);
-	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/custom_font", "");
-
 	/* Conversations -> Chat */
 	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/conversations/chat");
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/entry_height", 54);
============================================================
--- pidgin/gtkprefs.c	15d4a973eea93b8b5bf65fe7f5f8e2952d842994
+++ pidgin/gtkprefs.c	df25492c8f9e1ad327bc1abfbc996e2949aa8520
@@ -1660,28 +1660,6 @@ conv_page(void)
 		PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines",
 		1, 8, NULL);
 
-#if GTK_CHECK_VERSION(2,4,0)
-	vbox = pidgin_make_frame(ret, _("Font"));
-	if (purple_running_gnome())
-		fontpref = pidgin_prefs_checkbox(_("Use document font from _theme"), PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox);
-	else
-		fontpref = pidgin_prefs_checkbox(_("Use font from _theme"), PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox);
-
-	font_name = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/custom_font");
-	if ((font_name == NULL) || (*font_name == '\0')) {
-		font_button = gtk_font_button_new();
-	} else {
-		font_button = gtk_font_button_new_with_font(font_name);
-	}
-
-	gtk_font_button_set_show_style(GTK_FONT_BUTTON(font_button), TRUE);
-	hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Conversation _font:"), NULL, font_button, FALSE, NULL);
-	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font"))
-		gtk_widget_set_sensitive(hbox, FALSE);
-	g_signal_connect(G_OBJECT(fontpref), "clicked", G_CALLBACK(pidgin_toggle_sensitive), hbox);
-	g_signal_connect(G_OBJECT(font_button), "font-set", G_CALLBACK(pidgin_custom_font_set), NULL);
-#endif
-
 	vbox = pidgin_make_frame(ret, _("Default Formatting"));
 	gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, GTK_PACK_START);
 
@@ -3071,6 +3049,7 @@ pidgin_prefs_update_old(void)
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/use_custom_bgcolor");
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/use_custom_fgcolor");
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/use_custom_font");
+	purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/custom_font");
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/use_custom_size");
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/chat/old_tab_complete");
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/chat/tab_completion");
============================================================
--- pidgin/gtkutils.c	e54a0f662f3ae32f2dd295d9569deb478d4d1fde
+++ pidgin/gtkutils.c	90724560d0f0bb2b1c8f333ca5d253368016af32
@@ -105,7 +105,6 @@ pidgin_setup_imhtml(GtkWidget *imhtml)
 void
 pidgin_setup_imhtml(GtkWidget *imhtml)
 {
-	PangoFontDescription *desc = NULL;
 	g_return_if_fail(imhtml != NULL);
 	g_return_if_fail(GTK_IS_IMHTML(imhtml));
 
@@ -113,31 +112,6 @@ pidgin_setup_imhtml(GtkWidget *imhtml)
 
 	gtk_imhtml_set_funcs(GTK_IMHTML(imhtml), &gtkimhtml_cbs);
 
-	if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) {
-		const char *font = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/custom_font");
-		desc = pango_font_description_from_string(font);
-	} else if (purple_running_gnome()) {
-		/* Use the GNOME "document" font, if applicable */
-		char *path;
-
-		if ((path = g_find_program_in_path("gconftool-2"))) {
-			char *font = NULL;
-			char *err = NULL;
-			g_free(path);
-			if (g_spawn_command_line_sync(
-					"gconftool-2 -g /desktop/gnome/interface/document_font_name",
-					&font, &err, NULL, NULL)) {
-				desc = pango_font_description_from_string(font);
-			}
-			g_free(err);
-			g_free(font);
-		}
-	}
-
-	if (desc) {
-		gtk_widget_modify_font(imhtml, desc);
-		pango_font_description_free(desc);
-	}
 }
 
 static


More information about the Commits mailing list