diff options
author | Javier <dev.git@javispedro.com> | 2015-01-25 03:50:10 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-01-25 03:50:10 +0100 |
commit | e5239736235d6beace1d18c18decaaf6611bb1dd (patch) | |
tree | 23f35c65d5db137a12c07a590b7099d53ef63fef /libmdock | |
parent | fd1ad6fba7437f049854720b892fdd033b3c8be3 (diff) | |
download | mdock-e5239736235d6beace1d18c18decaaf6611bb1dd.tar.gz mdock-e5239736235d6beace1d18c18decaaf6611bb1dd.zip |
adding panel orientation binding
Diffstat (limited to 'libmdock')
-rw-r--r-- | libmdock/mdock-item-menu.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libmdock/mdock-item-menu.c b/libmdock/mdock-item-menu.c index 6121cdb..484277b 100644 --- a/libmdock/mdock-item-menu.c +++ b/libmdock/mdock-item-menu.c @@ -77,22 +77,21 @@ static void recents_icon_ready(GObject *source, GAsyncResult *res, gpointer user GFile *file = G_FILE(source); GError *error = NULL; GFileInfo *info = g_file_query_info_finish(file, res, &error); + if (info) { + GIcon *icon = g_file_info_get_icon(info); + if (icon) { + GtkImage *image = GTK_IMAGE(gtk_image_menu_item_get_image(menu_item)); + gtk_image_set_from_gicon(image, icon, GTK_ICON_SIZE_MENU); + } + g_object_unref(info); } else { gchar *uri = g_file_get_uri(file); - g_message("Could not get icon for file '%s': %s", uri, error->message); + g_debug("Could not get icon for file '%s': %s", uri, error->message); g_free(uri); g_error_free(error); - return; } - GIcon *icon = g_file_info_get_icon(info); - if (icon) { - GtkImage *image = GTK_IMAGE(gtk_image_menu_item_get_image(menu_item)); - gtk_image_set_from_gicon(image, icon, GTK_ICON_SIZE_MENU); - } - - g_object_unref(info); } static void recents_result_ready(GObject *source, GAsyncResult *res, gpointer user_data) |