new method for loading menu files etc
Dana Jansens danakj@orodu.net
7 files changed,
35 insertions(+),
23 deletions(-)
M
data/rc3
→
data/rc3
@@ -326,7 +326,14 @@ </context>
</mouse> <menu> - <location>~/.openbox/menu</location> + <!-- You can specify more than one menu file in here and they are all loaded, + just don't make menu ids clash or, well, it'll be kind of pointless --> + + <!-- default menu file (or custom one in $HOME/.openbox/) --> + <file>menu</file> + + <!-- debian menu file --> + <file>/etc/X11/openbox/openbox-menu</file> </menu> </openbox_config>
M
openbox/config.h
→
openbox/config.h
@@ -72,8 +72,8 @@ gint config_resist_win;
/*! Number of pixels to resist while crossing a screen's edge */ gint config_resist_edge; -/*! User-specified path to the menu file */ -extern gchar *config_menu_path; +/*! User-specified menu files */ +extern GSList *config_menu_files; void config_startup(struct _ObParseInst *i); void config_shutdown();
M
openbox/event.c
→
openbox/event.c
@@ -1102,14 +1102,15 @@ max_fd = MAX(ice_fd, max_fd);
#endif } -void event_remove_fd(int n) +void event_remove_fd(gint n) { FD_CLR(n, &allset); g_datalist_id_remove_data(&fd_handler_list, (GQuark)n); find_max_fd(); } -static void fd_event_handle_foreach(GQuark n, gpointer data, gpointer user_data) +static void fd_event_handle_foreach(GQuark n, + gpointer data, gpointer user_data) { if (FD_ISSET( (int)n, &selset)) { event_fd_handler *h = (event_fd_handler *)data;
M
openbox/event.h
→
openbox/event.h
@@ -7,21 +7,21 @@ /*! Time at which the last event with a timestamp occured. */
extern Time event_lasttime; /*! The value of the mask for the NumLock modifier */ -extern unsigned int NumLockMask; +extern guint NumLockMask; /*! The value of the mask for the ScrollLock modifier */ -extern unsigned int ScrollLockMask; +extern guint ScrollLockMask; void event_startup(); void event_shutdown(); typedef struct event_fd_handler { - int fd; - void *data; - void (*handler)(int fd, void *data); + gint fd; + gpointer data; + void (*handler)(gint fd, gpointer data); } event_fd_handler; void event_add_fd_handler(event_fd_handler *handler); -void event_remove_fd(int n); +void event_remove_fd(gint n); void event_loop();