diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-06-08 18:09:48 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-06-08 18:09:48 +0100 |
commit | 744083d4483291a87f4f348d6937257d8887cfb1 (patch) | |
tree | c2392de21bc615dfafa57d6a9076e4c8d30b09f1 /src/transport-bar.c | |
parent | 5a9881a144df8a9c36f9d5b96ea53e872c76949b (diff) | |
download | ayatana-indicator-sound-744083d4483291a87f4f348d6937257d8887cfb1.tar.gz ayatana-indicator-sound-744083d4483291a87f4f348d6937257d8887cfb1.tar.bz2 ayatana-indicator-sound-744083d4483291a87f4f348d6937257d8887cfb1.zip |
moving in the right direction
Diffstat (limited to 'src/transport-bar.c')
-rw-r--r-- | src/transport-bar.c | 25 |
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; } |