changeset 10125:ee50e4797352

[gaim-migrate @ 11162] I fixed the problem described in patch 1038166 in a slightly different way. While I was at it I got carried away and made it not show size and stuff in the dialog. The way I did it is probably very evil, and someone will probably revert it. Just delete the realize_ function. But this is HEAD, so we can try it anyway. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Tue, 19 Oct 2004 04:39:55 +0000
parents b4efa002dad8
children 3c3795562256
files src/gtkdialogs.h src/gtkimhtmltoolbar.c src/gtkimhtmltoolbar.h
diffstat 3 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkdialogs.h	Tue Oct 19 04:32:56 2004 +0000
+++ b/src/gtkdialogs.h	Tue Oct 19 04:39:55 2004 +0000
@@ -58,8 +58,6 @@
 			gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG)
 #define GAIM_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED)
 
-#define DEFAULT_FONT_FACE "Helvetica"
-
 
 /* this is used for queuing messages received while away. This is really a UI function
  * which is why the struct is here. */
--- a/src/gtkimhtmltoolbar.c	Tue Oct 19 04:32:56 2004 +0000
+++ b/src/gtkimhtmltoolbar.c	Tue Oct 19 04:39:55 2004 +0000
@@ -125,6 +125,18 @@
 }
 
 static void
+realize_toolbar_font(GtkWidget *widget, GtkIMHtmlToolbar *toolbar)
+{
+	GtkFontSelection *sel;
+
+	sel = GTK_FONT_SELECTION(GTK_FONT_SELECTION_DIALOG(toolbar->font_dialog)->fontsel);
+	gtk_widget_hide_all(gtk_widget_get_parent(sel->size_entry));
+	gtk_widget_show_all(sel->family_list);
+	gtk_widget_show(gtk_widget_get_parent(sel->family_list));
+	gtk_widget_show(gtk_widget_get_parent(gtk_widget_get_parent(sel->family_list)));
+}
+
+static void
 cancel_toolbar_font(GtkWidget *widget, GtkIMHtmlToolbar *toolbar)
 {
 	destroy_toolbar_font(widget, NULL, toolbar);
@@ -164,7 +176,7 @@
 		toolbar->font_dialog = gtk_font_selection_dialog_new(_("Select Font"));
 
 		g_object_set_data(G_OBJECT(toolbar->font_dialog), "gaim_toolbar", toolbar);
-
+		
 		if(fontname) {
 			char fonttif[128];
 			g_snprintf(fonttif, sizeof(fonttif), "%s 12", fontname);
@@ -181,6 +193,8 @@
 						 G_CALLBACK(apply_font), toolbar->font_dialog);
 		g_signal_connect(G_OBJECT(GTK_FONT_SELECTION_DIALOG(toolbar->font_dialog)->cancel_button), "clicked",
 						 G_CALLBACK(cancel_toolbar_font), toolbar);
+		g_signal_connect_after(G_OBJECT(toolbar->font_dialog), "realize",
+						 G_CALLBACK(realize_toolbar_font), toolbar);
 
 		gtk_window_present(GTK_WINDOW(toolbar->font_dialog));
 	} else {
--- a/src/gtkimhtmltoolbar.h	Tue Oct 19 04:32:56 2004 +0000
+++ b/src/gtkimhtmltoolbar.h	Tue Oct 19 04:39:55 2004 +0000
@@ -30,6 +30,8 @@
 extern "C" {
 #endif
 
+#define DEFAULT_FONT_FACE "Helvetica 12"
+
 #define GTK_TYPE_IMHTMLTOOLBAR            (gtk_imhtmltoolbar_get_type ())
 #define GTK_IMHTMLTOOLBAR(obj)            (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTMLTOOLBAR, GtkIMHtmlToolbar))
 #define GTK_IMHTMLTOOLBAR_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTMLTOOLBAR, GtkIMHtmlToolbarClass))