diff options
author | 2012-11-18 21:13:38 +0100 | |
---|---|---|
committer | 2012-11-18 21:13:38 +0100 | |
commit | 2a3845d0b8a9a8d0d08cc1c17699ee8cf7a702ee (patch) | |
tree | 15da6b335070dccb03f87a3d98d053f70c92e006 /plugins/gtkui | |
parent | ce61239ec9771efb95790bbbb349ecfdf21f1ac9 (diff) |
gtkui: fixed play and pause hotkeys; removed button accelerators from toolbar
Diffstat (limited to 'plugins/gtkui')
-rw-r--r-- | plugins/gtkui/deadbeef.glade | 9 | ||||
-rw-r--r-- | plugins/gtkui/gtkui.c | 4 | ||||
-rw-r--r-- | plugins/gtkui/interface.c | 30 |
3 files changed, 4 insertions, 39 deletions
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade index cc9747a7..1eb07f49 100644 --- a/plugins/gtkui/deadbeef.glade +++ b/plugins/gtkui/deadbeef.glade @@ -761,7 +761,6 @@ <property name="relief">GTK_RELIEF_NONE</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="on_stopbtn_clicked" last_modification_time="Sun, 05 Jul 2009 10:48:41 GMT"/> - <accelerator key="v" modifiers="0" signal="activate"/> <child> <widget class="GtkImage" id="image128"> @@ -788,9 +787,6 @@ <property name="relief">GTK_RELIEF_NONE</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="on_playbtn_clicked" last_modification_time="Sun, 05 Jul 2009 10:48:53 GMT"/> - <accelerator key="x" modifiers="0" signal="activate"/> - <accelerator key="Return" modifiers="0" signal="activate"/> - <accelerator key="KP_Enter" modifiers="0" signal="activate"/> <child> <widget class="GtkImage" id="image2"> @@ -817,8 +813,6 @@ <property name="relief">GTK_RELIEF_NONE</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="on_pausebtn_clicked" last_modification_time="Sun, 05 Jul 2009 10:49:01 GMT"/> - <accelerator key="c" modifiers="0" signal="activate"/> - <accelerator key="p" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child> <widget class="GtkImage" id="image3"> @@ -845,7 +839,6 @@ <property name="relief">GTK_RELIEF_NONE</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="on_prevbtn_clicked" last_modification_time="Sun, 05 Jul 2009 10:49:08 GMT"/> - <accelerator key="z" modifiers="0" signal="activate"/> <child> <widget class="GtkImage" id="image4"> @@ -872,7 +865,6 @@ <property name="relief">GTK_RELIEF_NONE</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="on_nextbtn_clicked" last_modification_time="Sun, 05 Jul 2009 10:49:12 GMT"/> - <accelerator key="b" modifiers="0" signal="activate"/> <child> <widget class="GtkImage" id="image5"> @@ -4988,7 +4980,6 @@ SOCKS5_HOSTNAME</property> <widget class="GtkVPaned" id="vpaned1"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="position">0</property> <child> <widget class="GtkVBox" id="vbox36"> diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 742cc1e5..fb8d7979 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -1077,6 +1077,10 @@ gtkui_thread (void *ctx) { deadbeef->conf_set_str ("hotkey.key9", "\"F1\" 0 0 help"); deadbeef->conf_set_str ("hotkey.key10", "\"Delete\" 1 0 remove_from_playlist"); deadbeef->conf_set_str ("hotkey.key11", "\"Ctrl w\" 0 0 remove_current_playlist"); + deadbeef->conf_set_str ("hotkey.key11", "\"Ctrl w\" 0 0 remove_current_playlist"); + deadbeef->conf_set_str ("hotkey.key11", "\"Ctrl w\" 0 0 remove_current_playlist"); + deadbeef->conf_set_str ("hotkey.key14", "\"Return\" 0 0 play"); + deadbeef->conf_set_str ("hotkey.key15", "\"Ctrl p\" 0 0 toggle_pause"); } // construct mainwindow widgets diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c index f144c704..95268ed4 100644 --- a/plugins/gtkui/interface.c +++ b/plugins/gtkui/interface.c @@ -129,9 +129,6 @@ create_mainwin (void) GtkWidget *volumebar; GtkWidget *plugins_bottom_vbox; GtkWidget *statusbar; - GtkAccelGroup *accel_group; - - accel_group = gtk_accel_group_new (); mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_events (mainwin, GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK); @@ -487,9 +484,6 @@ create_mainwin (void) gtk_widget_show (stopbtn); gtk_box_pack_start (GTK_BOX (hbox3), stopbtn, FALSE, FALSE, 0); gtk_widget_set_can_focus(stopbtn, FALSE); - gtk_widget_add_accelerator (stopbtn, "activate", accel_group, - GDK_v, (GdkModifierType) 0, - GTK_ACCEL_VISIBLE); gtk_button_set_relief (GTK_BUTTON (stopbtn), GTK_RELIEF_NONE); image128 = gtk_image_new_from_stock ("gtk-media-stop", GTK_ICON_SIZE_BUTTON); @@ -500,15 +494,6 @@ create_mainwin (void) gtk_widget_show (playbtn); gtk_box_pack_start (GTK_BOX (hbox3), playbtn, FALSE, FALSE, 0); gtk_widget_set_can_focus(playbtn, FALSE); - gtk_widget_add_accelerator (playbtn, "activate", accel_group, - GDK_x, (GdkModifierType) 0, - GTK_ACCEL_VISIBLE); - gtk_widget_add_accelerator (playbtn, "activate", accel_group, - GDK_Return, (GdkModifierType) 0, - GTK_ACCEL_VISIBLE); - gtk_widget_add_accelerator (playbtn, "activate", accel_group, - GDK_KP_Enter, (GdkModifierType) 0, - GTK_ACCEL_VISIBLE); gtk_button_set_relief (GTK_BUTTON (playbtn), GTK_RELIEF_NONE); image2 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON); @@ -519,12 +504,6 @@ create_mainwin (void) gtk_widget_show (pausebtn); gtk_box_pack_start (GTK_BOX (hbox3), pausebtn, FALSE, FALSE, 0); gtk_widget_set_can_focus(pausebtn, FALSE); - gtk_widget_add_accelerator (pausebtn, "activate", accel_group, - GDK_c, (GdkModifierType) 0, - GTK_ACCEL_VISIBLE); - gtk_widget_add_accelerator (pausebtn, "activate", accel_group, - GDK_p, (GdkModifierType) GDK_CONTROL_MASK, - GTK_ACCEL_VISIBLE); gtk_button_set_relief (GTK_BUTTON (pausebtn), GTK_RELIEF_NONE); image3 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON); @@ -535,9 +514,6 @@ create_mainwin (void) gtk_widget_show (prevbtn); gtk_box_pack_start (GTK_BOX (hbox3), prevbtn, FALSE, FALSE, 0); gtk_widget_set_can_focus(prevbtn, FALSE); - gtk_widget_add_accelerator (prevbtn, "activate", accel_group, - GDK_z, (GdkModifierType) 0, - GTK_ACCEL_VISIBLE); gtk_button_set_relief (GTK_BUTTON (prevbtn), GTK_RELIEF_NONE); image4 = gtk_image_new_from_stock ("gtk-media-previous", GTK_ICON_SIZE_BUTTON); @@ -548,9 +524,6 @@ create_mainwin (void) gtk_widget_show (nextbtn); gtk_box_pack_start (GTK_BOX (hbox3), nextbtn, FALSE, FALSE, 0); gtk_widget_set_can_focus(nextbtn, FALSE); - gtk_widget_add_accelerator (nextbtn, "activate", accel_group, - GDK_b, (GdkModifierType) 0, - GTK_ACCEL_VISIBLE); gtk_button_set_relief (GTK_BUTTON (nextbtn), GTK_RELIEF_NONE); image5 = gtk_image_new_from_stock ("gtk-media-next", GTK_ICON_SIZE_BUTTON); @@ -857,8 +830,6 @@ create_mainwin (void) GLADE_HOOKUP_OBJECT (mainwin, plugins_bottom_vbox, "plugins_bottom_vbox"); GLADE_HOOKUP_OBJECT (mainwin, statusbar, "statusbar"); - gtk_window_add_accel_group (GTK_WINDOW (mainwin), accel_group); - return mainwin; } @@ -2480,7 +2451,6 @@ create_prefwin (void) vpaned1 = gtk_vpaned_new (); gtk_widget_show (vpaned1); gtk_container_add (GTK_CONTAINER (notebook), vpaned1); - gtk_paned_set_position (GTK_PANED (vpaned1), 0); vbox36 = gtk_vbox_new (FALSE, 8); gtk_widget_show (vbox36); |