From c852d87f4b51495f661cfd9bcbfe21aa615fbf49 Mon Sep 17 00:00:00 2001 From: qball Date: Fri, 12 Oct 2007 16:35:19 +0000 Subject: [PATCH] Make image smaller 64 git-svn-id: https://svn.musicpd.org/gmpc/plugins/gmpc-libnotify/trunk@6964 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/plugin.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugin.c b/src/plugin.c index 1d5820c..2e88f32 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -37,18 +37,18 @@ static void libnotify_update_cover(GmpcMetaWatcher *gmv, mpd_Song *song, MetaDat return; if(ret == META_DATA_AVAILABLE) { - GdkPixbuf *pb = gdk_pixbuf_new_from_file_at_scale(path,96,96,TRUE,NULL); + GdkPixbuf *pb = gdk_pixbuf_new_from_file_at_scale(path,64,64,TRUE,NULL); screenshot_add_border(&pb); notify_notification_set_icon_from_pixbuf(not, pb); g_object_unref(pb); if(!notify_notification_show(not, NULL))printf("crap\n"); } else if (ret == META_DATA_FETCHING) { - GdkPixbuf *pb = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),"gmpc-loading-cover" , 96, 0,NULL); + GdkPixbuf *pb = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),"gmpc-loading-cover" , 64, 0,NULL); notify_notification_set_icon_from_pixbuf(not, pb); g_object_unref(pb); if(!notify_notification_show(not, NULL))printf("crap\n"); } else if (ret == META_DATA_UNAVAILABLE) { - GdkPixbuf *pb = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),"gmpc" , 96, 0,NULL); + GdkPixbuf *pb = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),"gmpc" , 64, 0,NULL); notify_notification_set_icon_from_pixbuf(not, pb); g_object_unref(pb); if(!notify_notification_show(not, NULL))printf("crap\n"); @@ -76,6 +76,7 @@ static gboolean timeout_callback(gpointer data) } static void libnotify_song_changed(MpdObj *mi) { + int tm = 5000; mpd_Song *song = NULL; if(!cfg_get_single_value_as_int_with_default(config, "libnotify-plugin", "enable", TRUE)) return; @@ -105,8 +106,8 @@ static void libnotify_song_changed(MpdObj *mi) notify_notification_set_timeout(not, NOTIFY_EXPIRES_NEVER); if(timeout) g_source_remove(timeout); - - timeout = g_timeout_add(5000,timeout_callback, not); + tm = cfg_get_single_value_as_int_with_default(config, "libnotify", "timeout", 5000); + timeout = g_timeout_add(tm,timeout_callback, not); MetaDataResult ret; gchar *path = NULL; -- 2.11.4.GIT