summaryrefslogtreecommitdiff
path: root/plugins/gtkui
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gtkui')
-rw-r--r--plugins/gtkui/callbacks.c92
-rw-r--r--plugins/gtkui/callbacks.h20
-rw-r--r--plugins/gtkui/deadbeef.glade6
-rw-r--r--plugins/gtkui/interface.c12
4 files changed, 1 insertions, 129 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index 51de7a9d..4cb77434 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -572,98 +572,6 @@ on_new_playlist1_activate (GtkMenuItem *menuitem,
}
-static GtkWidget *capture = NULL;
-
-gboolean
-on_mainwin_button_press_event (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
-{
- if (event->window != gtk_widget_get_window (mainwin)) {
- return FALSE;
- }
- GtkWidget *volumebar = lookup_widget (mainwin, "volumebar");
- GtkWidget *seekbar = lookup_widget (mainwin, "seekbar");
- GtkWidget *statusbar = lookup_widget (mainwin, "statusbar");
- GtkAllocation a, b, c;
- gtk_widget_get_allocation (volumebar, &a);
- gtk_widget_get_allocation (seekbar, &b);
- gtk_widget_get_allocation (statusbar, &c);
- if (event->x >= a.x && event->x < a.x + a.width
- && event->y >= a.y && event->y < a.y + a.height) {
- capture = volumebar;
- return gtk_widget_event (volumebar, (GdkEvent *)event);
- }
- else if (event->x >= b.x && event->x < b.x + b.width
- && event->y >= b.y && event->y < b.y + b.height) {
- capture = seekbar;
- return gtk_widget_event (seekbar, (GdkEvent *)event);
- }
- else if (event->x >= c.x && event->x < c.x + c.width
- && event->y >= c.y && event->y < c.y + c.height) {
- if (event->type == GDK_2BUTTON_PRESS) {
- deadbeef->sendmessage (DB_EV_TRACKFOCUSCURRENT, 0, 0, 0);
- }
- }
-
- return FALSE;
-}
-
-
-gboolean
-on_mainwin_button_release_event (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
-{
- if (capture) {
- gboolean res = gtk_widget_event (capture, (GdkEvent *)event);
- capture = NULL;
- return res;
- }
-
- return FALSE;
-}
-
-
-gboolean
-on_mainwin_scroll_event (GtkWidget *widget,
- GdkEvent *ev,
- gpointer user_data)
-{
- GdkEventScroll *event = (GdkEventScroll *)ev;
- if (event->window != gtk_widget_get_window (mainwin)) {
- return FALSE;
- }
- GtkWidget *volumebar = lookup_widget (mainwin, "volumebar");
- GtkWidget *seekbar = lookup_widget (mainwin, "seekbar");
- GtkAllocation a;
- gtk_widget_get_allocation (volumebar, &a);
- GtkAllocation b;
- gtk_widget_get_allocation (seekbar, &b);
- if (event->x >= a.x && event->x < a.x + a.width
- && event->y >= a.y && event->y < a.y + a.height) {
- return gtk_widget_event (volumebar, (GdkEvent *)event);
- }
- else if (event->x >= b.x && event->x < b.x + b.width
- && event->y >= b.y && event->y < b.y + b.height) {
- return gtk_widget_event (seekbar, (GdkEvent *)event);
- }
- return FALSE;
-}
-
-
-gboolean
-on_mainwin_motion_notify_event (GtkWidget *widget,
- GdkEventMotion *event,
- gpointer user_data)
-{
- if (capture) {
- return gtk_widget_event (capture, (GdkEvent *)event);
- }
- return FALSE;
-}
-
-
GtkWidget*
create_seekbar (gchar *widget_name, gchar *string1, gchar *string2,
gint int1, gint int2)
diff --git a/plugins/gtkui/callbacks.h b/plugins/gtkui/callbacks.h
index bbd33f0e..a11b104d 100644
--- a/plugins/gtkui/callbacks.h
+++ b/plugins/gtkui/callbacks.h
@@ -880,26 +880,6 @@ void
on_wv_strip_id3v1_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
-gboolean
-on_mainwin_button_press_event (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data);
-
-gboolean
-on_mainwin_button_release_event (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data);
-
-gboolean
-on_mainwin_scroll_event (GtkWidget *widget,
- GdkEvent *event,
- gpointer user_data);
-
-gboolean
-on_mainwin_motion_notify_event (GtkWidget *widget,
- GdkEventMotion *event,
- gpointer user_data);
-
GtkWidget*
create_seekbar (gchar *widget_name, gchar *string1, gchar *string2,
gint int1, gint int2);
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index b75b4589..949a816c 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -27,10 +27,6 @@
<signal name="configure_event" handler="on_mainwin_configure_event" last_modification_time="Sun, 23 Aug 2009 15:26:53 GMT"/>
<signal name="window_state_event" handler="on_mainwin_window_state_event" last_modification_time="Wed, 09 Dec 2009 19:39:55 GMT"/>
<signal name="realize" handler="on_mainwin_realize" last_modification_time="Wed, 10 Mar 2010 18:20:51 GMT"/>
- <signal name="button_press_event" handler="on_mainwin_button_press_event" last_modification_time="Fri, 09 Apr 2010 19:24:24 GMT"/>
- <signal name="button_release_event" handler="on_mainwin_button_release_event" last_modification_time="Fri, 09 Apr 2010 19:24:31 GMT"/>
- <signal name="scroll_event" handler="on_mainwin_scroll_event" last_modification_time="Fri, 09 Apr 2010 19:24:39 GMT"/>
- <signal name="motion_notify_event" handler="on_mainwin_motion_notify_event" last_modification_time="Fri, 09 Apr 2010 19:24:49 GMT"/>
<child>
<widget class="GtkVBox" id="vbox1">
@@ -582,7 +578,7 @@
</widget>
</child>
- <child>
+ <child>
<widget class="GtkCheckMenuItem" id="stop_after_album">
<property name="visible">True</property>
<property name="label" translatable="yes">Stop after current album</property>
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index 5550996c..d1c9f9f2 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -476,18 +476,6 @@ create_mainwin (void)
g_signal_connect ((gpointer) mainwin, "realize",
G_CALLBACK (on_mainwin_realize),
NULL);
- g_signal_connect ((gpointer) mainwin, "button_press_event",
- G_CALLBACK (on_mainwin_button_press_event),
- NULL);
- g_signal_connect ((gpointer) mainwin, "button_release_event",
- G_CALLBACK (on_mainwin_button_release_event),
- NULL);
- g_signal_connect ((gpointer) mainwin, "scroll_event",
- G_CALLBACK (on_mainwin_scroll_event),
- NULL);
- g_signal_connect ((gpointer) mainwin, "motion_notify_event",
- G_CALLBACK (on_mainwin_motion_notify_event),
- NULL);
g_signal_connect ((gpointer) open, "activate",
G_CALLBACK (on_open_activate),
NULL);