aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/Makefile.in1
-rw-r--r--src/metadata-widget.c26
-rw-r--r--src/mpris2-controller.c11
-rw-r--r--src/mpris2-controller.vala5
-rw-r--r--src/music-player-bridge.c23
-rw-r--r--src/music-player-bridge.h1
-rw-r--r--src/music-player-bridge.vala2
-rw-r--r--src/player-controller.c15
-rw-r--r--src/player-controller.vala8
-rw-r--r--src/playlists-menu-item.c3
-rw-r--r--src/playlists-menu-item.vala1
-rw-r--r--src/specific-items-manager.c17
-rw-r--r--src/specific-items-manager.vala8
-rw-r--r--src/transport-widget.c8
15 files changed, 79 insertions, 51 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 2381429..29cc33c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,7 +66,6 @@ music_bridge_VALASOURCES = \
music_bridge_VALAFLAGS = \
--ccode \
- --disable-dbus-transformation \
-H music-player-bridge.h -d . \
--vapidir=$(top_srcdir)/vapi/ \
--vapidir=./ \
diff --git a/src/Makefile.in b/src/Makefile.in
index 3accc56..29bcff9 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -392,7 +392,6 @@ music_bridge_VALASOURCES = \
music_bridge_VALAFLAGS = \
--ccode \
- --disable-dbus-transformation \
-H music-player-bridge.h -d . \
--vapidir=$(top_srcdir)/vapi/ \
--vapidir=./ \
diff --git a/src/metadata-widget.c b/src/metadata-widget.c
index d21c10d..8ab7d1d 100644
--- a/src/metadata-widget.c
+++ b/src/metadata-widget.c
@@ -212,9 +212,9 @@ metadata_widget_init (MetadataWidget *self)
// player label
GtkWidget* player_label;
player_label = gtk_label_new("");
- gtk_misc_set_alignment(GTK_MISC(player_label), (gfloat)0, (gfloat)0);
+ gtk_misc_set_alignment(GTK_MISC(player_label), (gfloat)0, (gfloat)0.5);
gtk_misc_set_padding (GTK_MISC(player_label), (gfloat)1, (gfloat)0);
- gtk_widget_set_size_request (player_label, 200, 25);
+ gtk_widget_set_size_request (player_label, 200, 24);
priv->player_label = player_label;
gtk_box_pack_start (GTK_BOX(outer_v_box), priv->player_label, FALSE, FALSE, 0);
@@ -319,9 +319,8 @@ metadata_widget_icon_triangle_draw_cb_gtk_3 (GtkWidget *widget,
MetadataWidgetPrivate * priv = METADATA_WIDGET_GET_PRIVATE(meta);
GtkStyle *style;
- int x, y, arrow_width, arrow_height;
+ int x, y, arrow_width, arrow_height;
- gint offset = 3;
arrow_width = 5;
arrow_height = 9;
@@ -331,7 +330,9 @@ metadata_widget_icon_triangle_draw_cb_gtk_3 (GtkWidget *widget,
gtk_widget_get_allocation (widget, &allocation);
x = allocation.x;
y = 0;
-
+
+ gint offset = (allocation.height - gdk_pixbuf_get_height (priv->icon_buf)) / 2;
+
// Draw player icon
if (priv->icon_buf != NULL){
gdk_cairo_set_source_pixbuf (cr,
@@ -340,11 +341,11 @@ metadata_widget_icon_triangle_draw_cb_gtk_3 (GtkWidget *widget,
y + offset);
cairo_paint (cr);
}
-
+
// Draw triangle but only if the player is running.
if (dbusmenu_menuitem_property_get_bool (priv->twin_item,
DBUSMENU_METADATA_MENUITEM_PLAYER_RUNNING)){
- y += (double)arrow_height/2.0 + offset;
+ y += allocation.height/2.0 - (double)arrow_height/2.0;
cairo_set_line_width (cr, 1.0);
//g_debug ("triangle drawing");
@@ -426,9 +427,8 @@ metadata_widget_icon_triangle_draw_cb (GtkWidget *widget,
GtkStyle *style;
cairo_t *cr;
- int x, y, arrow_width, arrow_height;
+ int x, y, arrow_width, arrow_height;
- gint offset = 3;
arrow_width = 5;
arrow_height = 9;
@@ -440,7 +440,9 @@ metadata_widget_icon_triangle_draw_cb (GtkWidget *widget,
gtk_widget_get_allocation (widget, &allocation);
x = allocation.x;
y = allocation.y;
-
+
+ gint offset = (allocation.height - gdk_pixbuf_get_height (priv->icon_buf)) / 2;
+
// Draw player icon
if (priv->icon_buf != NULL){
gdk_cairo_set_source_pixbuf (cr,
@@ -449,11 +451,11 @@ metadata_widget_icon_triangle_draw_cb (GtkWidget *widget,
y + offset);
cairo_paint (cr);
}
-
+
// Draw triangle but only if the player is running.
if (dbusmenu_menuitem_property_get_bool (priv->twin_item,
DBUSMENU_METADATA_MENUITEM_PLAYER_RUNNING)){
- y += (double)arrow_height/2.0 + offset;
+ y += allocation.height/2.0 - (double)arrow_height/2.0;
cairo_set_line_width (cr, 1.0);
cairo_move_to (cr, x, y);
diff --git a/src/mpris2-controller.c b/src/mpris2-controller.c
index b08c8a6..d1b9b7c 100644
--- a/src/mpris2-controller.c
+++ b/src/mpris2-controller.c
@@ -314,6 +314,7 @@ enum {
MPRIS2_CONTROLLER_PROPERTIES_INTERFACE,
MPRIS2_CONTROLLER_OWNER
};
+#define MPRIS2_CONTROLLER_MAX_PLAYLIST_COUNT 20
Mpris2Controller* mpris2_controller_new (PlayerController* ctrl);
Mpris2Controller* mpris2_controller_construct (GType object_type, PlayerController* ctrl);
void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar* interface_source, GHashTable* changed_properties, gchar** invalid, int invalid_length1);
@@ -483,7 +484,7 @@ void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar*
_tmp0_ = _tmp1_ == FALSE;
}
if (_tmp0_) {
- g_warning ("mpris2-controller.vala:77: Property-changed hash is null or this is an" \
+ g_warning ("mpris2-controller.vala:78: Property-changed hash is null or this is an" \
" interface that doesn't concern us");
return;
}
@@ -955,7 +956,7 @@ static gboolean mpris2_controller_fetch_playlists_co (Mpris2ControllerFetchPlayl
data->current_playlists_length1 = 0;
data->_current_playlists_size_ = 0;
data->_state_ = 1;
- mpris_playlists_GetPlaylists (data->self->priv->_playlists, (guint32) 0, (guint32) 10, "Alphabetical", FALSE, mpris2_controller_fetch_playlists_ready, data);
+ mpris_playlists_GetPlaylists (data->self->priv->_playlists, (guint32) 0, (guint32) MPRIS2_CONTROLLER_MAX_PLAYLIST_COUNT, "Alphabetical", FALSE, mpris2_controller_fetch_playlists_ready, data);
return FALSE;
_state_1:
data->_tmp1_ = NULL;
@@ -1006,7 +1007,7 @@ static gboolean mpris2_controller_fetch_playlists_co (Mpris2ControllerFetchPlayl
playlists_menuitem_update (data->playlists_item, data->current_playlists, data->current_playlists_length1);
_g_object_unref0 (data->playlists_item);
} else {
- g_warning ("mpris2-controller.vala:242: Playlists are on but its returning no cur" \
+ g_warning ("mpris2-controller.vala:243: Playlists are on but its returning no cur" \
"rent_playlists");
data->_tmp5_ = FALSE;
data->_tmp6_ = __bool_dup0 (&data->_tmp5_);
@@ -1065,7 +1066,7 @@ void mpris2_controller_activate_playlist (Mpris2Controller* self, const char* pa
GError * e;
e = _inner_error_;
_inner_error_ = NULL;
- g_warning ("mpris2-controller.vala:264: Could not activate playlist %s because %s", (const gchar*) path, e->message);
+ g_warning ("mpris2-controller.vala:265: Could not activate playlist %s because %s", (const gchar*) path, e->message);
_g_error_free0 (e);
}
__finally12:
@@ -1263,7 +1264,7 @@ static GObject * mpris2_controller_constructor (GType type, guint n_construct_pr
GError * e;
e = _inner_error_;
_inner_error_ = NULL;
- g_critical ("mpris2-controller.vala:56: Problems connecting to the session bus - %s", e->message);
+ g_critical ("mpris2-controller.vala:57: Problems connecting to the session bus - %s", e->message);
_g_error_free0 (e);
}
__finally13:
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index 8eeac08..ce35a06 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -21,11 +21,12 @@ using Transport;
public class Mpris2Controller : GLib.Object
{
+ public const int MAX_PLAYLIST_COUNT = 20;
+
public MprisRoot mpris2_root {get; construct;}
public MprisPlayer player {get; construct;}
public MprisPlaylists playlists {get; construct;}
public FreeDesktopProperties properties_interface {get; construct;}
-
public PlayerController owner {get; construct;}
public Mpris2Controller(PlayerController ctrl)
@@ -226,7 +227,7 @@ public class Mpris2Controller : GLib.Object
try{
current_playlists = yield this.playlists.GetPlaylists (0,
- 10,
+ MAX_PLAYLIST_COUNT,
"Alphabetical",
false);
}
diff --git a/src/music-player-bridge.c b/src/music-player-bridge.c
index 73af633..5dec899 100644
--- a/src/music-player-bridge.c
+++ b/src/music-player-bridge.c
@@ -367,6 +367,22 @@ static gpointer __bool_dup0 (gpointer self) {
}
+static gchar* bool_to_string (gboolean self) {
+ gchar* result = NULL;
+ if (self) {
+ gchar* _tmp0_;
+ _tmp0_ = g_strdup ("true");
+ result = _tmp0_;
+ return result;
+ } else {
+ gchar* _tmp1_;
+ _tmp1_ = g_strdup ("false");
+ result = _tmp1_;
+ return result;
+ }
+}
+
+
void music_player_bridge_client_has_become_available (MusicPlayerBridge* self, const gchar* desktop, const gchar* dbus_name, gboolean use_playlists) {
gboolean _tmp0_ = FALSE;
gint _tmp1_;
@@ -453,6 +469,8 @@ void music_player_bridge_client_has_become_available (MusicPlayerBridge* self, c
PlayerController* _tmp21_;
gpointer _tmp22_ = NULL;
PlayerController* _tmp23_;
+ gchar* _tmp24_ = NULL;
+ gchar* _tmp25_;
_tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->registered_clients, mpris_key);
_tmp18_ = (PlayerController*) _tmp17_;
_tmp19_ = __bool_dup0 (&use_playlists);
@@ -467,8 +485,11 @@ void music_player_bridge_client_has_become_available (MusicPlayerBridge* self, c
_tmp23_ = (PlayerController*) _tmp22_;
player_controller_activate (_tmp23_, dbus_name);
_g_object_unref0 (_tmp23_);
+ _tmp24_ = bool_to_string (use_playlists);
+ _tmp25_ = _tmp24_;
g_debug ("music-player-bridge.vala:134: Application has already registered - awa" \
-"ken the hibernation: %s \n", dbus_name);
+"ken the hibernation: %s with playlists %s \n", dbus_name, _tmp25_);
+ _g_free0 (_tmp25_);
}
_g_free0 (mpris_key);
_g_object_unref0 (app_info);
diff --git a/src/music-player-bridge.h b/src/music-player-bridge.h
index 7db0948..3a21f99 100644
--- a/src/music-player-bridge.h
+++ b/src/music-player-bridge.h
@@ -539,6 +539,7 @@ Mpris2Watcher* mpris2_watcher_new (void);
Mpris2Watcher* mpris2_watcher_construct (GType object_type);
void mpris2_watcher_check_for_active_clients (Mpris2Watcher* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void mpris2_watcher_check_for_active_clients_finish (Mpris2Watcher* self, GAsyncResult* _res_);
+#define MPRIS2_CONTROLLER_MAX_PLAYLIST_COUNT 20
Mpris2Controller* mpris2_controller_new (PlayerController* ctrl);
Mpris2Controller* mpris2_controller_construct (GType object_type, PlayerController* ctrl);
void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar* interface_source, GHashTable* changed_properties, gchar** invalid, int invalid_length1);
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala
index 72c9bdb..0c9cb10 100644
--- a/src/music-player-bridge.vala
+++ b/src/music-player-bridge.vala
@@ -131,7 +131,7 @@ public class MusicPlayerBridge : GLib.Object
this.registered_clients[mpris_key].use_playlists = use_playlists;
this.registered_clients[mpris_key].update_state ( PlayerController.state.READY );
this.registered_clients[mpris_key].activate ( dbus_name );
- debug("Application has already registered - awaken the hibernation: %s \n", dbus_name );
+ debug("Application has already registered - awaken the hibernation: %s with playlists %s \n", dbus_name, use_playlists.to_string() );
}
}
diff --git a/src/player-controller.c b/src/player-controller.c
index dbb5536..3bc660b 100644
--- a/src/player-controller.c
+++ b/src/player-controller.c
@@ -323,7 +323,7 @@ PlayerController* player_controller_construct (GType object_type, DbusmenuMenuit
player_controller_establish_mpris_connection (self);
player_controller_update_layout (self);
_tmp3_ = g_app_info_get_name (self->priv->_app_info);
- g_debug ("player-controller.vala:74: New player controller for %s with icon nam" \
+ g_debug ("player-controller.vala:76: New player controller for %s with icon nam" \
"e %s", _tmp3_, self->priv->_icon_name);
return self;
}
@@ -338,7 +338,7 @@ void player_controller_update_state (PlayerController* self, PlayerControllersta
const gchar* _tmp0_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = g_app_info_get_name (self->priv->_app_info);
- g_debug ("player-controller.vala:79: update_state - player controller %s : new s" \
+ g_debug ("player-controller.vala:81: update_state - player controller %s : new s" \
"tate %i", _tmp0_, (gint) new_state);
self->current_state = (gint) new_state;
player_controller_update_layout (self);
@@ -358,7 +358,7 @@ void player_controller_instantiate (PlayerController* self) {
GError * _inner_error_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = g_app_info_get_name (self->priv->_app_info);
- g_debug ("player-controller.vala:99: instantiate in player controller for %s", _tmp0_);
+ g_debug ("player-controller.vala:101: instantiate in player controller for %s", _tmp0_);
g_app_info_launch (self->priv->_app_info, NULL, NULL, &_inner_error_);
if (_inner_error_ != NULL) {
goto __catch6_g_error;
@@ -372,7 +372,7 @@ void player_controller_instantiate (PlayerController* self) {
_error_ = _inner_error_;
_inner_error_ = NULL;
_tmp1_ = g_app_info_get_name (self->priv->_app_info);
- g_warning ("player-controller.vala:105: Failed to launch app %s with error message" \
+ g_warning ("player-controller.vala:107: Failed to launch app %s with error message" \
": %s", _tmp1_, _error_->message);
_g_error_free0 (_error_);
}
@@ -453,13 +453,13 @@ static void player_controller_establish_mpris_connection (PlayerController* self
_tmp0_ = self->priv->_dbus_name == NULL;
}
if (_tmp0_) {
- g_debug ("player-controller.vala:139: establish_mpris_connection - Not ready to " \
+ g_debug ("player-controller.vala:141: establish_mpris_connection - Not ready to " \
"connect");
return;
}
_tmp1_ = bool_to_string (*self->use_playlists);
_tmp2_ = _tmp1_;
- g_debug ("player-controller.vala:142: establish mpris connection - use playlist" \
+ g_debug ("player-controller.vala:144: establish mpris connection - use playlist" \
"s value = %s ", _tmp2_);
_g_free0 (_tmp2_);
_tmp3_ = mpris2_controller_new (self);
@@ -574,7 +574,6 @@ void player_controller_update_layout (PlayerController* self) {
gboolean _tmp11_;
const gchar* _tmp12_ = NULL;
g_return_if_fail (self != NULL);
- g_debug ("player-controller.vala:172: a call to update layout");
_tmp0_ = gee_abstract_list_get ((GeeAbstractList*) self->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_PLAYLISTS);
_tmp1_ = (PlayerItem*) _tmp0_;
playlists_menuitem = IS_PLAYLISTS_MENUITEM (_tmp1_) ? ((PlaylistsMenuitem*) _tmp1_) : NULL;
@@ -673,7 +672,7 @@ static void player_controller_construct_widgets (PlayerController* self) {
_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _item_list, _item_index);
item = (PlayerItem*) _tmp7_;
_tmp8_ = gee_abstract_list_index_of ((GeeAbstractList*) self->custom_items, item);
- if (_tmp8_ == 4) {
+ if (_tmp8_ == (PLAYER_CONTROLLER_WIDGET_QUANTITY - 1)) {
PlayerItem* _tmp9_;
PlaylistsMenuitem* _tmp10_;
PlaylistsMenuitem* playlists_menuitem;
diff --git a/src/player-controller.vala b/src/player-controller.vala
index ced7d96..04d0bf9 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -24,12 +24,14 @@ public class PlayerController : GLib.Object
{
public const int WIDGET_QUANTITY = 4;
- public static enum widget_order{
+ public enum widget_order{
SEPARATOR,
METADATA,
TRANSPORT,
PLAYLISTS
}
+
+
public enum state{
OFFLINE,
@@ -169,11 +171,9 @@ public class PlayerController : GLib.Object
public void update_layout()
{
- debug ("a call to update layout");
PlaylistsMenuitem playlists_menuitem = this.custom_items[widget_order.PLAYLISTS] as PlaylistsMenuitem;
MetadataMenuitem metadata_menuitem = this.custom_items[widget_order.METADATA] as MetadataMenuitem;
if(this.current_state != state.CONNECTED){
- // TODO
metadata_menuitem.should_collapse (true);
playlists_menuitem.root_item.property_set_bool (MENUITEM_PROP_VISIBLE,
false );
@@ -212,7 +212,7 @@ public class PlayerController : GLib.Object
this.custom_items.add(playlist_menuitem);
foreach(PlayerItem item in this.custom_items){
- if (this.custom_items.index_of(item) == 4) {
+ if (this.custom_items.index_of(item) == WIDGET_QUANTITY-1) {
PlaylistsMenuitem playlists_menuitem = item as PlaylistsMenuitem;
root_menu.child_add_position(playlists_menuitem.root_item, this.menu_offset + this.custom_items.index_of(item));
}
diff --git a/src/playlists-menu-item.c b/src/playlists-menu-item.c
index fe673e1..6f35622 100644
--- a/src/playlists-menu-item.c
+++ b/src/playlists-menu-item.c
@@ -260,6 +260,7 @@ void playlists_menuitem_update (PlaylistsMenuitem* self, PlaylistDetails* playli
_tmp6_ = dbusmenu_menuitem_get_id (_data1_->menuitem);
gee_abstract_map_set ((GeeAbstractMap*) self->priv->current_playlists, GINT_TO_POINTER (_tmp6_), _data1_->menuitem);
dbusmenu_menuitem_child_append (self->root_item, _data1_->menuitem);
+ g_debug ("playlists-menu-item.vala:65: populating valid playlists %s", detail.name);
playlist_details_destroy (&detail);
block1_data_unref (_data1_);
_data1_ = NULL;
@@ -483,7 +484,7 @@ static void playlists_menuitem_submenu_item_activated (PlaylistsMenuitem* self,
g_return_if_fail (self != NULL);
_tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->current_playlists, GINT_TO_POINTER (menu_item_id));
if (!_tmp0_) {
- g_warning ("playlists-menu-item.vala:124: item %i was activated but we don't have " \
+ g_warning ("playlists-menu-item.vala:125: item %i was activated but we don't have " \
"a corresponding playlist", menu_item_id);
return;
}
diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala
index 452a586..9cb7ac7 100644
--- a/src/playlists-menu-item.vala
+++ b/src/playlists-menu-item.vala
@@ -62,6 +62,7 @@ public class PlaylistsMenuitem : PlayerItem
);
this.current_playlists.set( menuitem.id, menuitem );
this.root_item.child_append( menuitem );
+ debug ("populating valid playlists %s", detail.name);
}
// Finally remove any that might have been deleted
foreach (Dbusmenu.Menuitem item in this.current_playlists.values) {
diff --git a/src/specific-items-manager.c b/src/specific-items-manager.c
index b01e8c1..8d16be4 100644
--- a/src/specific-items-manager.c
+++ b/src/specific-items-manager.c
@@ -137,6 +137,7 @@ static void specific_items_manager_on_root_changed (SpecificItemsManager* self,
static void _specific_items_manager_on_root_changed_dbusmenu_client_root_changed (DbusmenuClient* _sender, GObject* newroot, gpointer self);
static gint specific_items_manager_figure_out_positioning (SpecificItemsManager* self);
gint player_controller_get_menu_offset (PlayerController* self);
+#define PLAYER_CONTROLLER_WIDGET_QUANTITY 4
GeeArrayList* specific_items_manager_get_proxy_items (SpecificItemsManager* self);
gint player_controller_track_specific_count (PlayerController* self);
GType player_item_get_type (void) G_GNUC_CONST;
@@ -221,7 +222,7 @@ static gint specific_items_manager_figure_out_positioning (SpecificItemsManager*
gint _tmp1_;
_tmp0_ = player_controller_get_menu_offset (self->priv->_owner);
_tmp1_ = gee_collection_get_size ((GeeCollection*) self->priv->_proxy_items);
- _result_ = (_tmp0_ + 4) + _tmp1_;
+ _result_ = (_tmp0_ + PLAYER_CONTROLLER_WIDGET_QUANTITY) + _tmp1_;
} else {
if (self->priv->of_type == SPECIFIC_ITEMS_MANAGER_CATEGORY_PLAYER) {
gint _tmp2_;
@@ -231,7 +232,7 @@ static gint specific_items_manager_figure_out_positioning (SpecificItemsManager*
gboolean _tmp5_;
_tmp2_ = player_controller_get_menu_offset (self->priv->_owner);
_tmp3_ = player_controller_track_specific_count (self->priv->_owner);
- pos = (_tmp2_ + 4) + _tmp3_;
+ pos = (_tmp2_ + PLAYER_CONTROLLER_WIDGET_QUANTITY) + _tmp3_;
_tmp5_ = TRUE;
if (_bool_equal (self->priv->_owner->use_playlists, &_tmp5_) == TRUE) {
_tmp4_ = 1;
@@ -242,7 +243,7 @@ static gint specific_items_manager_figure_out_positioning (SpecificItemsManager*
_result_ = pos;
}
}
- g_debug ("specific-items-manager.vala:61: !!!!! Menu pos of type %i is = %i", self->priv->of_type, _result_);
+ g_debug ("specific-items-manager.vala:63: !!!!! Menu pos of type %i is = %i", self->priv->of_type, _result_);
result = _result_;
return result;
}
@@ -273,7 +274,7 @@ static void specific_items_manager_on_root_changed (SpecificItemsManager* self,
g_return_if_fail (self != NULL);
if (newroot == NULL) {
gint _tmp3_;
- g_debug ("specific-items-manager.vala:68: root disappeared -remove proxyitems");
+ g_debug ("specific-items-manager.vala:70: root disappeared -remove proxyitems");
{
GeeArrayList* _tmp0_;
GeeArrayList* _p_list;
@@ -301,7 +302,7 @@ static void specific_items_manager_on_root_changed (SpecificItemsManager* self,
}
gee_abstract_collection_clear ((GeeAbstractCollection*) self->priv->_proxy_items);
_tmp3_ = gee_collection_get_size ((GeeCollection*) self->priv->_proxy_items);
- g_debug ("specific-items-manager.vala:73: array list size is now %i", _tmp3_);
+ g_debug ("specific-items-manager.vala:75: array list size is now %i", _tmp3_);
return;
}
_tmp4_ = dbusmenu_client_get_root (self->priv->client);
@@ -333,7 +334,7 @@ static void specific_items_manager_on_root_changed (SpecificItemsManager* self,
proxy = _tmp9_;
gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->_proxy_items, proxy);
_tmp10_ = dbusmenu_menuitem_property_get (item, DBUSMENU_MENUITEM_PROP_LABEL);
- g_debug ("specific-items-manager.vala:90: Proxy item of label = %s added to coll" \
+ g_debug ("specific-items-manager.vala:92: Proxy item of label = %s added to coll" \
"ection", _tmp10_);
dbusmenu_menuitem_child_add_position (self->priv->_owner->root_menu, (DbusmenuMenuitem*) proxy, (guint) pos);
_g_object_unref0 (proxy);
@@ -348,14 +349,14 @@ static void specific_items_manager_on_root_changed (SpecificItemsManager* self,
static void specific_items_manager_on_child_added (SpecificItemsManager* self, GObject* child, guint position) {
g_return_if_fail (self != NULL);
g_return_if_fail (child != NULL);
- g_debug ("specific-items-manager.vala:99: On child added Specific root node");
+ g_debug ("specific-items-manager.vala:101: On child added Specific root node");
}
static void specific_items_manager_on_child_removed (SpecificItemsManager* self, GObject* child) {
g_return_if_fail (self != NULL);
g_return_if_fail (child != NULL);
- g_debug ("specific-items-manager.vala:104: On child removed Specific root node");
+ g_debug ("specific-items-manager.vala:106: On child removed Specific root node");
}
diff --git a/src/specific-items-manager.vala b/src/specific-items-manager.vala
index d26199f..923cf3f 100644
--- a/src/specific-items-manager.vala
+++ b/src/specific-items-manager.vala
@@ -22,7 +22,7 @@ using Gee;
public class SpecificItemsManager : GLib.Object
{
- public static enum category{
+ public enum category{
TRACK,
PLAYER
}
@@ -51,10 +51,12 @@ public class SpecificItemsManager : GLib.Object
{
int result = 0 ;
if (this.of_type == category.TRACK){
- result = this.owner.menu_offset + 4 + this.proxy_items.size;
+ result = this.owner.menu_offset + this.owner.WIDGET_QUANTITY + this.proxy_items.size;
}
else if (this.of_type == category.PLAYER){
- int pos = this.owner.menu_offset + 4 + this.owner.track_specific_count();
+ int pos = this.owner.menu_offset + this.owner.WIDGET_QUANTITY + this.owner.track_specific_count();
+ //Surely the playlists item is there whether its visible or not ?
+ //TODO test playlists and player specific item positioning.
pos += this.owner.use_playlists == true ? 1 : 0;
result = pos;
}
diff --git a/src/transport-widget.c b/src/transport-widget.c
index 22e3b2a..c535e00 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -181,10 +181,10 @@ transport_widget_init (TransportWidget *self)
/* create widget path */
spinner_widget_path = gtk_widget_path_new();
- gtk_widget_path_iter_set_name (spinner_widget_path, -1 , "IndicatorSound");
gtk_widget_path_append_type (spinner_widget_path, GTK_TYPE_MENU);
gtk_widget_path_append_type (spinner_widget_path, GTK_TYPE_MENU_ITEM);
- gtk_widget_path_append_type (spinner_widget_path, GTK_TYPE_SPINNER);
+ gint pos = gtk_widget_path_append_type (spinner_widget_path, GTK_TYPE_SPINNER);
+ gtk_widget_path_iter_set_name (spinner_widget_path, pos, "IndicatorSoundSpinner");
/* create style context and append path */
spinner_style_context = gtk_style_context_new();
@@ -1800,8 +1800,8 @@ draw (GtkWidget* button, cairo_t *cr)
#if GTK_CHECK_VERSION(3, 0, 0)
else if(priv->current_state == TRANSPORT_STATE_LAUNCHING)
{
-
- gtk_render_activity (spinner_style_context, cr, 106, 6 , 30, 30);
+ // the spinner is not aligned, why? because the play button has odd width/height numbers
+ gtk_render_activity (spinner_style_context, cr, 106, 6, 30, 30);
}
#endif
return FALSE;