aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/metadata-widget.c20
-rw-r--r--src/sound-service-dbus.c3
2 files changed, 13 insertions, 10 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c
index a37053b..38ed529 100644
--- a/src/metadata-widget.c
+++ b/src/metadata-widget.c
@@ -106,8 +106,7 @@ metadata_widget_init (MetadataWidget *self)
g_signal_connect(priv->album_art, "expose-event",
G_CALLBACK(metadata_image_expose),
- GTK_WIDGET(self));
- gtk_widget_set_size_request(GTK_WIDGET(priv->album_art), 60, 60);
+ GTK_WIDGET(self));
gtk_box_pack_start (GTK_BOX (priv->hbox),
priv->album_art,
@@ -190,26 +189,29 @@ metadata_image_expose (GtkWidget *metadata, GdkEventExpose *event, gpointer user
if(g_string_equal(priv->image_path, priv->old_image_path) == FALSE ||
priv->theme_change_occured == TRUE){
priv->theme_change_occured = FALSE;
- GdkPixbuf* orig_pixbuf;
- orig_pixbuf = gdk_pixbuf_new_from_file(priv->image_path->str, NULL);
+ GdkPixbuf* pixbuf;
+ pixbuf = gdk_pixbuf_new_from_file_at_size(priv->image_path->str, 60, 60, NULL);
//g_debug("metadata_load_new_image -> pixbuf from %s",
// priv->image_path->str);
- if(GDK_IS_PIXBUF(orig_pixbuf) == FALSE){
+ if(GDK_IS_PIXBUF(pixbuf) == FALSE){
//g_debug("problem loading the downloaded image just use the placeholder instead");
+ gtk_widget_set_size_request(GTK_WIDGET(priv->album_art), 60, 60);
draw_album_art_placeholder(metadata);
return TRUE;
}
- GdkPixbuf* pixbuf;
- pixbuf = gdk_pixbuf_scale_simple(orig_pixbuf,60, 60, GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(priv->album_art), pixbuf);
+ gtk_widget_set_size_request(GTK_WIDGET(priv->album_art),
+ gdk_pixbuf_get_width(pixbuf),
+ gdk_pixbuf_get_height(pixbuf));
+
g_string_erase(priv->old_image_path, 0, -1);
g_string_overwrite(priv->old_image_path, 0, priv->image_path->str);
- g_object_unref(pixbuf);
- g_object_unref(orig_pixbuf);
+ g_object_unref(pixbuf);
}
return FALSE;
}
+ gtk_widget_set_size_request(GTK_WIDGET(priv->album_art), 60, 60);
draw_album_art_placeholder(metadata);
return TRUE;
}
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index a22e648..d0fd765 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -200,7 +200,8 @@ show_sound_settings_dialog (DbusmenuMenuitem *mi,
{
GError * error = NULL;
if (!g_spawn_command_line_async("gnome-volume-control --page=applications", &error) &&
- !g_spawn_command_line_async("xfce4-mixer", &error))
+ !g_spawn_command_line_async("gnome-control-center sound", &error) &&
+ !g_spawn_command_line_async("xfce4-mixer", &error))
{
g_warning("Unable to show dialog: %s", error->message);
g_error_free(error);