diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-06-11 08:59:06 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-06-11 08:59:06 +0100 |
commit | da91c666d6b66163077ddb9e59bf556fb4d44953 (patch) | |
tree | 69d854aa7ed83e14e6302c2085c748f2a4f86f63 /src/transport-bar.c | |
parent | 50497b6b375cb96b77ed1700f58b8b8991f4c1ae (diff) | |
download | ayatana-indicator-sound-da91c666d6b66163077ddb9e59bf556fb4d44953.tar.gz ayatana-indicator-sound-da91c666d6b66163077ddb9e59bf556fb4d44953.tar.bz2 ayatana-indicator-sound-da91c666d6b66163077ddb9e59bf556fb4d44953.zip |
Diffstat (limited to 'src/transport-bar.c')
-rw-r--r-- | src/transport-bar.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/src/transport-bar.c b/src/transport-bar.c index aa618d2..46611dc 100644 --- a/src/transport-bar.c +++ b/src/transport-bar.c @@ -26,6 +26,9 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "common-defs.h" #include <gtk/gtk.h> +// TODO: think about leakage: ted ! + + typedef struct _TransportBarPrivate TransportBarPrivate; struct _TransportBarPrivate @@ -59,10 +62,11 @@ static gboolean transport_bar_button_press_event (GtkWidget *menuite GdkEventButton *event); static gboolean transport_bar_button_release_event (GtkWidget *menuitem, GdkEventButton *event); -static gboolean transport_bar_play_button_trigger (GtkWidget* widget, - GdkEventButton *event, - gpointer user_data); - +static gboolean transport_bar_play_button_trigger (GtkWidget *widget, + GdkEventButton *event, + gpointer user_data); +static void transport_bar_update_state(gchar * property, + GValue * value); G_DEFINE_TYPE (TransportBar, transport_bar, GTK_TYPE_MENU_ITEM); @@ -132,19 +136,22 @@ transport_bar_init (TransportBar *self) gtk_box_pack_start (GTK_BOX (hbox), priv->next_button, FALSE, FALSE, 0); g_signal_connect(priv->play_button, "button-press-event", G_CALLBACK(transport_bar_play_button_trigger), NULL); - - priv->hbox = hbox; + + g_signal_connect(DBUSMENU_MENUITEM(self), "property-changed", G_CALLBACK(transport_bar_update_state), NULL); gtk_widget_show_all (priv->hbox); gtk_container_add (GTK_CONTAINER (self), hbox); - } static void transport_bar_dispose (GObject *object) { + //if(IS_TRANSPORT_BAR(object) == TRUE){ + // TransportBarPrivate * priv = TRANSPORT_BAR_GET_PRIVATE(TRANSPORT_BAR(object)); + // g_object_unref(priv->previous_button); + //} G_OBJECT_CLASS (transport_bar_parent_class)->dispose (object); } @@ -174,13 +181,22 @@ transport_bar_button_release_event (GtkWidget *menuitem, /* Individual keyevents on the buttons */ static gboolean transport_bar_play_button_trigger(GtkWidget* widget, - GdkEventButton *event, - gpointer user_data) + GdkEventButton *event, + gpointer user_data) { g_debug("TransportBar::PLAY button_press_event"); return FALSE; } +static void transport_bar_update_state(gchar *property, GValue *value) +{ + g_debug("transport_bar_update_state - %s", property); +} + +void transport_bar_connect_with_other_half(TransportBar *self, DbusmenuMenuitem *twin_item) +{ + +} /** * transport_new: * @returns: a new #TransportBar. |