aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rwxr-xr-xsrc/indicator-sound.c2
-rw-r--r--src/music-player-bridge.vala9
-rw-r--r--src/sound-service.c6
-rw-r--r--src/transport-bar.c25
-rw-r--r--src/transport-bar.h4
-rw-r--r--src/transport-menu-item.vala2
7 files changed, 27 insertions, 25 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 716cab2..f7fb1a1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,6 +9,8 @@ soundmenulib_LTLIBRARIES = libsoundmenu.la
libsoundmenu_la_SOURCES = \
common-defs.h \
indicator-sound.h \
+ transport-bar.c \
+ transport-bar.h \
indicator-sound.c \
dbus-shared-names.h \
sound-service-client.h
@@ -88,7 +90,7 @@ indicator_sound_service_SOURCES = \
slider-menu-item.c \
$(music_bridge_VALASOURCES:.vala=.c)
-indicator_sound_service_CFLAGS = $(PULSEAUDIO_CFLAGS) $(SOUNDSERVICE_CFLAGS) $(GCONF_CFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" -Wall -Werror
+indicator_sound_service_CFLAGS = $(PULSEAUDIO_CFLAGS) $(SOUNDSERVICE_CFLAGS) $(GCONF_CFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" -Wall
indicator_sound_service_LDADD = $(PULSEAUDIO_LIBS) $(SOUNDSERVICE_LIBS) $(GCONF_LIBS)
#########################
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 31f023e..e13c52b 100755
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -38,6 +38,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libindicator/indicator-image-helper.h>
#include "indicator-sound.h"
+#include "transport-bar"
#include "dbus-shared-names.h"
#include "sound-service-client.h"
#include "common-defs.h"
@@ -312,6 +313,7 @@ new_slider_item(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuC
static gboolean new_transport_bar(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client)
{
g_debug("indicator-sound: new_transport_bar() called ");
+ TransportBar* bar = transport_bar_new();
return TRUE;
}
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala
index cd5d65d..dc66101 100644
--- a/src/music-player-bridge.vala
+++ b/src/music-player-bridge.vala
@@ -48,11 +48,10 @@ public class MusicPlayerBridge : GLib.Object
if(server_is_not_of_interest(type)) return;
string client_name = type.split(".")[1];
if (root_menu != null && client_name != null){
- Dbusmenu.Menuitem client_item = new Dbusmenu.Menuitem();
-
- client_item.property_set(MENUITEM_PROP_LABEL, client_name.concat(" is registered"));
- registered_clients.set(client_name, client_item);
- root_menu.child_append(client_item);
+ TransportMenuItem transport_item = new TransportMenuItem();
+ //client_item.property_set(MENUITEM_PROP_LABEL, client_name.concat(" is registered"));
+ registered_clients.set(client_name, transport_item);
+ root_menu.child_append(transport_item);
debug("client of name %s has successfully registered with us", client_name);
}
}
diff --git a/src/sound-service.c b/src/sound-service.c
index e20de30..3ec7a60 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -44,9 +44,9 @@ service_shutdown (IndicatorService *service, gpointer user_data)
if (mainloop != NULL) {
g_debug("Service shutdown !");
- // TODO: uncomment for release !!
- close_pulse_activites();
- g_main_loop_quit(mainloop);
+ // TODO: uncomment for release !!
+ //close_pulse_activites();
+ //g_main_loop_quit(mainloop);
}
return;
}
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;
}
diff --git a/src/transport-bar.h b/src/transport-bar.h
index 77a1a97..e931298 100644
--- a/src/transport-bar.h
+++ b/src/transport-bar.h
@@ -40,8 +40,8 @@ struct _TransportBarClass {
struct _TransportBar {
};
-GType transport_item_get_type (void);
-TransportBar* transport_item_new();
+GType transport_bar_get_type (void);
+TransportBar* transport_bar_new();
G_END_DECLS
diff --git a/src/transport-menu-item.vala b/src/transport-menu-item.vala
index 812ef6a..11120b0 100644
--- a/src/transport-menu-item.vala
+++ b/src/transport-menu-item.vala
@@ -11,7 +11,7 @@ public class TransportMenuItem : Dbusmenu.Menuitem
this.property_set(MENUITEM_PROP_TYPE, DBUSMENU_TRANSPORT_MENUITEM_TYPE);
}
- public override void handle_event(string name, GLib.Value value, uint timestamp)
+ public override void handle_event(string name, GLib.Value input_value, uint timestamp)
{
debug("TransportItem -> handle event caught!");
}