X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/96295b258d742325bbc9353775d26ed35e9f69dc..02d50cbd5926b4ef1f88c6f9ca28486fa45508c0:/disobedience/menu.c diff --git a/disobedience/menu.c b/disobedience/menu.c index d248b3f..435aeb4 100644 --- a/disobedience/menu.c +++ b/disobedience/menu.c @@ -35,7 +35,7 @@ static GtkWidget *menu_minimode_widget; GtkItemFactory *mainmenufactory; /** @brief Set for full mode, clear for mini mode */ -int full_mode; +int full_mode = 1; static void about_popup_got_version(void *v, const char *err, @@ -182,7 +182,7 @@ static void about_popup_got_version(void attribute((unused)) *v, FALSE/*fill*/, 1/*padding*/); gtk_box_pack_start(GTK_BOX(vbox), - gtk_label_new("\xC2\xA9 2004-2009 Richard Kettlewell"), + gtk_label_new("\xC2\xA9 2003-2011 Richard Kettlewell et al"), FALSE/*expand*/, FALSE/*fill*/, 1/*padding*/); @@ -283,8 +283,8 @@ GtkWidget *menubar(GtkWidget *w) { (char *)"A", /* accelerator */ menu_tab_action, /* callback */ offsetof(struct tabtype, selectall_activate), /* callback_action */ - 0, /* item_type */ - 0 /* extra_data */ + (char *)"", /* item_type */ + GTK_STOCK_SELECT_ALL, /* extra_data */ }, { (char *)"/Edit/Deselect all tracks", /* path */ @@ -299,8 +299,8 @@ GtkWidget *menubar(GtkWidget *w) { 0, /* accelerator */ menu_tab_action, /* callback */ offsetof(struct tabtype, properties_activate), /* callback_action */ - 0, /* item_type */ - 0 /* extra_data */ + (char *)"", /* item_type */ + GTK_STOCK_PROPERTIES, /* extra_data */ }, { (char *)"/Edit/Edit playlists", /* path */ @@ -325,8 +325,8 @@ GtkWidget *menubar(GtkWidget *w) { (char *)"S", /* accelerator */ 0, /* callback */ 0, /* callback_action */ - 0, /* item_type */ - 0 /* extra_data */ + (char *)"", /* item_type */ + GTK_STOCK_STOP, /* extra_data */ }, { (char *)"/Control/Playing", /* path */ @@ -352,7 +352,6 @@ GtkWidget *menubar(GtkWidget *w) { (char *)"", /* item_type */ 0 /* extra_data */ }, -#if 0 { (char *)"/Control/Compact mode", /* path */ (char *)"M", /* accelerator */ @@ -361,7 +360,14 @@ GtkWidget *menubar(GtkWidget *w) { (char *)"", /* item_type */ 0 /* extra_data */ }, -#endif + { + (char *)"/Control/Global Preferences", /* path */ + (char *)"G", /* accelerator */ + popup_globals, /* callback */ + 0, /* callback_action */ + 0, /* item_type */ + 0 /* extra_data */ + }, { (char *)"/Control/Activate playlist", /* path */ 0, /* accelerator */ @@ -384,8 +390,8 @@ GtkWidget *menubar(GtkWidget *w) { 0, /* accelerator */ manual_popup, /* callback */ 0, /* callback_action */ - 0, /* item_type */ - 0 /* extra_data */ + (char *)"", /* item_type */ + GTK_STOCK_HELP, /* extra_data */ }, { (char *)"/Help/About DisOrder", /* path */ @@ -446,8 +452,11 @@ GtkWidget *menubar(GtkWidget *w) { static void toggled_minimode(GtkCheckMenuItem *item, gpointer attribute((unused)) userdata) { - full_mode = !gtk_check_menu_item_get_active(item); - event_raise("mini-mode-changed", NULL); + int new_full_mode = !gtk_check_menu_item_get_active(item); + if(full_mode != new_full_mode) { + full_mode = new_full_mode; + event_raise("mini-mode-changed", NULL); + } } /*