[openbox] Images in the menu
Mikael Magnusson
mangosoft at comhem.se
Sun Oct 31 05:10:33 EST 2004
On Sun, 31 Oct 2004, Lucas Hazel wrote:
> On Sun, 31 Oct 2004 03:56:15 +0300 (EEST)
> Tero Grundström <tero at vuosaari.hai.fi> wrote:
>
>> BTW, <if I would send Magnusson a patch for a improvement I like, I'm
>> pretty sure he would not add it to openbox mainline. Openbox seems to
>> be considered "perfect", hence no new releases in a long time. So what
>> would be the point of sending patches?
>
> Well then, the people who wanted images in the menu could have them.
> Just because a patch isn't accepted into the main source doesn't make it
> any less worthwhile, this would be where openbox's slow development
> cycle comes in handy. If someone made such a patch it would likely
> remain viable for quite some time.
>
> Surely someone could have made one by now, rather than just talking
> about it. No, I'm not going to do it, I don't even use the openbox menu.
This took about 25 seconds:
Index: openbox/client_list_menu.c
===================================================================
RCS file: /cvs/cvsroot/openbox/openbox/client_list_menu.c,v
retrieving revision 1.18
diff -p -u -d -r1.18 client_list_menu.c
--- openbox/client_list_menu.c 27 Oct 2003 19:59:11 -0000 1.18
+++ openbox/client_list_menu.c 31 Oct 2004 10:05:19 -0000
@@ -73,7 +73,7 @@ static void desk_menu_update(ObMenuFrame
e = menu_add_normal(menu, i, (c->iconic ? c->icon_title : c->title), acts);
- if ((icon = client_icon(c, 32, 32))) {
+ if (config_menu_client_list_icons && (icon = client_icon(c, 32, 32))) {
e->data.normal.icon_width = icon->width;
e->data.normal.icon_height = icon->height;
e->data.normal.icon_data = icon->data;
Index: openbox/config.c
===================================================================
RCS file: /cvs/cvsroot/openbox/openbox/config.c,v
retrieving revision 1.84
diff -p -u -d -r1.84 config.c
--- openbox/config.c 6 Oct 2004 12:42:46 -0000 1.84
+++ openbox/config.c 31 Oct 2004 10:05:19 -0000
@@ -66,6 +66,7 @@ gint config_mouse_dclicktime;
gboolean config_menu_warppointer;
gboolean config_menu_xorstyle;
guint config_menu_hide_delay;
+gboolean config_menu_client_list_icons;
GSList *config_menu_files;
@@ -408,6 +409,8 @@ static void parse_menu(ObParseInst *i, x
config_menu_xorstyle = parse_bool(doc, n);
if ((n = parse_find_node("hideDelay", node)))
config_menu_hide_delay = parse_int(doc, n);
+ if ((n = parse_find_node("desktopMenuIcons", node)))
+ config_menu_client_list_icons = parse_int(doc, n);
}
}
@@ -597,6 +600,7 @@ void config_startup(ObParseInst *i)
config_menu_warppointer = TRUE;
config_menu_xorstyle = TRUE;
config_menu_hide_delay = 250;
+ config_menu_client_list_icons = TRUE;
config_menu_files = NULL;
parse_register(i, "menu", parse_menu, NULL);
Index: openbox/config.h
===================================================================
RCS file: /cvs/cvsroot/openbox/openbox/config.h,v
retrieving revision 1.52
diff -p -u -d -r1.52 config.h
--- openbox/config.h 6 Oct 2004 12:42:46 -0000 1.52
+++ openbox/config.h 31 Oct 2004 10:05:19 -0000
@@ -113,6 +113,8 @@ extern gboolean config_menu_warppointer;
extern gboolean config_menu_xorstyle;
/*! delay for hiding menu when opening */
extern guint config_menu_hide_delay;
+/*! show icons in client_list_menu */
+extern gboolean config_menu_client_list_icons;
/*! User-specified menu files */
extern GSList *config_menu_files;
(also in cvs)
--
Mikael Magnusson
More information about the openbox
mailing list