diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-sound.c | 4 | ||||
-rw-r--r-- | src/metadata-widget.c | 4 | ||||
-rw-r--r-- | src/mpris2-controller.vala | 22 | ||||
-rw-r--r-- | src/mpris2-interfaces.vala | 2 | ||||
-rw-r--r-- | src/voip-input-widget.c | 2 | ||||
-rw-r--r-- | src/volume-widget.c | 2 |
6 files changed, 27 insertions, 9 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 272c8da..d21d722 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -17,10 +17,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" + #include <math.h> #include <glib.h> #include <glib-object.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> #include <libdbusmenu-gtk/menu.h> diff --git a/src/metadata-widget.c b/src/metadata-widget.c index da2ae9a..7c7e750 100644 --- a/src/metadata-widget.c +++ b/src/metadata-widget.c @@ -22,7 +22,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "config.h" #endif -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include "metadata-widget.h" #include "common-defs.h" #include <gtk/gtk.h> @@ -228,7 +228,7 @@ metadata_widget_init (MetadataWidget *self) GtkWidget* player_label; player_label = gtk_label_new (""); gtk_misc_set_alignment(GTK_MISC(player_label), (gfloat)0, (gfloat)0); - gtk_misc_set_padding (GTK_MISC(player_label), (gfloat)1, (gfloat)4); + gtk_misc_set_padding (GTK_MISC(player_label), (gfloat)1, (gfloat)3); gtk_widget_set_size_request (player_label, 150, 24); priv->player_label = player_label; diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala index 0fa7b6c..9cd02c4 100644 --- a/src/mpris2-controller.vala +++ b/src/mpris2-controller.vala @@ -92,7 +92,7 @@ public class Mpris2Controller : GLib.Object } Variant? playlist_v = changed_properties.lookup("ActivePlaylist"); if ( playlist_v != null && this.owner.use_playlists == true ){ - Timeout.add (300, this.fetch_active_playlist); + Timeout.add (500, this.fetch_active_playlist); } Variant? playlist_count_v = changed_properties.lookup("PlaylistCount"); if ( playlist_count_v != null && this.owner.use_playlists == true ){ @@ -240,14 +240,30 @@ public class Mpris2Controller : GLib.Object playlists_item.update(current_playlists); } else{ - warning(" Playlists are on but its returning no current_playlists" ); + warning(" Playlists are on but %s is returning no current_playlists ?", + this.owner.app_info.get_name()); this.owner.use_playlists = false; } } + private bool validate_playlists_details() + { + if (this.playlists.ActivePlaylist.valid == false){ + return false; + } + if (this.playlists.ActivePlaylist.details == null){ + return false; + } + if (this.playlists.ActivePlaylist.details.path == null || + this.playlists.ActivePlaylist.details.name == null){ + return false; + } + return true; + } + private bool fetch_active_playlist() { - if (this.playlists.ActivePlaylist.valid == false){ + if (this.validate_playlists_details() == false){ return false; } PlaylistsMenuitem playlists_item = this.owner.custom_items[PlayerController.widget_order.PLAYLISTS] as PlaylistsMenuitem; diff --git a/src/mpris2-interfaces.vala b/src/mpris2-interfaces.vala index db6888d..cb68e84 100644 --- a/src/mpris2-interfaces.vala +++ b/src/mpris2-interfaces.vala @@ -65,7 +65,7 @@ public interface MprisPlaylists : Object { //properties public abstract string[] Orderings{owned get; set;} public abstract uint32 PlaylistCount{owned get; set;} - public abstract ActivePlaylistContainer ActivePlaylist {owned get; set;} + public abstract ActivePlaylistContainer? ActivePlaylist {owned get; set;} //methods public abstract async void ActivatePlaylist(ObjectPath playlist_id) throws IOError; diff --git a/src/voip-input-widget.c b/src/voip-input-widget.c index 5f67fab..03879e7 100644 --- a/src/voip-input-widget.c +++ b/src/voip-input-widget.c @@ -22,7 +22,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "config.h" #endif -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <math.h> #include <glib.h> #include "voip-input-widget.h" diff --git a/src/volume-widget.c b/src/volume-widget.c index c71c1e3..ac603c1 100644 --- a/src/volume-widget.c +++ b/src/volume-widget.c @@ -22,7 +22,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "config.h" #endif -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <math.h> #include <glib.h> #include "volume-widget.h" |