summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-06 16:32:58 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-06 16:32:58 +0200
commitb94678c14fc637f565f8c1ec5792f80b5b3ee29c (patch)
tree9f856751fce8157d58f584d4ea875974929f7ec4 /plugins
parent9e4d69200d94755cd500b2e5fc809667d7ea3fe6 (diff)
gtkui: removed view->menu bar ; fixed show/hide menu bar hotkey
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/callbacks.c11
-rw-r--r--plugins/gtkui/deadbeef.glade28
-rw-r--r--plugins/gtkui/gtkui.c9
-rw-r--r--plugins/gtkui/interface.c100
4 files changed, 63 insertions, 85 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index ed56f742..dca77f97 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -810,14 +810,3 @@ on_design_mode1_activate (GtkMenuItem *menuitem,
w_set_design_mode (act ? 1 : 0);
}
-
-
-
-void
-on_menu_bar1_activate (GtkMenuItem *menuitem,
- gpointer user_data)
-{
- action_toggle_menu_handler_cb (NULL);
-}
-
-
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index 79596dda..a44f3bde 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -61,7 +61,7 @@
<signal name="activate" handler="on_open_activate" last_modification_time="Sat, 04 Jul 2009 12:57:58 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image629">
+ <widget class="GtkImage" id="image639">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
@@ -88,7 +88,7 @@
<signal name="activate" handler="on_add_files_activate" last_modification_time="Sat, 04 Jul 2009 13:04:01 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image630">
+ <widget class="GtkImage" id="image640">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@@ -109,7 +109,7 @@
<signal name="activate" handler="on_add_folders_activate" last_modification_time="Sun, 06 Sep 2009 17:51:40 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image631">
+ <widget class="GtkImage" id="image641">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@@ -178,7 +178,7 @@
<signal name="activate" handler="on_quit_activate" last_modification_time="Sat, 04 Jul 2009 12:57:58 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image632">
+ <widget class="GtkImage" id="image642">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
@@ -212,7 +212,7 @@
<signal name="activate" handler="on_clear1_activate" last_modification_time="Sun, 06 Sep 2009 18:30:03 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image633">
+ <widget class="GtkImage" id="image643">
<property name="visible">True</property>
<property name="stock">gtk-clear</property>
<property name="icon_size">1</property>
@@ -269,7 +269,7 @@
<signal name="activate" handler="on_remove1_activate" last_modification_time="Sun, 06 Sep 2009 18:30:03 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image634">
+ <widget class="GtkImage" id="image644">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
@@ -419,16 +419,6 @@
</child>
<child>
- <widget class="GtkCheckMenuItem" id="menu_bar1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Menu bar</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <signal name="activate" handler="on_menu_bar1_activate" last_modification_time="Sun, 18 Nov 2012 21:24:30 GMT"/>
- </widget>
- </child>
-
- <child>
<widget class="GtkCheckMenuItem" id="view_tabs">
<property name="visible">True</property>
<property name="label" translatable="yes">Tabs</property>
@@ -638,7 +628,7 @@
<signal name="activate" handler="on_help1_activate" last_modification_time="Tue, 08 Sep 2009 17:32:06 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image635">
+ <widget class="GtkImage" id="image645">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon_size">1</property>
@@ -698,7 +688,7 @@
<signal name="activate" handler="on_about1_activate" last_modification_time="Sat, 04 Jul 2009 12:57:58 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image636">
+ <widget class="GtkImage" id="image646">
<property name="visible">True</property>
<property name="stock">gtk-about</property>
<property name="icon_size">1</property>
@@ -719,7 +709,7 @@
<signal name="activate" handler="on_translators1_activate" last_modification_time="Sun, 19 Sep 2010 13:38:07 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image637">
+ <widget class="GtkImage" id="image647">
<property name="visible">True</property>
<property name="stock">gtk-about</property>
<property name="icon_size">1</property>
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index c0ff834b..b7866b49 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -1074,6 +1074,15 @@ gtkui_thread (void *ctx) {
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (sb_mi), FALSE);
gtk_widget_hide (sb);
}
+
+ GtkWidget *menu = lookup_widget (mainwin, "menubar");
+ if (deadbeef->conf_get_int ("gtkui.show_menu", 1)) {
+ gtk_widget_show (menu);
+ }
+ else {
+ gtk_widget_hide (menu);
+ }
+
searchwin = create_searchwin ();
gtk_window_set_transient_for (GTK_WINDOW (searchwin), GTK_WINDOW (mainwin));
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index 44e4130d..4600ff2d 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -35,12 +35,12 @@ create_mainwin (void)
GtkWidget *File;
GtkWidget *File_menu;
GtkWidget *open;
- GtkWidget *image629;
+ GtkWidget *image639;
GtkWidget *separator2;
GtkWidget *add_files;
- GtkWidget *image630;
+ GtkWidget *image640;
GtkWidget *add_folders;
- GtkWidget *image631;
+ GtkWidget *image641;
GtkWidget *add_location1;
GtkWidget *separatormenuitem1;
GtkWidget *new_playlist1;
@@ -48,18 +48,18 @@ create_mainwin (void)
GtkWidget *playlist_save_as;
GtkWidget *separator8;
GtkWidget *quit;
- GtkWidget *image632;
+ GtkWidget *image642;
GtkWidget *Edit;
GtkWidget *Edit_menu;
GtkWidget *clear1;
- GtkWidget *image633;
+ GtkWidget *image643;
GtkWidget *select_all1;
GtkWidget *deselect_all1;
GtkWidget *invert_selection1;
GtkWidget *Selection;
GtkWidget *Selection_menu;
GtkWidget *remove1;
- GtkWidget *image634;
+ GtkWidget *image644;
GtkWidget *crop1;
GtkWidget *find1;
GtkWidget *sort_by1;
@@ -76,7 +76,6 @@ create_mainwin (void)
GtkWidget *View;
GtkWidget *View_menu;
GtkWidget *view_status_bar;
- GtkWidget *menu_bar1;
GtkWidget *view_tabs;
GtkWidget *view_eq;
GtkWidget *design_mode1;
@@ -103,16 +102,16 @@ create_mainwin (void)
GtkWidget *Help;
GtkWidget *Help_menu;
GtkWidget *help1;
- GtkWidget *image635;
+ GtkWidget *image645;
GtkWidget *changelog1;
GtkWidget *separator10;
GtkWidget *gpl1;
GtkWidget *lgpl1;
GtkWidget *separator9;
GtkWidget *about1;
- GtkWidget *image636;
+ GtkWidget *image646;
GtkWidget *translators1;
- GtkWidget *image637;
+ GtkWidget *image647;
GtkWidget *hbox2;
GtkWidget *hbox3;
GtkWidget *stopbtn;
@@ -154,9 +153,9 @@ create_mainwin (void)
gtk_widget_show (open);
gtk_container_add (GTK_CONTAINER (File_menu), open);
- image629 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image629);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (open), image629);
+ image639 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image639);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (open), image639);
separator2 = gtk_separator_menu_item_new ();
gtk_widget_show (separator2);
@@ -167,17 +166,17 @@ create_mainwin (void)
gtk_widget_show (add_files);
gtk_container_add (GTK_CONTAINER (File_menu), add_files);
- image630 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image630);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_files), image630);
+ image640 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image640);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_files), image640);
add_folders = gtk_image_menu_item_new_with_mnemonic (_("Add folder(s)"));
gtk_widget_show (add_folders);
gtk_container_add (GTK_CONTAINER (File_menu), add_folders);
- image631 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image631);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_folders), image631);
+ image641 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image641);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_folders), image641);
add_location1 = gtk_menu_item_new_with_mnemonic (_("Add location"));
gtk_widget_show (add_location1);
@@ -209,9 +208,9 @@ create_mainwin (void)
gtk_widget_show (quit);
gtk_container_add (GTK_CONTAINER (File_menu), quit);
- image632 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image632);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (quit), image632);
+ image642 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image642);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (quit), image642);
Edit = gtk_menu_item_new_with_mnemonic (_("_Edit"));
gtk_widget_show (Edit);
@@ -224,9 +223,9 @@ create_mainwin (void)
gtk_widget_show (clear1);
gtk_container_add (GTK_CONTAINER (Edit_menu), clear1);
- image633 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image633);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (clear1), image633);
+ image643 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image643);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (clear1), image643);
select_all1 = gtk_menu_item_new_with_mnemonic (_("Select all"));
gtk_widget_show (select_all1);
@@ -251,9 +250,9 @@ create_mainwin (void)
gtk_widget_show (remove1);
gtk_container_add (GTK_CONTAINER (Selection_menu), remove1);
- image634 = gtk_image_new_from_stock ("gtk-remove", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image634);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (remove1), image634);
+ image644 = gtk_image_new_from_stock ("gtk-remove", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image644);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (remove1), image644);
crop1 = gtk_menu_item_new_with_mnemonic (_("Crop"));
gtk_widget_show (crop1);
@@ -318,11 +317,6 @@ create_mainwin (void)
gtk_widget_show (view_status_bar);
gtk_container_add (GTK_CONTAINER (View_menu), view_status_bar);
- menu_bar1 = gtk_check_menu_item_new_with_mnemonic (_("Menu bar"));
- gtk_widget_show (menu_bar1);
- gtk_container_add (GTK_CONTAINER (View_menu), menu_bar1);
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_bar1), TRUE);
-
view_tabs = gtk_check_menu_item_new_with_mnemonic (_("Tabs"));
gtk_widget_show (view_tabs);
gtk_container_add (GTK_CONTAINER (View_menu), view_tabs);
@@ -431,9 +425,9 @@ create_mainwin (void)
gtk_widget_show (help1);
gtk_container_add (GTK_CONTAINER (Help_menu), help1);
- image635 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image635);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image635);
+ image645 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image645);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image645);
changelog1 = gtk_menu_item_new_with_mnemonic (_("_ChangeLog"));
gtk_widget_show (changelog1);
@@ -461,17 +455,17 @@ create_mainwin (void)
gtk_widget_show (about1);
gtk_container_add (GTK_CONTAINER (Help_menu), about1);
- image636 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image636);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (about1), image636);
+ image646 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image646);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (about1), image646);
translators1 = gtk_image_menu_item_new_with_mnemonic (_("_Translators"));
gtk_widget_show (translators1);
gtk_container_add (GTK_CONTAINER (Help_menu), translators1);
- image637 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image637);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (translators1), image637);
+ image647 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image647);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (translators1), image647);
hbox2 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox2);
@@ -652,9 +646,6 @@ create_mainwin (void)
g_signal_connect ((gpointer) view_status_bar, "activate",
G_CALLBACK (on_toggle_status_bar_activate),
NULL);
- g_signal_connect ((gpointer) menu_bar1, "activate",
- G_CALLBACK (on_menu_bar1_activate),
- NULL);
g_signal_connect ((gpointer) view_tabs, "activate",
G_CALLBACK (on_toggle_tabs),
NULL);
@@ -738,12 +729,12 @@ create_mainwin (void)
GLADE_HOOKUP_OBJECT (mainwin, File, "File");
GLADE_HOOKUP_OBJECT (mainwin, File_menu, "File_menu");
GLADE_HOOKUP_OBJECT (mainwin, open, "open");
- GLADE_HOOKUP_OBJECT (mainwin, image629, "image629");
+ GLADE_HOOKUP_OBJECT (mainwin, image639, "image639");
GLADE_HOOKUP_OBJECT (mainwin, separator2, "separator2");
GLADE_HOOKUP_OBJECT (mainwin, add_files, "add_files");
- GLADE_HOOKUP_OBJECT (mainwin, image630, "image630");
+ GLADE_HOOKUP_OBJECT (mainwin, image640, "image640");
GLADE_HOOKUP_OBJECT (mainwin, add_folders, "add_folders");
- GLADE_HOOKUP_OBJECT (mainwin, image631, "image631");
+ GLADE_HOOKUP_OBJECT (mainwin, image641, "image641");
GLADE_HOOKUP_OBJECT (mainwin, add_location1, "add_location1");
GLADE_HOOKUP_OBJECT (mainwin, separatormenuitem1, "separatormenuitem1");
GLADE_HOOKUP_OBJECT (mainwin, new_playlist1, "new_playlist1");
@@ -751,18 +742,18 @@ create_mainwin (void)
GLADE_HOOKUP_OBJECT (mainwin, playlist_save_as, "playlist_save_as");
GLADE_HOOKUP_OBJECT (mainwin, separator8, "separator8");
GLADE_HOOKUP_OBJECT (mainwin, quit, "quit");
- GLADE_HOOKUP_OBJECT (mainwin, image632, "image632");
+ GLADE_HOOKUP_OBJECT (mainwin, image642, "image642");
GLADE_HOOKUP_OBJECT (mainwin, Edit, "Edit");
GLADE_HOOKUP_OBJECT (mainwin, Edit_menu, "Edit_menu");
GLADE_HOOKUP_OBJECT (mainwin, clear1, "clear1");
- GLADE_HOOKUP_OBJECT (mainwin, image633, "image633");
+ GLADE_HOOKUP_OBJECT (mainwin, image643, "image643");
GLADE_HOOKUP_OBJECT (mainwin, select_all1, "select_all1");
GLADE_HOOKUP_OBJECT (mainwin, deselect_all1, "deselect_all1");
GLADE_HOOKUP_OBJECT (mainwin, invert_selection1, "invert_selection1");
GLADE_HOOKUP_OBJECT (mainwin, Selection, "Selection");
GLADE_HOOKUP_OBJECT (mainwin, Selection_menu, "Selection_menu");
GLADE_HOOKUP_OBJECT (mainwin, remove1, "remove1");
- GLADE_HOOKUP_OBJECT (mainwin, image634, "image634");
+ GLADE_HOOKUP_OBJECT (mainwin, image644, "image644");
GLADE_HOOKUP_OBJECT (mainwin, crop1, "crop1");
GLADE_HOOKUP_OBJECT (mainwin, find1, "find1");
GLADE_HOOKUP_OBJECT (mainwin, sort_by1, "sort_by1");
@@ -779,7 +770,6 @@ create_mainwin (void)
GLADE_HOOKUP_OBJECT (mainwin, View, "View");
GLADE_HOOKUP_OBJECT (mainwin, View_menu, "View_menu");
GLADE_HOOKUP_OBJECT (mainwin, view_status_bar, "view_status_bar");
- GLADE_HOOKUP_OBJECT (mainwin, menu_bar1, "menu_bar1");
GLADE_HOOKUP_OBJECT (mainwin, view_tabs, "view_tabs");
GLADE_HOOKUP_OBJECT (mainwin, view_eq, "view_eq");
GLADE_HOOKUP_OBJECT (mainwin, design_mode1, "design_mode1");
@@ -804,16 +794,16 @@ create_mainwin (void)
GLADE_HOOKUP_OBJECT (mainwin, Help, "Help");
GLADE_HOOKUP_OBJECT (mainwin, Help_menu, "Help_menu");
GLADE_HOOKUP_OBJECT (mainwin, help1, "help1");
- GLADE_HOOKUP_OBJECT (mainwin, image635, "image635");
+ GLADE_HOOKUP_OBJECT (mainwin, image645, "image645");
GLADE_HOOKUP_OBJECT (mainwin, changelog1, "changelog1");
GLADE_HOOKUP_OBJECT (mainwin, separator10, "separator10");
GLADE_HOOKUP_OBJECT (mainwin, gpl1, "gpl1");
GLADE_HOOKUP_OBJECT (mainwin, lgpl1, "lgpl1");
GLADE_HOOKUP_OBJECT (mainwin, separator9, "separator9");
GLADE_HOOKUP_OBJECT (mainwin, about1, "about1");
- GLADE_HOOKUP_OBJECT (mainwin, image636, "image636");
+ GLADE_HOOKUP_OBJECT (mainwin, image646, "image646");
GLADE_HOOKUP_OBJECT (mainwin, translators1, "translators1");
- GLADE_HOOKUP_OBJECT (mainwin, image637, "image637");
+ GLADE_HOOKUP_OBJECT (mainwin, image647, "image647");
GLADE_HOOKUP_OBJECT (mainwin, hbox2, "hbox2");
GLADE_HOOKUP_OBJECT (mainwin, hbox3, "hbox3");
GLADE_HOOKUP_OBJECT (mainwin, stopbtn, "stopbtn");