From: "J.A. Magallon" <jamagallon@able.es>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] make gconfig work with gtk-2.4
Date: Thu, 02 Dec 2004 01:01:03 +0000 [thread overview]
Message-ID: <1101949263l.27549l.0l@werewolf.able.es> (raw)
In-Reply-To: <20041130095045.090de5ea.akpm@osdl.org> (from akpm@osdl.org on Tue Nov 30 18:50:45 2004)
Hi,
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"
- removed unused xpms
- remove manual setting of icons in gconf.c
Here it goes:
--- linux/scripts/kconfig/gconf.glade.orig 2004-12-02 00:41:02.000000000 +0100
+++ linux/scripts/kconfig/gconf.glade 2004-12-02 01:25:09.000000000 +0100
@@ -310,13 +310,13 @@
<property name="tooltips">True</property>
<child>
- <widget class="button" id="button1">
+ <widget class="GtkToolButton" id="button1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Goes up of one level (single view)</property>
<property name="label" translatable="yes">Back</property>
<property name="use_underline">True</property>
- <property name="stock_pixmap">gtk-undo</property>
- <signal name="pressed" handler="on_back_pressed"/>
+ <property name="stock-id">gtk-undo</property>
+ <signal name="clicked" handler="on_back_pressed"/>
</widget>
</child>
@@ -327,24 +327,24 @@
</child>
<child>
- <widget class="button" id="button2">
+ <widget class="GtkToolButton" id="button2">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Load a config file</property>
<property name="label" translatable="yes">Load</property>
<property name="use_underline">True</property>
- <property name="stock_pixmap">gtk-open</property>
- <signal name="pressed" handler="on_load_pressed"/>
+ <property name="stock-id">gtk-open</property>
+ <signal name="clicked" handler="on_load_pressed"/>
</widget>
</child>
<child>
- <widget class="button" id="button3">
+ <widget class="GtkToolButton" id="button3">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Save a config file</property>
<property name="label" translatable="yes">Save</property>
<property name="use_underline">True</property>
- <property name="stock_pixmap">gtk-save</property>
- <signal name="pressed" handler="on_save_pressed"/>
+ <property name="stock-id">gtk-save</property>
+ <signal name="clicked" handler="on_save_pressed"/>
</widget>
</child>
@@ -355,34 +355,34 @@
</child>
<child>
- <widget class="button" id="button4">
+ <widget class="GtkToolButton" id="button4">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Single view</property>
<property name="label" translatable="yes">Single</property>
<property name="use_underline">True</property>
- <property name="stock_pixmap">gtk-missing-image</property>
+ <property name="stock-id">gtk-indent</property>
<signal name="clicked" handler="on_single_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:39 GMT"/>
</widget>
</child>
<child>
- <widget class="button" id="button5">
+ <widget class="GtkToolButton" id="button5">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Split view</property>
<property name="label" translatable="yes">Split</property>
<property name="use_underline">True</property>
- <property name="stock_pixmap">gtk-missing-image</property>
+ <property name="stock-id">gtk-copy</property>
<signal name="clicked" handler="on_split_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:45 GMT"/>
</widget>
</child>
<child>
- <widget class="button" id="button6">
+ <widget class="GtkToolButton" id="button6">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Full view</property>
<property name="label" translatable="yes">Full</property>
<property name="use_underline">True</property>
- <property name="stock_pixmap">gtk-missing-image</property>
+ <property name="stock-id">gtk-justify-left</property>
<signal name="clicked" handler="on_full_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:50 GMT"/>
</widget>
</child>
@@ -394,22 +394,24 @@
</child>
<child>
- <widget class="button" id="button7">
+ <widget class="GtkToolButton" id="button7">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Collapse the whole tree in the right frame</property>
<property name="label" translatable="yes">Collapse</property>
<property name="use_underline">True</property>
- <signal name="pressed" handler="on_collapse_pressed"/>
+ <property name="stock-id">gtk-zoom-out</property>
+ <signal name="clicked" handler="on_collapse_pressed"/>
</widget>
</child>
<child>
- <widget class="button" id="button8">
+ <widget class="GtkToolButton" id="button8">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Expand the whole tree in the right frame</property>
<property name="label" translatable="yes">Expand</property>
<property name="use_underline">True</property>
- <signal name="pressed" handler="on_expand_pressed"/>
+ <property name="stock-id">gtk-zoom-in</property>
+ <signal name="clicked" handler="on_expand_pressed"/>
</widget>
</child>
</widget>
--- linux/scripts/kconfig/images.c.orig 2004-06-16 07:18:55.000000000 +0200
+++ linux/scripts/kconfig/images.c 2004-12-02 01:50:47.000000000 +0100
@@ -3,260 +3,6 @@
* Released under the terms of the GNU GPL v2.0.
*/
-static const char *xpm_load[] = {
-"22 22 5 1",
-". c None",
-"# c #000000",
-"c c #838100",
-"a c #ffff00",
-"b c #ffffff",
-"......................",
-"......................",
-"......................",
-"............####....#.",
-"...........#....##.##.",
-"..................###.",
-".................####.",
-".####...........#####.",
-"#abab##########.......",
-"#babababababab#.......",
-"#ababababababa#.......",
-"#babababababab#.......",
-"#ababab###############",
-"#babab##cccccccccccc##",
-"#abab##cccccccccccc##.",
-"#bab##cccccccccccc##..",
-"#ab##cccccccccccc##...",
-"#b##cccccccccccc##....",
-"###cccccccccccc##.....",
-"##cccccccccccc##......",
-"###############.......",
-"......................"};
-
-static const char *xpm_save[] = {
-"22 22 5 1",
-". c None",
-"# c #000000",
-"a c #838100",
-"b c #c5c2c5",
-"c c #cdb6d5",
-"......................",
-".####################.",
-".#aa#bbbbbbbbbbbb#bb#.",
-".#aa#bbbbbbbbbbbb#bb#.",
-".#aa#bbbbbbbbbcbb####.",
-".#aa#bbbccbbbbbbb#aa#.",
-".#aa#bbbccbbbbbbb#aa#.",
-".#aa#bbbbbbbbbbbb#aa#.",
-".#aa#bbbbbbbbbbbb#aa#.",
-".#aa#bbbbbbbbbbbb#aa#.",
-".#aa#bbbbbbbbbbbb#aa#.",
-".#aaa############aaa#.",
-".#aaaaaaaaaaaaaaaaaa#.",
-".#aaaaaaaaaaaaaaaaaa#.",
-".#aaa#############aa#.",
-".#aaa#########bbb#aa#.",
-".#aaa#########bbb#aa#.",
-".#aaa#########bbb#aa#.",
-".#aaa#########bbb#aa#.",
-".#aaa#########bbb#aa#.",
-"..##################..",
-"......................"};
-
-static const char *xpm_back[] = {
-"22 22 3 1",
-". c None",
-"# c #000083",
-"a c #838183",
-"......................",
-"......................",
-"......................",
-"......................",
-"......................",
-"...........######a....",
-"..#......##########...",
-"..##...####......##a..",
-"..###.###.........##..",
-"..######..........##..",
-"..#####...........##..",
-"..######..........##..",
-"..#######.........##..",
-"..########.......##a..",
-"...............a###...",
-"...............###....",
-"......................",
-"......................",
-"......................",
-"......................",
-"......................",
-"......................"};
-
-static const char *xpm_tree_view[] = {
-"22 22 2 1",
-". c None",
-"# c #000000",
-"......................",
-"......................",
-"......#...............",
-"......#...............",
-"......#...............",
-"......#...............",
-"......#...............",
-"......########........",
-"......#...............",
-"......#...............",
-"......#...............",
-"......#...............",
-"......#...............",
-"......########........",
-"......#...............",
-"......#...............",
-"......#...............",
-"......#...............",
-"......#...............",
-"......########........",
-"......................",
-"......................"};
-
-static const char *xpm_single_view[] = {
-"22 22 2 1",
-". c None",
-"# c #000000",
-"......................",
-"......................",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"..........#...........",
-"......................",
-"......................"};
-
-static const char *xpm_split_view[] = {
-"22 22 2 1",
-". c None",
-"# c #000000",
-"......................",
-"......................",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......#......#........",
-"......................",
-"......................"};
-
-static const char *xpm_symbol_no[] = {
-"12 12 2 1",
-" c white",
-". c black",
-" ",
-" .......... ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" .......... ",
-" "};
-
-static const char *xpm_symbol_mod[] = {
-"12 12 2 1",
-" c white",
-". c black",
-" ",
-" .......... ",
-" . . ",
-" . . ",
-" . .. . ",
-" . .... . ",
-" . .... . ",
-" . .. . ",
-" . . ",
-" . . ",
-" .......... ",
-" "};
-
-static const char *xpm_symbol_yes[] = {
-"12 12 2 1",
-" c white",
-". c black",
-" ",
-" .......... ",
-" . . ",
-" . . ",
-" . . . ",
-" . .. . ",
-" . . .. . ",
-" . .... . ",
-" . .. . ",
-" . . ",
-" .......... ",
-" "};
-
-static const char *xpm_choice_no[] = {
-"12 12 2 1",
-" c white",
-". c black",
-" ",
-" .... ",
-" .. .. ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" .. .. ",
-" .... ",
-" "};
-
-static const char *xpm_choice_yes[] = {
-"12 12 2 1",
-" c white",
-". c black",
-" ",
-" .... ",
-" .. .. ",
-" . . ",
-" . .. . ",
-" . .... . ",
-" . .... . ",
-" . .. . ",
-" . . ",
-" .. .. ",
-" .... ",
-" "};
-
static const char *xpm_menu[] = {
"12 12 2 1",
" c white",
@@ -274,40 +20,6 @@
" .......... ",
" "};
-static const char *xpm_menu_inv[] = {
-"12 12 2 1",
-" c white",
-". c black",
-" ",
-" .......... ",
-" .......... ",
-" .. ...... ",
-" .. .... ",
-" .. .. ",
-" .. .. ",
-" .. .... ",
-" .. ...... ",
-" .......... ",
-" .......... ",
-" "};
-
-static const char *xpm_menuback[] = {
-"12 12 2 1",
-" c white",
-". c black",
-" ",
-" .......... ",
-" . . ",
-" . .. . ",
-" . .... . ",
-" . ...... . ",
-" . ...... . ",
-" . .... . ",
-" . .. . ",
-" . . ",
-" .......... ",
-" "};
-
static const char *xpm_void[] = {
"12 12 2 1",
" c white",
--- linux/scripts/kconfig/gconf.c.orig 2004-12-02 00:55:52.000000000 +0100
+++ linux/scripts/kconfig/gconf.c 2004-12-02 01:49:27.000000000 +0100
@@ -187,8 +187,6 @@
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 @@
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");
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-rc2-jam4 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #2
next prev parent reply other threads:[~2004-12-02 1:01 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-30 17:50 2.6.10-rc2-mm4 Andrew Morton
2004-11-30 18:06 ` 2.6.10-rc2-mm4 Arjan van de Ven
2004-11-30 18:21 ` 2.6.10-rc2-mm4 Andrew Morton
2004-11-30 18:25 ` 2.6.10-rc2-mm4 Arjan van de Ven
2004-11-30 18:32 ` 2.6.10-rc2-mm4 Andrew Morton
2004-11-30 17:44 ` 2.6.10-rc2-mm4 Alan Cox
2004-11-30 19:46 ` 2.6.10-rc2-mm4 Andrew Morton
2004-11-30 19:36 ` 2.6.10-rc2-mm4 Arjan van de Ven
2004-11-30 18:48 ` 2.6.10-rc2-mm4 William Lee Irwin III
2004-12-02 8:03 ` 2.6.10-rc2-mm4 Jes Sorensen
2004-12-02 8:01 ` 2.6.10-rc2-mm4 Jes Sorensen
2004-11-30 18:31 ` 2.6.10-rc2-mm4 Christoph Hellwig
2004-11-30 18:38 ` 2.6.10-rc2-mm4 Alan Cox
2004-11-30 18:30 ` 2.6.10-rc2-mm4 Christoph Hellwig
2004-11-30 19:18 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-11-30 19:29 ` 2.6.10-rc2-mm4 Chris Wright
2004-11-30 19:43 ` 2.6.10-rc2-mm4 Christoph Hellwig
2004-11-30 19:55 ` 2.6.10-rc2-mm4 Jeff Mahoney
2004-12-01 23:32 ` 2.6.10-rc2-mm4 Jeffrey Mahoney
2004-12-02 1:01 ` 2.6.10-rc2-mm4 Chris Wright
2004-12-02 1:11 ` 2.6.10-rc2-mm4 Jeff Mahoney
2004-12-02 13:32 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-12-02 13:15 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-12-07 19:57 ` 2.6.10-rc2-mm4 Jeff Mahoney
2004-12-07 20:28 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-12-07 22:46 ` 2.6.10-rc2-mm4 Jeff Mahoney
2004-12-08 13:28 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-11-30 23:07 ` 2.6.10-rc2-mm4 - cifs.ko needs unknown symbol CIFSSMBSetPosixACL Eyal Lebedinsky
2004-11-30 23:53 ` Andrew Morton
2004-12-01 1:37 ` 2.6.10-rc2-mm4 Matthew Dobson
2004-12-03 9:23 ` 2.6.10-rc2-mm4 Andi Kleen
2004-12-01 8:43 ` 2.6.10-rc2-mm4 - cifs.ko needs unknown symbol CIFSSMBSetPosixACL Eyal Lebedinsky
2004-12-01 21:10 ` 2.6.10-rc2-mm4 Adrian Bunk
2004-12-01 22:26 ` 2.6.10-rc2-mm4 Bill Davidsen
2004-12-02 0:18 ` 2.6.10-rc2-mm4 Bjorn Helgaas
2004-12-01 22:26 ` 2.6.10-rc2-mm4: NUMA-related oops on dual-Opteron Rafael J. Wysocki
2004-12-02 1:01 ` J.A. Magallon [this message]
2004-12-02 8:21 ` [PATCH] make gconfig work with gtk-2.4 Andrew Morton
2004-12-02 12:56 ` Roman Zippel
2004-12-02 13:22 ` J.A. Magallon
2004-12-03 9:06 ` [PATCH hostap] fix Kconfig typos and missing select CRYPTO (was: 2.6.10-rc2-mm4) Joshua Kwan
2004-12-03 9:50 ` oom goodness Re: 2.6.10-rc2-mm4 Chris Ross
2004-12-03 16:07 ` Randy.Dunlap
2004-12-03 22:16 ` Thomas Gleixner
2004-12-09 11:07 ` 2.6.10-rc2-mm4 William Lee Irwin III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1101949263l.27549l.0l@werewolf.able.es \
--to=jamagallon@able.es \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome