aboutsummaryrefslogtreecommitdiff
path: root/src/transport-bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport-bar.c')
-rw-r--r--src/transport-bar.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/transport-bar.c b/src/transport-bar.c
index ef1edb4..8573cae 100644
--- a/src/transport-bar.c
+++ b/src/transport-bar.c
@@ -24,11 +24,16 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <glib/gi18n.h>
#include "transport-bar.h"
#include "common-defs.h"
+#include <gtk/gtk.h>
typedef struct _TransportBarPrivate TransportBarPrivate;
struct _TransportBarPrivate
{
+ GtkWidget* hBox;
+ GtkWidget* previous_button;
+ GtkWidget* play_button;
+ GtkWidget* next_button;
};
#define TRANSPORT_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRANSPORT_BAR_TYPE, TransportBarPrivate))
@@ -38,7 +43,6 @@ static void transport_bar_class_init (TransportBarClass *klass);
static void transport_bar_init (TransportBar *self);
static void transport_bar_dispose (GObject *object);
static void transport_bar_finalize (GObject *object);
-//static void handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);
G_DEFINE_TYPE (TransportBar, transport_bar, DBUSMENU_TYPE_MENUITEM);
static void
@@ -51,8 +55,6 @@ transport_bar_class_init (TransportBarClass *klass)
object_class->dispose = transport_bar_dispose;
object_class->finalize = transport_bar_finalize;
- //DbusmenuMenuitemClass * mclass = DBUSMENU_MENUITEM_CLASS(klass);
- //mclass->handle_event = handle_event;
return;
}
@@ -60,6 +62,13 @@ static void
transport_bar_init (TransportBar *self)
{
g_debug("Building new Transport Item");
+ hBox = gtk_hbox_new(TRUE, 2));
+ previous_button = gtk_button_new_with_label("Previous"));
+ next_button = gtk_button_new_with_label("Next"));
+ play_button = gtk_button_new_with_label("Play"));
+ gtk_container_add((GtkContainer*) hBox, previous_button);
+ gtk_container_add((GtkContainer*) hBox, next_button);
+ gtk_container_add((GtkContainer*) hBox, play_button);
return;
}
@@ -76,19 +85,9 @@ transport_bar_finalize (GObject *object)
G_OBJECT_CLASS (transport_bar_parent_class)->finalize (object);
}
-
-//static void
-//handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp)
-//{
-// g_debug("TransportBar -> handle event caught!");
-//}
-
-
-
TransportBar*
transport_bar_new()
{
TransportBar *self = g_object_new(TRANSPORT_BAR_TYPE, NULL);
- //dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_TRANSPORT_MENUITEM_TYPE);
return self;
}