Null PIXMP in bonobo-uih-menu.c (fwd)




Any chance of someone applying this patch; I'm off for a week.

	Regards,

		Michael.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot

---------- Forwarded message ----------
Date: 02 Apr 2000 23:08:12 +0200
From: Jon K Hellan <hellan@acm.org>
To: mmeeks@gnu.org
Subject: Null PIXMP in bonobo-uih-menu.c

Hi,

Jody switched the menus to GNOMEUIINFO_ITEM_, but had to back out
GNOMEUIINFO_TOGGLEITEM as it requires an xpm.

This change to bonobo-uih-menu.c seems to make it tolerate NULL xpm,
like the no bonobo case does. Will you commit if it is OK?

Regards

Jon Kåre

Index: bonobo/bonobo-uih-menu.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-uih-menu.c,v
retrieving revision 1.3
diff -u -r1.3 bonobo-uih-menu.c
--- bonobo/bonobo-uih-menu.c    2000/03/08 00:28:23     1.3
+++ bonobo/bonobo-uih-menu.c    2000/04/02 21:07:13
@@ -2530,8 +2530,15 @@
                item->callback = uii->moreinfo;
        item->callback_data = uii->user_data;
 
-       item->pixmap_type     = bonobo_ui_handler_uiinfo_pixmap_type_to_uih (uii->pixmap_type);
-       item->pixmap_data     = bonobo_ui_handler_pixmap_copy_data (item->pixmap_type, uii->pixmap_info);
+       if (uii->pixmap_info) {
+               item->pixmap_type = bonobo_ui_handler_uiinfo_pixmap_type_to_uih
+                       (uii->pixmap_type);
+               item->pixmap_data = bonobo_ui_handler_pixmap_copy_data
+                       (item->pixmap_type, uii->pixmap_info);
+       } else {
+               item->pixmap_type = BONOBO_UI_HANDLER_PIXMAP_NONE;
+               item->pixmap_data = NULL;
+       }
        item->accelerator_key = uii->accelerator_key;
        item->ac_mods         = uii->ac_mods;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]