From 9506e1975f34e76a18b81aa49cbacb589fa52ee7 Mon Sep 17 00:00:00 2001 From: "J. A. Magallon" Date: Tue, 4 Jan 2005 05:31:38 -0800 Subject: [PATCH] make gconfig work with gtk-2.4 I need this to make gconfig work under gtk-2.4. Without this, it just coredumps. There is some problem with pixmap creation/usage from XPM in the way it is done in gconf, so I just added some stock icons. It is even prettier..;) Could someone test this still works on gtk-2.0 or 2.2 ? Changes: - change the wiget class 'button' in glade files to something known to glade (GtkToolButton) - use 'stock-id' property for toolbar buttons instead of "stock_pixmap" - change unknown signal "pressed" to "clicked" - remove manual setting of icons in gconf.c Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/kconfig/gconf.c | 32 -------------------------------- scripts/kconfig/gconf.glade | 40 +++++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 51 deletions(-) (limited to 'scripts') diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 0b956e32b369..ed4afa063fb6 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -187,8 +187,6 @@ void init_main_window(const gchar * glade_file) GtkWidget *widget; GtkTextBuffer *txtbuf; char title[256]; - GdkPixmap *pixmap; - GdkBitmap *mask; GtkStyle *style; xml = glade_xml_new(glade_file, "window1", NULL); @@ -221,36 +219,6 @@ void init_main_window(const gchar * glade_file) style = gtk_widget_get_style(main_wnd); widget = glade_xml_get_widget(xml, "toolbar1"); - pixmap = gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask, - &style->bg[GTK_STATE_NORMAL], - (gchar **) xpm_single_view); - gtk_image_set_from_pixmap(GTK_IMAGE - (((GtkToolbarChild - *) (g_list_nth(GTK_TOOLBAR(widget)-> - children, - 5)->data))->icon), - pixmap, mask); - pixmap = - gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask, - &style->bg[GTK_STATE_NORMAL], - (gchar **) xpm_split_view); - gtk_image_set_from_pixmap(GTK_IMAGE - (((GtkToolbarChild - *) (g_list_nth(GTK_TOOLBAR(widget)-> - children, - 6)->data))->icon), - pixmap, mask); - pixmap = - gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask, - &style->bg[GTK_STATE_NORMAL], - (gchar **) xpm_tree_view); - gtk_image_set_from_pixmap(GTK_IMAGE - (((GtkToolbarChild - *) (g_list_nth(GTK_TOOLBAR(widget)-> - children, - 7)->data))->icon), - pixmap, mask); - switch (view_mode) { case SINGLE_VIEW: widget = glade_xml_get_widget(xml, "button4"); diff --git a/scripts/kconfig/gconf.glade b/scripts/kconfig/gconf.glade index 1e1736d81ee9..5ed75a7aeece 100644 --- a/scripts/kconfig/gconf.glade +++ b/scripts/kconfig/gconf.glade @@ -310,13 +310,13 @@ True - + True Goes up of one level (single view) Back True - gtk-undo - + gtk-undo + @@ -327,24 +327,24 @@ - + True Load a config file Load True - gtk-open - + gtk-open + - + True Save a config file Save True - gtk-save - + gtk-save + @@ -355,34 +355,34 @@ - + True Single view Single True - gtk-missing-image + gtk-indent - + True Split view Split True - gtk-missing-image + gtk-copy - + True Full view Full True - gtk-missing-image + gtk-justify-left @@ -394,22 +394,24 @@ - + True Collapse the whole tree in the right frame Collapse True - + gtk-zoom-out + - + True Expand the whole tree in the right frame Expand True - + gtk-zoom-in + -- cgit v1.2.3