aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/transport-widget.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c
index b3f2ee1..2c32315 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -35,9 +35,7 @@ typedef struct _TransportWidgetPrivate TransportWidgetPrivate;
struct _TransportWidgetPrivate
{
GtkWidget* hbox;
- //GtkWidget* previous_button;
GtkWidget* play_button;
- //GtkWidget* next_button;
};
enum {
@@ -63,15 +61,6 @@ static gboolean transport_widget_button_press_event (GtkWidget *men
GdkEventButton *event);
static gboolean transport_widget_button_release_event (GtkWidget *menuitem,
GdkEventButton *event);
-//static gboolean transport_widget_play_button_press_event (GtkWidget *widget,
-// GdkEventButton *event,
-// gpointer user_data);
-//static gboolean transport_widget_previous_button_press_event (GtkWidget *widget,
-// GdkEventButton *event,
-// gpointer user_data);
-//static gboolean transport_widget_next_button_press_event (GtkWidget *widget,
-// GdkEventButton *event,
-// gpointer user_data);
static void transport_widget_update_state(DbusmenuMenuitem* item,
gchar * property,
@@ -141,17 +130,10 @@ transport_widget_init (TransportWidget *self)
GtkWidget *hbox;
hbox = gtk_hbox_new(TRUE, 2);
- //priv->previous_button = gtk_button_new_with_label("<<");
- //priv->next_button = gtk_button_new_with_label(">>");
priv->play_button = gtk_button_new_with_label(">");
- //gtk_box_pack_start (GTK_BOX (hbox), priv->previous_button, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), priv->play_button, FALSE, TRUE, 0);
- //gtk_box_pack_start (GTK_BOX (hbox), priv->next_button, FALSE, TRUE, 0);
- //g_signal_connect(GTK_OBJECT(priv->play_button), "button-press-event", G_CALLBACK(transport_widget_play_button_press_event), priv->play_button);
- //g_signal_connect(GTK_OBJECT(priv->previous_button), "button-press-event", G_CALLBACK(transport_widget_previous_button_press_event), NULL);
- //g_signal_connect(GTK_OBJECT(priv->next_button), "button-press-event", G_CALLBACK(transport_widget_next_button_press_event), NULL);
priv->hbox = hbox;
@@ -159,11 +141,6 @@ transport_widget_init (TransportWidget *self)
gtk_container_add (GTK_CONTAINER (self), priv->hbox);
- //GtkWidget* parent = gtk_widget_get_parent(GTK_WIDGET(priv->hbox));
- //if (GTK_IS_MENU_ITEM(parent)){
- // g_debug("as expected the transport item is the parent");
- //}
- //gtk_widget_set_parent(GTK_WIDGET(priv->hbox), GTK_WIDGET(self));
gtk_widget_show_all (priv->hbox);
}
@@ -187,20 +164,6 @@ transport_widget_button_press_event (GtkWidget *menuitem,
g_debug("TransportWidget::menu_press_event");
TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE(TRANSPORT_WIDGET(menuitem));
gtk_button_set_label(GTK_BUTTON(priv->play_button), g_strdup(transport_widget_determine_play_label(gtk_button_get_label(GTK_BUTTON(priv->play_button)))));
-
- //gtk_button_pressed(GTK_BUTTON(priv->play_button));
- //gtk_button_pressed(GTK_BUTTON(priv->previous_button));
- //gtk_button_pressed(GTK_BUTTON(priv->next_button));
-
- //if (event->type == GDK_BUTTON_PRESS) {
- //GdkEventButton *bevent = (GdkEventButton *) event;
- //gtk_button_pressed(bevent->button);
-//gtk_menu_popup (GTK_MENU (menuitem), NULL, NULL, NULL, NULL,
-// bevent->button, bevent->time);
- /* Tell calling code that we have handled this event; the buck
- * stops here. */
- //return TRUE;
- //}
return TRUE;
}
@@ -213,34 +176,6 @@ transport_widget_button_release_event (GtkWidget *menuitem,
return TRUE;
}
-/* Individual keyevents on the buttons */
-//static gboolean
-//transport_widget_play_button_press_event( GtkWidget* widget,
-// GdkEventButton *event,
-// gpointer user_data)
-//{
-// g_debug("!!!!! TransportWidget::PLAY button_press_event");
-// return TRUE;
-//}
-
-//static gboolean
-//transport_widget_previous_button_press_event( GtkWidget* widget,
-// GdkEventButton *event,
-// gpointer user_data)
-//{
-// g_debug("!!!!! TransportWidget::PREVIOUS button_press_event");
-// return TRUE;
-//}
-
-//static gboolean
-//transport_widget_next_button_press_event( GtkWidget* widget,
-// GdkEventButton *event,
-// gpointer user_data)
-//{
-// g_debug("!!!!! TransportWidget::NEXT button_press_event");
-// return TRUE;
-//}
-
/**
* transport_widget_update_state()
* Callback for updates from the other side of dbus
@@ -262,9 +197,6 @@ static void transport_widget_update_state(DbusmenuMenuitem* item, gchar* propert
static gchar* transport_widget_determine_play_label(const gchar* state)
{
gchar* label = ">";
- //if(g_strcmp0(state, "||") == 0){
- // label = "||";
- //}
if(g_strcmp0(state, ">") == 0){
label = "||";
}