diff -Nru xfdesktop4-4.8.3/debian/changelog xfdesktop4-4.8.3/debian/changelog --- xfdesktop4-4.8.3/debian/changelog 2012-02-07 19:49:49.000000000 +0000 +++ xfdesktop4-4.8.3/debian/changelog 2012-02-14 21:04:44.000000000 +0000 @@ -1,3 +1,53 @@ +xfdesktop4 (4.8.3-2ubuntu1) precise; urgency=low + + * Resync from Debian (changes were already included in 4.8.3-1ubuntu9), + remaining Ubuntu changes: + - debian/control: + + b-dep on xfce4-dev-tools, autoconf, automake and libtool for + xdt-autogen and exo-utils for exo-csource + + recommends tumbler. + - debian/patches: + + xubuntu_hide-ugly-resize-grip.patch: disable resize grips for + xfdesktop's root windows. lp #709279 + + xubuntu_avoid-multiple-instances.patch: added, add a workaround to + try to prevent several xfdesktop instances from managing the desktop + at the same time. lp #329616 + + xubuntu_improve-nautilus-interactions.patch: added, should prevent + nautilus from taking over the desktop if xfdesktop is running. + + xubuntu_fix-move-multiple-icons.patch: added, let people select and move + multiple icons on the desktop... lp #595658 + + xubuntu_single-click-option.patch: added, support single click to + open items on desktop. + + xubuntu_refreshed-translations.patch: added, new translations taken + from Thunar as the added strings are also used there. + - debian/rules, debian/xfdesktop4-data.install: drop old wallpapers, cf. + . + - debian/rules: + + call xdt-autogen, needed by the patches, and cleanup autogenerated files. + + regenerate and clean autogenerated settings/*ui.h. + + * debian/patches: + - 000*: added, pull patches from upstream eric/bugzilla-patches git branch. + - xubuntu_fix-cut-and-paste.patch, xubuntu_use-tumbler.patch: dropped, + included in the new patches from above. + - xubuntu_*: rebased to apply cleanly. + + -- Lionel Le Folgoc Tue, 14 Feb 2012 22:04:26 +0100 + +xfdesktop4 (4.8.3-2) unstable; urgency=low + + * debian/rules: + - drop obsolete configure option. + - use debhelper 9 hardening support. + * debian/compat bumped to 9. + * debian/control: + - drop hardening-includes build-dep. + - update debhelper build-dep to 9 for hardening support. + - add dpkg-dev 1.16.1 build-dep for hardening support. + * debian/xfdesktop4.lintian-overrides: dropped, obsolete. + + -- Lionel Le Folgoc Wed, 08 Feb 2012 07:46:07 +0100 + xfdesktop4 (4.8.3-1ubuntu9) precise; urgency=low * debian/patches: diff -Nru xfdesktop4-4.8.3/debian/patches/0001-Right-click-Drag-and-Drop.patch xfdesktop4-4.8.3/debian/patches/0001-Right-click-Drag-and-Drop.patch --- xfdesktop4-4.8.3/debian/patches/0001-Right-click-Drag-and-Drop.patch 1970-01-01 00:00:00.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/0001-Right-click-Drag-and-Drop.patch 2012-02-13 21:59:04.000000000 +0000 @@ -0,0 +1,274 @@ +From cf1ba8ecefacca369c4f83ece0b6d03b718fce06 Mon Sep 17 00:00:00 2001 +From: Eric Koegel +Date: Mon, 6 Feb 2012 08:45:06 +0300 +Subject: Right-click Drag and Drop + +Drag and drop right-click to and from the desktop will cause a +menu pop-up. Additionally, this patch also fixes the issue where +files that were dropped onto the desktop were always copied by +default instead of doing a move when they were on the same +filesystem. They were combined because the move/copy bug requires +code implemented in this right click drag and drop patch. + + Patch slightly edited for Xubuntu to reuse the same strings as Thunar. + +--- + src/xfdesktop-file-icon-manager.c | 146 ++++++++++++++++++++++++++++++++++++- + src/xfdesktop-icon-view.c | 20 +++-- + 2 files changed, 156 insertions(+), 10 deletions(-) + +diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c +index d3ca2eb..8b82fdc 100644 +--- a/src/xfdesktop-file-icon-manager.c ++++ b/src/xfdesktop-file-icon-manager.c +@@ -2778,6 +2778,92 @@ xfdesktop_file_icon_manager_drag_drop(XfdesktopIconViewManager *manager, + return TRUE; + } + ++static void xfdesktop_dnd_item(GtkWidget *item, GdkDragAction *action) ++{ ++ *action = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(item), "action")); ++} ++ ++static void xfdesktop_dnd_item_cancel(GtkWidget *item, GdkDragAction *action) ++{ ++ *action = 0; ++} ++ ++/** ++ * xfdesktop_dnd_menu: ++ * @manager : the #XfdesktopIconViewManager instance ++ * @drop_icon : the #XfdesktopIcon to which is being dropped. ++ * @context : the #GdkDragContext of the icons being dropped. ++ * @row : the row on the desktop to drop to. ++ * @col : the col on the desktop to drop to. ++ * @ time_ : the starting time of the drag event. ++ * Pops up a menu that asks the user to choose one of the ++ * actions or to cancel the drop. Sets context->action to ++ * the new action the user selected or 0 on cancel. ++ * Portions of this code was copied from thunar-dnd.c ++ * Copyright (c) 2005-2006 Benedikt Meurer ++ * Copyright (c) 2009-2011 Jannis Pohlmann ++ **/ ++static void xfdesktop_dnd_menu (XfdesktopIconViewManager *manager, ++ XfdesktopIcon *drop_icon, ++ GdkDragContext *context, ++ guint16 row, ++ guint16 col, ++ guint time_) ++{ ++ static GdkDragAction actions[] = { GDK_ACTION_COPY, GDK_ACTION_MOVE, GDK_ACTION_LINK }; ++ static const gchar *action_names[] = { N_ ("_Copy here") , N_ ("_Move here") , N_ ("_Link here") }; ++ static const gchar *action_icons[] = { "stock_folder-copy", "stock_folder-move", NULL }; ++ GtkWidget *menu; ++ GtkWidget *item; ++ GtkWidget *image; ++ guint menu_item, signal_id; ++ GMainLoop *loop; ++ gint response; ++ menu = gtk_menu_new(); ++ ++ /* This adds the Copy, Move, & Link options */ ++ for(menu_item = 0; menu_item < G_N_ELEMENTS(actions); menu_item++) { ++ item = gtk_image_menu_item_new_with_mnemonic(_(action_names[menu_item])); ++ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); ++ g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(xfdesktop_dnd_item), &response); ++ g_object_set_data(G_OBJECT(item), "action", GUINT_TO_POINTER(actions[menu_item])); ++ /* add image to the menu item */ ++ if(G_LIKELY(action_icons[menu_item] != NULL)) { ++ image = gtk_image_new_from_icon_name(action_icons[menu_item], GTK_ICON_SIZE_MENU); ++ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); ++ gtk_widget_show(image); ++ } ++ ++ gtk_widget_show(item); ++ } ++ ++ /* Add a seperator */ ++ item = gtk_separator_menu_item_new(); ++ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); ++ gtk_widget_show(item); ++ ++ /* Cancel option */ ++ item = gtk_image_menu_item_new_from_stock(GTK_STOCK_CANCEL, NULL); ++ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); ++ g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(xfdesktop_dnd_item_cancel), &response); ++ gtk_widget_show(item); ++ ++ gtk_widget_show(menu); ++ g_object_ref_sink(G_OBJECT(menu)); ++ ++ /* Loop until we get a user response */ ++ loop = g_main_loop_new(NULL, FALSE); ++ signal_id = g_signal_connect_swapped(G_OBJECT(menu), "deactivate", G_CALLBACK(g_main_loop_quit), loop); ++ gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 3, time_); ++ g_main_loop_run(loop); ++ g_signal_handler_disconnect(G_OBJECT(menu), signal_id); ++ g_main_loop_unref(loop); ++ ++ context->action = response; ++ ++ g_object_unref(G_OBJECT(menu)); ++} ++ + static void + xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager, + XfdesktopIcon *drop_icon, +@@ -2794,6 +2880,20 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager + GFile *tfile = NULL; + gboolean copy_only = TRUE, drop_ok = FALSE; + GList *file_list; ++ gboolean user_selected_action = FALSE; ++ ++ TRACE("entering"); ++ ++ if(context->action == GDK_ACTION_ASK) { ++ xfdesktop_dnd_menu(manager, drop_icon, context, row, col, time_); ++ ++ if(context->action == 0) { ++ gtk_drag_finish(context, FALSE, FALSE, time_); ++ return; ++ } ++ /* The user picked whether to move or copy the files */ ++ user_selected_action = TRUE; ++ } + + if(info == TARGET_XDND_DIRECT_SAVE0) { + /* we don't suppose XdndDirectSave stage 3, result F, i.e., the app +@@ -2866,7 +2966,7 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager + tinfo = xfdesktop_file_icon_peek_file_info(file_icon); + } + +- copy_only = (context->action != GDK_ACTION_MOVE); ++ copy_only = (context->action == GDK_ACTION_COPY); + + if(tfile && g_file_has_uri_scheme(tfile, "trash") && copy_only) { + gtk_drag_finish(context, FALSE, FALSE, time_); +@@ -2907,12 +3007,48 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager + base_dest_file = g_object_ref(fmanager->priv->folder); + } + ++ /* If the user didn't pick whether to copy or move via ++ * a GDK_ACTION_ASK then determine if we should move/copy ++ * by checking if the files are on the same file system. ++ */ ++ if(user_selected_action == FALSE) { ++ GFileInfo *src_info, *dest_info; ++ const gchar *src_name, *dest_name; ++ dest_info = g_file_query_info(base_dest_file, ++ G_FILE_ATTRIBUTE_ID_FILESYSTEM, ++ G_FILE_QUERY_INFO_NONE, ++ NULL, ++ NULL); ++ src_info = g_file_query_info(file_list->data, ++ G_FILE_ATTRIBUTE_ID_FILESYSTEM, ++ G_FILE_QUERY_INFO_NONE, ++ NULL, ++ NULL); ++ ++ if(dest_info != NULL && src_info != NULL) { ++ dest_name = g_file_info_get_attribute_string(dest_info, ++ G_FILE_ATTRIBUTE_ID_FILESYSTEM); ++ src_name = g_file_info_get_attribute_string(src_info, ++ G_FILE_ATTRIBUTE_ID_FILESYSTEM); ++ ++ if(g_strcmp0(src_name, dest_name) == 0) { ++ copy_only = FALSE; ++ context->action = GDK_ACTION_MOVE; ++ } ++ } ++ ++ if(dest_info != NULL) ++ g_object_unref(dest_info); ++ if(src_info != NULL) ++ g_object_unref(src_info); ++ } ++ + for (l = file_list; l; l = l->next) { + gchar *dest_basename = g_file_get_basename(l->data); + + if(dest_basename && *dest_basename != '\0') { + /* If we copy a file, we need to use the new absolute filename +- * as the destination. If we move, we need to use the destination ++ * as the destination. If we move or link, we need to use the destination + * directory. */ + if(copy_only) { + GFile *dest_file = g_file_get_child(base_dest_file, dest_basename); +@@ -2936,7 +3072,11 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager + fmanager->priv->gscreen); + } + +- xfdesktop_file_utils_file_list_free(dest_file_list); ++ if(copy_only) { ++ xfdesktop_file_utils_file_list_free(dest_file_list); ++ } else { ++ g_list_free(dest_file_list); ++ } + } + } + } +diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c +index 0736006..e1c918a 100644 +--- a/src/xfdesktop-icon-view.c ++++ b/src/xfdesktop-icon-view.c +@@ -48,6 +48,7 @@ + + #include "xfdesktop-icon-view.h" + #include "xfdesktop-marshal.h" ++#include "xfce-desktop.h" + + #include + #include +@@ -744,7 +745,7 @@ xfdesktop_icon_view_button_press(GtkWidget *widget, + xfdesktop_icon_view_select_item(icon_view, icon); + } + +- if(evt->button == 1) { ++ if(evt->button == 1 || evt->button == 3) { + /* we might be the start of a drag */ + DBG("setting stuff"); + icon_view->priv->maybe_begin_drag = TRUE; +@@ -752,10 +753,6 @@ xfdesktop_icon_view_button_press(GtkWidget *widget, + icon_view->priv->definitely_rubber_banding = FALSE; + icon_view->priv->press_start_x = evt->x; + icon_view->priv->press_start_y = evt->y; +- } else if(evt->button == 3) { +- /* XfceDesktop will handle signalling the icon view manager +- * to show the context menu */ +- return FALSE; + } + + return TRUE; +@@ -809,8 +806,11 @@ xfdesktop_icon_view_button_release(GtkWidget *widget, + XfdesktopIconView *icon_view = XFDESKTOP_ICON_VIEW(user_data); + + TRACE("entering btn=%d", evt->button); +- +- if(evt->button == 1) { ++ ++ if(evt->button == 3 && !icon_view->priv->definitely_dragging && !icon_view->priv->definitely_rubber_banding) ++ xfce_desktop_popup_root_menu(XFCE_DESKTOP(widget), evt->button, evt->time); ++ ++ if(evt->button == 1 || evt->button == 3) { + DBG("unsetting stuff"); + icon_view->priv->definitely_dragging = FALSE; + icon_view->priv->maybe_begin_drag = FALSE; +@@ -897,9 +897,15 @@ xfdesktop_icon_view_maybe_begin_drag(XfdesktopIconView *icon_view, + actions = GDK_ACTION_MOVE | (icon_view->priv->drag_source_set ? + icon_view->priv->foreign_source_actions : 0); + ++ if(evt->state != GDK_BUTTON3_MASK) { + gtk_drag_begin(GTK_WIDGET(icon_view), + icon_view->priv->source_targets, + actions, 1, (GdkEvent *)evt); ++ } else { ++ gtk_drag_begin(GTK_WIDGET(icon_view), ++ icon_view->priv->source_targets, ++ actions | GDK_ACTION_ASK, 3, (GdkEvent *)evt); ++ } + + DBG("DRAG BEGIN!"); + +-- +1.7.9 + diff -Nru xfdesktop4-4.8.3/debian/patches/0002-Added-a-check-for-GDK_GRAB_INVALID_TIME-in-xfdesktop.patch xfdesktop4-4.8.3/debian/patches/0002-Added-a-check-for-GDK_GRAB_INVALID_TIME-in-xfdesktop.patch --- xfdesktop4-4.8.3/debian/patches/0002-Added-a-check-for-GDK_GRAB_INVALID_TIME-in-xfdesktop.patch 1970-01-01 00:00:00.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/0002-Added-a-check-for-GDK_GRAB_INVALID_TIME-in-xfdesktop.patch 2012-02-13 22:53:41.000000000 +0000 @@ -0,0 +1,85 @@ +From 803ea66061417317df2b2968a81a4cfdfd052e8d Mon Sep 17 00:00:00 2001 +From: Eric Koegel +Date: Mon, 5 Dec 2011 14:44:59 +0300 +Subject: Added a check for GDK_GRAB_INVALID_TIME in + xfdesktop_popup_grab_available to mitigate slow menu popups on a + right mouse click. Fixes bug 7172. + +--- + common/xfdesktop-common.c | 5 ++++- + src/xfce-desktop.c | 40 ++++++++++++++++++++-------------------- + 2 files changed, 24 insertions(+), 21 deletions(-) + +diff --git a/common/xfdesktop-common.c b/common/xfdesktop-common.c +index 9e4f22c..64aee8d 100644 +--- a/common/xfdesktop-common.c ++++ b/common/xfdesktop-common.c +@@ -370,7 +370,10 @@ xfdesktop_popup_grab_available (GdkWindow *win, guint32 timestamp) + while ((i++ < 2500) && (grab_failed = ((g1 != GDK_GRAB_SUCCESS) + || (g2 != GDK_GRAB_SUCCESS)))) + { +- TRACE ("grab not available yet, waiting... (%i)", i); ++ TRACE ("grab not available yet, mouse reason: %d, keyboard reason: %d, waiting... (%i)", g1, g2, i); ++ if(g1 == GDK_GRAB_INVALID_TIME || g2 == GDK_GRAB_INVALID_TIME) ++ break; ++ + g_usleep (100); + if (g1 != GDK_GRAB_SUCCESS) + { +diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c +index cd98ae7..bcd4bd8 100644 +--- a/src/xfce-desktop.c ++++ b/src/xfce-desktop.c +@@ -1359,29 +1359,29 @@ xfce_desktop_do_menu_popup(XfceDesktop *desktop, + screen = gtk_widget_get_screen(GTK_WIDGET(desktop)); + else + screen = gdk_display_get_default_screen(gdk_display_get_default()); +- +- menu = gtk_menu_new(); +- gtk_menu_set_screen(GTK_MENU(menu), screen); +- g_signal_connect_swapped(G_OBJECT(menu), "deactivate", +- G_CALLBACK(g_idle_add), +- (gpointer)xfce_desktop_menu_destroy_idled); +- +- g_signal_emit(G_OBJECT(desktop), populate_signal, 0, menu); +- +- /* if nobody populated the menu, don't do anything */ +- menu_children = gtk_container_get_children(GTK_CONTAINER(menu)); +- if(!menu_children) { +- gtk_widget_destroy(menu); +- return; +- } +- +- g_list_free(menu_children); +- +- gtk_menu_attach_to_widget(GTK_MENU(menu), GTK_WIDGET(desktop), NULL); +- ++ + if(xfdesktop_popup_grab_available(gdk_screen_get_root_window(screen), + activate_time)) + { ++ menu = gtk_menu_new(); ++ gtk_menu_set_screen(GTK_MENU(menu), screen); ++ g_signal_connect_swapped(G_OBJECT(menu), "deactivate", ++ G_CALLBACK(g_idle_add), ++ (gpointer)xfce_desktop_menu_destroy_idled); ++ ++ g_signal_emit(G_OBJECT(desktop), populate_signal, 0, menu); ++ ++ /* if nobody populated the menu, don't do anything */ ++ menu_children = gtk_container_get_children(GTK_CONTAINER(menu)); ++ if(!menu_children) { ++ gtk_widget_destroy(menu); ++ return; ++ } ++ ++ g_list_free(menu_children); ++ ++ gtk_menu_attach_to_widget(GTK_MENU(menu), GTK_WIDGET(desktop), NULL); ++ + /* bug #3652: for some reason passing the correct button here breaks + * on some systems but not others. always pass 0 for now. */ + gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, +-- +1.7.9 + diff -Nru xfdesktop4-4.8.3/debian/patches/0003-Thumbnail-desktop-icon-previews-using-tumblerd.patch xfdesktop4-4.8.3/debian/patches/0003-Thumbnail-desktop-icon-previews-using-tumblerd.patch --- xfdesktop4-4.8.3/debian/patches/0003-Thumbnail-desktop-icon-previews-using-tumblerd.patch 1970-01-01 00:00:00.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/0003-Thumbnail-desktop-icon-previews-using-tumblerd.patch 2012-02-14 20:51:32.000000000 +0000 @@ -0,0 +1,1703 @@ +From d5e4dbea733153b74caba0e7a9c2bccc2ea5bf9c Mon Sep 17 00:00:00 2001 +From: Eric Koegel +Date: Fri, 10 Feb 2012 19:56:59 +0300 +Subject: Thumbnail desktop icon previews using tumblerd + +Adds support for drawing thumbnails from the dbus thumbnail +service. Adds a show-thumbnails xfconf property to toggle showing +thumbnails. Moves the marshal.list into the common folder. Creates +a checkbox option on the xfdesktop-settings app to toggle +thumbnails. Adds a tooltip-size gtk style property to change the +tooltip image size, ranges from 0 (not shown) to 512, with 128 +as the default. Added a timer when the icon size spinner changed +value in the settings app to prevent the icons redrawing on every +value change. Removed xfdesktop_icon_mark_extents_dirty so that +size changes to the pixbuf are properly rendered. Bug 4344. + + Slightly edited for Xubuntu to apply cleanly (doc/README.xfconf isn't + part of a release tarball), disable thumbnails by default, set the + default tooltip size to 0 and reuse the same string as Thunar. + +--- + README | 8 +- + common/Makefile.am | 37 ++- + common/xfdesktop-marshal.list | 4 + + common/xfdesktop-thumbnailer.c | 606 ++++++++++++++++++++++++++++++++++ + common/xfdesktop-thumbnailer.h | 76 +++++ + doc/README.xfconf | 1 + + settings/main.c | 60 +++- + settings/xfdesktop-settings-ui.glade | 11 + + src/Makefile.am | 16 +- + src/xfdesktop-file-icon-manager.c | 130 +++++++- + src/xfdesktop-file-icon-manager.h | 4 + + src/xfdesktop-icon-view.c | 54 ++-- + src/xfdesktop-icon.c | 51 ++-- + src/xfdesktop-icon.h | 7 +- + src/xfdesktop-marshal.list | 2 - + src/xfdesktop-regular-file-icon.c | 84 +++++- + 16 files changed, 1070 insertions(+), 81 deletions(-) + create mode 100644 common/xfdesktop-marshal.list + create mode 100644 common/xfdesktop-thumbnailer.c + create mode 100644 common/xfdesktop-thumbnailer.h + delete mode 100644 src/xfdesktop-marshal.list + +diff --git a/README b/README +index e8aad4b..ad68c54 100644 +--- a/README ++++ b/README +@@ -41,6 +41,7 @@ style "xfdesktop-icon-view" { + XfdesktopIconView::label-alpha = 75 + XfdesktopIconView::selected-label-alpha = 100 + XfdesktopIconVIew::ellipsize-icon-labels = 1 ++ XfdesktopIconView::tooltip-size = 128 + + XfdesktopIconView::shadow-x-offset = 1 + XfdesktopIconView::shadow-y-offset = 1 +@@ -63,11 +64,14 @@ style "xfdesktop-icon-view" { + } + widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view" + +-The first three entries set the opacity of the rounded text background ++The first four entries set the opacity of the rounded text background + (allowed values are from 0 (totally transparent) to 255 (totally opaque), + and whether or not unselected icons get their labels ellipsized + (truncated) to fit on one line. (The 'selected-' version controls the +-opacity of icons that have been selected with the mouse.) ++opacity of icons that have been selected with the mouse.) The tooltip-size ++determines how large the image preview will be when the mouse is hovered ++over an icon (allowed values are from 0 (not shown) to 512, values larger ++than 256 may cause poor image quality however.) + + The second six entries can be used to enable a text shadow to be painted + with the icon labels. The offsets are in pixels. Setting them to 0 (the +diff --git a/common/Makefile.am b/common/Makefile.am +index b6145ba..1af6ac8 100644 +--- a/common/Makefile.am ++++ b/common/Makefile.am +@@ -2,9 +2,44 @@ noinst_LTLIBRARIES = libxfdesktop.la + + libxfdesktop_la_SOURCES = \ + xfdesktop-common.c \ +- xfdesktop-common.h ++ xfdesktop-common.h \ ++ xfdesktop-marshal.c \ ++ xfdesktop-marshal.h + + libxfdesktop_la_CFLAGS = \ + -I$(top_srcdir)/src \ + $(LIBXFCE4UTIL_CFLAGS) \ + $(GTK_CFLAGS) ++ ++if ENABLE_DESKTOP_ICONS ++if ENABLE_FILE_ICONS ++ ++libxfdesktop_la_SOURCES += \ ++ xfdesktop-thumbnailer.c \ ++ xfdesktop-thumbnailer.h ++ ++libxfdesktop_la_CFLAGS += \ ++ -DDBUS_API_SUBJECT_TO_CHANGE \ ++ $(DBUS_CFLAGS) ++ ++endif ++endif ++ ++DISTCLEANFILES = \ ++ $(xfdesktop_built_sources) \ ++ stamp-xfdesktop-marshal.h \ ++ xfdesktop-marshal.c \ ++ xfdesktop-marshal.h ++ ++xfdesktop-marshal.h: stamp-xfdesktop-marshal.h ++ @true ++stamp-xfdesktop-marshal.h: xfdesktop-marshal.list Makefile ++ $(AM_V_GEN) glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --header > xfdesktop-marshal.h && \ ++ echo timestamp > $(@F) ++xfdesktop-marshal.c: xfdesktop-marshal.list Makefile ++ $(AM_V_GEN) echo '#include "xfdesktop-marshal.h"' > xfdesktop-marshal.c && \ ++ glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --body >> xfdesktop-marshal.c && \ ++ glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --header > xfdesktop-marshal.h ++ ++EXTRA_DIST = \ ++ xfdesktop-marshal.list +diff --git a/common/xfdesktop-marshal.list b/common/xfdesktop-marshal.list +new file mode 100644 +index 0000000..8fe4148 +--- /dev/null ++++ b/common/xfdesktop-marshal.list +@@ -0,0 +1,4 @@ ++BOOLEAN:VOID ++BOOLEAN:ENUM,INT ++VOID:UINT,BOXED ++VOID:STRING,STRING +diff --git a/common/xfdesktop-thumbnailer.c b/common/xfdesktop-thumbnailer.c +new file mode 100644 +index 0000000..3cc157b +--- /dev/null ++++ b/common/xfdesktop-thumbnailer.c +@@ -0,0 +1,606 @@ ++/* ++ * xfdesktop - xfce4's desktop manager ++ * ++ * Copyright(c) 2006 Brian Tarricone, ++ * Copyright(c) 2006 Benedikt Meurer, ++ * Copyright(c) 2010-2011 Jannis Pohlmann, ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ * xfdesktop-thumbnailer is based on thumbnailer code from Ristretto ++ * Copyright (c) Stephan Arts 2009-2011 ++ * ++ * Thumbnailer Spec ++ * http://live.gnome.org/ThumbnailerSpec ++ * Thumbnail Managing Standard ++ * http://people.freedesktop.org/~vuntz/thumbnail-spec-cache/creation.html ++ */ ++ ++#include ++ ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#include "xfdesktop-thumbnailer.h" ++#include "xfdesktop-marshal.h" ++ ++static void xfdesktop_thumbnailer_init(GObject *); ++static void xfdesktop_thumbnailer_class_init(GObjectClass *); ++ ++static void xfdesktop_thumbnailer_dispose(GObject *object); ++static void xfdesktop_thumbnailer_finalize(GObject *object); ++ ++static void xfdesktop_thumbnailer_request_finished_dbus(DBusGProxy *proxy, ++ gint handle, ++ gpointer data); ++ ++static void xfdesktop_thumbnailer_thumbnail_ready_dbus(DBusGProxy *proxy, ++ gint handle, ++ const gchar **uri, ++ gpointer data); ++ ++static gboolean xfdesktop_thumbnailer_queue_request_timer(XfdesktopThumbnailer *thumbnailer); ++ ++static GObjectClass *parent_class = NULL; ++static XfdesktopThumbnailer *thumbnailer_object = NULL; ++ ++enum ++{ ++ THUMBNAIL_READY, ++ LAST_SIGNAL, ++}; ++ ++static guint thumbnailer_signals[LAST_SIGNAL] = { 0, }; ++ ++GType ++xfdesktop_thumbnailer_get_type(void) ++{ ++ static GType xfdesktop_thumbnailer_type = 0; ++ ++ if(!xfdesktop_thumbnailer_type) { ++ static const GTypeInfo xfdesktop_thumbnailer_info = ++ { ++ sizeof (XfdesktopThumbnailerClass), ++ (GBaseInitFunc) NULL, ++ (GBaseFinalizeFunc) NULL, ++ (GClassInitFunc) xfdesktop_thumbnailer_class_init, ++ (GClassFinalizeFunc) NULL, ++ NULL, ++ sizeof (XfdesktopThumbnailer), ++ 0, ++ (GInstanceInitFunc) xfdesktop_thumbnailer_init, ++ NULL ++ }; ++ ++ xfdesktop_thumbnailer_type = g_type_register_static( ++ G_TYPE_OBJECT, ++ "XfdesktopThumbnailer", ++ &xfdesktop_thumbnailer_info, ++ 0); ++ } ++ return xfdesktop_thumbnailer_type; ++} ++ ++struct _XfdesktopThumbnailerPriv ++{ ++ DBusGProxy *proxy; ++ ++ GSList *queue; ++ gchar **supported_mimetypes; ++ gboolean big_thumbnails; ++ gint handle; ++ ++ gint request_timer_id; ++}; ++ ++static void ++xfdesktop_thumbnailer_init(GObject *object) ++{ ++ XfdesktopThumbnailer *thumbnailer; ++ DBusGConnection *connection; ++ ++ thumbnailer = XFDESKTOP_THUMBNAILER(object); ++ ++ thumbnailer->priv = g_new0(XfdesktopThumbnailerPriv, 1); ++ ++ connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); ++ ++ if(connection) { ++ thumbnailer->priv->proxy = dbus_g_proxy_new_for_name( ++ connection, ++ "org.freedesktop.thumbnails.Thumbnailer1", ++ "/org/freedesktop/thumbnails/Thumbnailer1", ++ "org.freedesktop.thumbnails.Thumbnailer1"); ++ ++ if(thumbnailer->priv->proxy) { ++ gchar **supported_uris; ++ gchar **supported_flavors; ++ ++ dbus_g_object_register_marshaller( ++ (GClosureMarshal) xfdesktop_marshal_VOID__UINT_BOXED, ++ G_TYPE_NONE, G_TYPE_UINT, ++ G_TYPE_STRV, G_TYPE_INVALID); ++ ++ dbus_g_proxy_add_signal( ++ thumbnailer->priv->proxy, ++ "Finished", G_TYPE_UINT, G_TYPE_INVALID); ++ dbus_g_proxy_add_signal( ++ thumbnailer->priv->proxy, ++ "Ready", G_TYPE_UINT, G_TYPE_STRV, G_TYPE_INVALID); ++ ++ dbus_g_proxy_connect_signal( ++ thumbnailer->priv->proxy, ++ "Finished", G_CALLBACK (xfdesktop_thumbnailer_request_finished_dbus), ++ thumbnailer, NULL); ++ dbus_g_proxy_connect_signal( ++ thumbnailer->priv->proxy, ++ "Ready", G_CALLBACK(xfdesktop_thumbnailer_thumbnail_ready_dbus), ++ thumbnailer, NULL); ++ ++ dbus_g_proxy_call(thumbnailer->priv->proxy, "GetSupported", NULL, G_TYPE_INVALID, ++ G_TYPE_STRV, &supported_uris, ++ G_TYPE_STRV, &thumbnailer->priv->supported_mimetypes, ++ G_TYPE_INVALID); ++ ++ dbus_g_proxy_call(thumbnailer->priv->proxy, "GetFlavors", NULL, G_TYPE_INVALID, ++ G_TYPE_STRV, &supported_flavors, ++ G_TYPE_INVALID); ++ ++ if(supported_flavors != NULL) { ++ gint n; ++ for(n = 0; supported_flavors[n] != NULL; ++n) { ++ g_debug("flavor: %s", supported_flavors[n]); ++ if(g_strcmp0(supported_flavors[n], "large")) { ++ thumbnailer->priv->big_thumbnails = TRUE; ++ } ++ } ++ } else { ++ thumbnailer->priv->big_thumbnails = FALSE; ++ g_debug("Thumbnailer failed to Get Flavors"); ++ } ++ ++ g_strfreev(supported_flavors); ++ g_strfreev(supported_uris); ++ } ++ ++ dbus_g_connection_unref(connection); ++ } ++} ++ ++static void ++xfdesktop_thumbnailer_class_init (GObjectClass *object_class) ++{ ++ XfdesktopThumbnailerClass *thumbnailer_class = XFDESKTOP_THUMBNAILER_CLASS(object_class); ++ ++ parent_class = g_type_class_peek_parent(thumbnailer_class); ++ ++ object_class->dispose = xfdesktop_thumbnailer_dispose; ++ object_class->finalize = xfdesktop_thumbnailer_finalize; ++ ++ thumbnailer_signals[THUMBNAIL_READY] = g_signal_new ( ++ "thumbnail-ready", ++ G_OBJECT_CLASS_TYPE (object_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET(XfdesktopThumbnailerClass, thumbnail_ready), ++ NULL, NULL, ++ xfdesktop_marshal_VOID__STRING_STRING, ++ G_TYPE_NONE, 2, ++ G_TYPE_STRING, G_TYPE_STRING); ++} ++ ++/** ++ * xfdesktop_thumbnailer_dispose: ++ * @object: ++ * ++ */ ++static void ++xfdesktop_thumbnailer_dispose(GObject *object) ++{ ++ XfdesktopThumbnailer *thumbnailer = XFDESKTOP_THUMBNAILER(object); ++ ++ if(thumbnailer->priv->proxy) ++ g_object_unref(thumbnailer->priv->proxy); ++ ++ if(thumbnailer->priv->supported_mimetypes) ++ g_free(thumbnailer->priv->supported_mimetypes); ++ ++ if(thumbnailer->priv) { ++ g_free(thumbnailer->priv); ++ thumbnailer->priv = NULL; ++ } ++ ++ thumbnailer_object = NULL; ++} ++ ++/** ++ * xfdesktop_thumbnailer_finalize: ++ * @object: ++ * ++ */ ++static void ++xfdesktop_thumbnailer_finalize(GObject *object) ++{ ++} ++ ++/** ++ * xfdesktop_thumbnailer_new: ++ * ++ * ++ * Singleton ++ */ ++XfdesktopThumbnailer * ++xfdesktop_thumbnailer_new(void) ++{ ++ if(thumbnailer_object == NULL) { ++ thumbnailer_object = g_object_new(XFDESKTOP_TYPE_THUMBNAILER, NULL); ++ } else { ++ g_object_ref(thumbnailer_object); ++ } ++ ++ return thumbnailer_object; ++} ++ ++static gchar * ++xfdesktop_get_file_mimetype(gchar *file) ++{ ++ GFile *temp_file; ++ GFileInfo *file_info; ++ gchar *mime_type = NULL; ++ ++ g_return_val_if_fail(file != NULL, NULL); ++ ++ temp_file = g_file_new_for_path(file); ++ ++ g_return_val_if_fail(temp_file != NULL, NULL); ++ ++ file_info = g_file_query_info(temp_file, ++ "standard::content-type", ++ 0, ++ NULL, ++ NULL); ++ ++ if(file_info != NULL) { ++ mime_type = g_strdup(g_file_info_get_content_type(file_info)); ++ ++ g_object_unref(file_info); ++ } ++ ++ g_object_unref(temp_file); ++ ++ return mime_type; ++} ++ ++gboolean ++xfdesktop_thumbnailer_is_supported(XfdesktopThumbnailer *thumbnailer, ++ gchar *file) ++{ ++ guint n; ++ gchar *mime_type = NULL; ++ ++ g_return_val_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer), FALSE); ++ g_return_val_if_fail(file != NULL, FALSE); ++ ++ mime_type = xfdesktop_get_file_mimetype(file); ++ ++ if(mime_type == NULL) { ++ g_warning("File has no mime type"); ++ return FALSE; ++ } ++ ++ if(thumbnailer->priv->supported_mimetypes != NULL) { ++ for(n = 0; thumbnailer->priv->supported_mimetypes[n] != NULL; ++n) { ++ if(g_content_type_is_a (mime_type, thumbnailer->priv->supported_mimetypes[n])) { ++ g_free(mime_type); ++ return TRUE; ++ } ++ } ++ } ++ ++ g_free(mime_type); ++ return FALSE; ++} ++ ++/** ++ * xfdesktop_thumbnailer_queue_thumbnail: ++ * ++ * Queues a file for thumbnail creation. ++ * A "thumbnail-ready" signal will be emitted when the thumbnail is ready. ++ * The signal will pass 2 parameters: a gchar *file which will be file ++ * that's passed in here and a gchar *thumbnail_file which will be the ++ * location of the thumbnail. ++ */ ++gboolean ++xfdesktop_thumbnailer_queue_thumbnail(XfdesktopThumbnailer *thumbnailer, ++ gchar *file) ++{ ++ g_return_val_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer), FALSE); ++ g_return_val_if_fail(file != NULL, FALSE); ++ ++ if(!xfdesktop_thumbnailer_is_supported(thumbnailer, file)) { ++ g_debug("file: %s not supported", file); ++ return FALSE; ++ } ++ if(thumbnailer->priv->request_timer_id) { ++ g_source_remove(thumbnailer->priv->request_timer_id); ++ ++ if(thumbnailer->priv->handle && thumbnailer->priv->proxy != NULL) { ++ if(dbus_g_proxy_call(thumbnailer->priv->proxy, ++ "Dequeue", ++ NULL, ++ G_TYPE_UINT, thumbnailer->priv->handle, ++ G_TYPE_INVALID) == FALSE) ++ { ++ g_warning("Dequeue of thumbnailer->priv->handle: %d failed", ++ thumbnailer->priv->handle); ++ } ++ ++ thumbnailer->priv->handle = 0; ++ } ++ } ++ ++ if(g_slist_find(thumbnailer->priv->queue, file) == NULL) { ++ thumbnailer->priv->queue = g_slist_prepend(thumbnailer->priv->queue, ++ file); ++ } ++ ++ thumbnailer->priv->request_timer_id = g_timeout_add_full( ++ G_PRIORITY_LOW, ++ 300, ++ (GSourceFunc)xfdesktop_thumbnailer_queue_request_timer, ++ thumbnailer, ++ NULL); ++ ++ return TRUE; ++} ++ ++/** ++ * xfdesktop_thumbnailer_dequeue_thumbnail: ++ * ++ * Removes a file from the list of pending thumbnail creations. ++ * This is not guaranteed to always remove the file, if processing ++ * of that thumbnail has started it won't stop. ++ */ ++void ++xfdesktop_thumbnailer_dequeue_thumbnail(XfdesktopThumbnailer *thumbnailer, ++ gchar *file) ++{ ++ g_return_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer)); ++ g_return_if_fail(file != NULL); ++ ++ if(thumbnailer->priv->request_timer_id) { ++ g_source_remove(thumbnailer->priv->request_timer_id); ++ ++ if(thumbnailer->priv->handle && thumbnailer->priv->proxy) { ++ if(dbus_g_proxy_call(thumbnailer->priv->proxy, ++ "Dequeue", ++ NULL, ++ G_TYPE_UINT, thumbnailer->priv->handle, ++ G_TYPE_INVALID) == FALSE) ++ { ++ g_warning("Dequeue of thumbnailer->priv->handle: %d failed", ++ thumbnailer->priv->handle); ++ } ++ } ++ thumbnailer->priv->handle = 0; ++ } ++ ++ if(g_slist_find(thumbnailer->priv->queue, file) != NULL) { ++ thumbnailer->priv->queue = g_slist_remove_all( ++ thumbnailer->priv->queue, ++ file); ++ } ++ ++ thumbnailer->priv->request_timer_id = g_timeout_add_full( ++ G_PRIORITY_LOW, ++ 300, ++ (GSourceFunc)xfdesktop_thumbnailer_queue_request_timer, ++ thumbnailer, ++ NULL); ++} ++ ++static gboolean ++xfdesktop_thumbnailer_queue_request_timer(XfdesktopThumbnailer *thumbnailer) ++{ ++ gchar **uris; ++ gchar **mimetypes; ++ GSList *iter; ++ gint i = 0; ++ GFile *file; ++ GError *error = NULL; ++ gchar *thumbnail_flavor; ++ ++ g_return_val_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer), FALSE); ++ ++ uris = g_new0(gchar *, ++ g_slist_length(thumbnailer->priv->queue) + 1); ++ mimetypes = g_new0(gchar *, ++ g_slist_length (thumbnailer->priv->queue) + 1); ++ ++ iter = thumbnailer->priv->queue; ++ while(iter) { ++ if(iter->data) { ++ file = g_file_new_for_path(iter->data); ++ uris[i] = g_file_get_uri(file); ++ mimetypes[i] = xfdesktop_get_file_mimetype(iter->data); ++ g_object_unref(file); ++ } ++ iter = g_slist_next(iter); ++ i++; ++ } ++ ++ if(thumbnailer->priv->big_thumbnails == TRUE) ++ thumbnail_flavor = "large"; ++ else ++ thumbnail_flavor = "normal"; ++ ++ if(thumbnailer->priv->proxy != NULL) { ++ if(dbus_g_proxy_call(thumbnailer->priv->proxy, ++ "Queue", ++ &error, ++ G_TYPE_STRV, uris, ++ G_TYPE_STRV, mimetypes, ++ G_TYPE_STRING, thumbnail_flavor, ++ G_TYPE_STRING, "default", ++ G_TYPE_UINT, 0, ++ G_TYPE_INVALID, ++ G_TYPE_UINT, &thumbnailer->priv->handle, ++ G_TYPE_INVALID) == FALSE) ++ { ++ if(error != NULL) ++ g_warning("DBUS-call failed: %s", error->message); ++ } ++ } ++ ++ g_free(uris); ++ g_free(mimetypes); ++ ++ if(error) ++ g_error_free(error); ++ ++ thumbnailer->priv->request_timer_id = 0; ++ ++ return FALSE; ++} ++ ++static void ++xfdesktop_thumbnailer_request_finished_dbus(DBusGProxy *proxy, ++ gint handle, ++ gpointer data) ++{ ++ XfdesktopThumbnailer *thumbnailer = XFDESKTOP_THUMBNAILER(data); ++ ++ g_return_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer)); ++ ++ thumbnailer->priv->handle = 0; ++} ++ ++static void ++xfdesktop_thumbnailer_thumbnail_ready_dbus(DBusGProxy *proxy, ++ gint handle, ++ const gchar **uri, ++ gpointer data) ++{ ++ XfdesktopThumbnailer *thumbnailer = XFDESKTOP_THUMBNAILER(data); ++ gchar *thumbnail_location; ++ GFile *file; ++ GSList *iter = thumbnailer->priv->queue; ++ gchar *f_uri, *f_uri_checksum, *filename; ++ gchar *thumbnail_flavor; ++ gint x = 0; ++ ++ g_return_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer)); ++ ++ while(iter) { ++ if((uri[x] == NULL) || (iter->data == NULL)) { ++ break; ++ } ++ ++ file = g_file_new_for_path(iter->data); ++ f_uri = g_file_get_uri(file); ++ ++ if(strcmp (uri[x], f_uri) == 0) { ++ /* The thumbnail is in the format/location ++ * /homedir/.thumbnails/(normal|large)/MD5_Hash_Of_URI.png ++ */ ++ f_uri_checksum = g_compute_checksum_for_string(G_CHECKSUM_MD5, ++ f_uri, strlen (f_uri)); ++ ++ if(thumbnailer->priv->big_thumbnails == TRUE) ++ thumbnail_flavor = "large"; ++ else ++ thumbnail_flavor = "normal"; ++ ++ filename = g_strconcat(f_uri_checksum, ".png", NULL); ++ ++ thumbnail_location = g_build_path("/", g_get_home_dir(), ++ ".thumbnails", thumbnail_flavor, ++ filename, NULL); ++ ++ g_debug("thumbnail-ready src: %s thumbnail: %s", ++ (char*)iter->data, ++ thumbnail_location); ++ ++ g_signal_emit(G_OBJECT(thumbnailer), ++ thumbnailer_signals[THUMBNAIL_READY], ++ 0, ++ iter->data, ++ thumbnail_location); ++ ++ thumbnailer->priv->queue = g_slist_remove(thumbnailer->priv->queue, ++ iter->data); ++ ++ iter = thumbnailer->priv->queue; ++ x++; ++ ++ g_free(filename); ++ g_free(f_uri_checksum); ++ } else { ++ iter = g_slist_next(iter); ++ } ++ ++ g_object_unref(file); ++ g_free(f_uri); ++ } ++} ++ ++/** ++ * xfdesktop_thumbnailer_delete_thumbnail: ++ * ++ * Tells the thumbnail service the src_file will be deleted. ++ * This function should be called when the file is deleted or moved so ++ * the thumbnail file doesn't take up space on the user's drive. ++ */ ++void ++xfdesktop_thumbnailer_delete_thumbnail(XfdesktopThumbnailer *thumbnailer, gchar *src_file) ++{ ++ DBusGConnection *connection; ++ gchar **uris; ++ GFile *file; ++ GError *error = NULL; ++ static DBusGProxy *cache = NULL; ++ ++ if(!cache) { ++ connection = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); ++ if (connection != NULL) { ++ cache = dbus_g_proxy_new_for_name(connection, ++ "org.freedesktop.thumbnails.Cache1", ++ "/org/freedesktop/thumbnails/Cache1", ++ "org.freedesktop.thumbnails.Cache1"); ++ ++ dbus_g_connection_unref(connection); ++ } ++ } ++ ++ file = g_file_new_for_path(src_file); ++ ++ if(cache) { ++ uris = g_new0 (gchar *, 2); ++ uris[0] = g_file_get_uri(file); ++ dbus_g_proxy_call(cache, "Delete", &error, G_TYPE_STRV, uris, G_TYPE_INVALID, G_TYPE_INVALID); ++ if(error != NULL) { ++ g_warning("DBUS-call failed:%s", error->message); ++ } ++ g_free(uris); ++ } ++ ++ g_object_unref(file); ++ if(error) ++ g_error_free(error); ++} +diff --git a/common/xfdesktop-thumbnailer.h b/common/xfdesktop-thumbnailer.h +new file mode 100644 +index 0000000..842f155 +--- /dev/null ++++ b/common/xfdesktop-thumbnailer.h +@@ -0,0 +1,76 @@ ++/* ++ * xfdesktop - xfce4's desktop manager ++ * ++ * Copyright(c) 2006 Brian Tarricone, ++ * Copyright(c) 2006 Benedikt Meurer, ++ * Copyright(c) 2010-2011 Jannis Pohlmann, ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ * xfdesktop-thumbnailer is based on thumbnailer code from Ristretto ++ * Copyright (c) Stephan Arts 2009-2011 ++ */ ++ ++#ifndef __XFDESKTOP_THUMBNAILER_H__ ++#define __XFDESKTOP_THUMBNAILER_H__ ++ ++#include ++ ++G_BEGIN_DECLS ++ ++#define XFDESKTOP_TYPE_THUMBNAILER (xfdesktop_thumbnailer_get_type()) ++#define XFDESKTOP_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), XFDESKTOP_TYPE_THUMBNAILER, XfdesktopThumbnailer)) ++#define XFDESKTOP_IS_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDESKTOP_TYPE_THUMBNAILER)) ++#define XFDESKTOP_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFDESKTOP_TYPE_THUMBNAILER, XfdesktopThumbnailerClass)) ++#define XFDESKTOP_IS_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFDESKTOP_TYPE_THUMBNAILER())) ++ ++typedef struct _XfdesktopThumbnailer XfdesktopThumbnailer; ++typedef struct _XfdesktopThumbnailerPriv XfdesktopThumbnailerPriv; ++ ++struct _XfdesktopThumbnailer ++{ ++ GObject parent; ++ ++ XfdesktopThumbnailerPriv *priv; ++}; ++ ++typedef struct _XfdesktopThumbnailerClass XfdesktopThumbnailerClass; ++ ++struct _XfdesktopThumbnailerClass ++{ ++ GObjectClass parent_class; ++ ++ /*< signals >*/ ++ void (*thumbnail_ready)(gchar *src_file, gchar *thumb_file); ++}; ++ ++XfdesktopThumbnailer * xfdesktop_thumbnailer_new(void); ++ ++GType xfdesktop_thumbnailer_get_type(void); ++ ++gboolean xfdesktop_thumbnailer_is_supported(XfdesktopThumbnailer *thumbnailer, ++ gchar *file); ++ ++gboolean xfdesktop_thumbnailer_queue_thumbnail(XfdesktopThumbnailer *thumbnailer, ++ gchar *file); ++void xfdesktop_thumbnailer_dequeue_thumbnail(XfdesktopThumbnailer *thumbnailer, ++ gchar *file); ++ ++void xfdesktop_thumbnailer_delete_thumbnail(XfdesktopThumbnailer *thumbnailer, ++ gchar *src_file); ++ ++G_END_DECLS ++ ++#endif /* __XFDESKTOP_THUMBNAILER_H__ */ +diff --git a/settings/main.c b/settings/main.c +index 1f76be9..a6be3b8 100644 +--- a/settings/main.c ++++ b/settings/main.c +@@ -70,6 +70,7 @@ + #define DESKTOP_ICONS_ICON_SIZE_PROP "/desktop-icons/icon-size" + #define DESKTOP_ICONS_FONT_SIZE_PROP "/desktop-icons/font-size" + #define DESKTOP_ICONS_CUSTOM_FONT_SIZE_PROP "/desktop-icons/use-custom-font-size" ++#define DESKTOP_ICONS_SHOW_THUMBNAILS_PROP "/desktop-icons/show-thumbnails" + #define DESKTOP_ICONS_SHOW_HOME "/desktop-icons/file-icons/show-home" + #define DESKTOP_ICONS_SHOW_TRASH "/desktop-icons/file-icons/show-trash" + #define DESKTOP_ICONS_SHOW_FILESYSTEM "/desktop-icons/file-icons/show-filesystem" +@@ -759,6 +760,41 @@ cb_xfdesktop_chk_custom_font_size_toggled(GtkCheckButton *button, + } + + static gboolean ++xfdesktop_spin_icon_size_timer(GtkSpinButton *button) ++{ ++ XfconfChannel *channel = g_object_get_data(G_OBJECT(button), "xfconf-chanel"); ++ ++ g_return_val_if_fail(XFCONF_IS_CHANNEL(channel), FALSE); ++ ++ xfconf_channel_set_uint(channel, ++ DESKTOP_ICONS_ICON_SIZE_PROP, ++ gtk_spin_button_get_value(button)); ++ ++ return FALSE; ++} ++ ++static void ++cb_xfdesktop_spin_icon_size_changed(GtkSpinButton *button, ++ gpointer user_data) ++{ ++ guint timer_id = 0; ++ ++ g_object_set_data(G_OBJECT(button), "xfconf-chanel", user_data); ++ ++ timer_id = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(button), "timer-id")); ++ if(timer_id != 0) { ++ g_source_remove(timer_id); ++ timer_id = 0; ++ } ++ ++ timer_id = g_timeout_add(2000, ++ (GSourceFunc)xfdesktop_spin_icon_size_timer, ++ button); ++ ++ g_object_set_data(G_OBJECT(button), "timer-id", GUINT_TO_POINTER(timer_id)); ++} ++ ++static gboolean + xfdesktop_settings_save_backdrop_list(AppearancePanel *panel, + GtkTreeModel *model) + { +@@ -1226,12 +1262,24 @@ xfdesktop_settings_dialog_new(GtkBuilder + { + gint i, j, nmonitors, nscreens; + GtkWidget *dialog, *appearance_container, *chk_custom_font_size, +- *spin_font_size, *color_style_widget, *w, *box; ++ *spin_font_size, *color_style_widget, *w, *box, ++ *spin_icon_size, *chk_show_thumbnails; + + dialog = GTK_WIDGET(gtk_builder_get_object(main_gxml, "prefs_dialog")); + appearance_container = GTK_WIDGET(gtk_builder_get_object(main_gxml, + "notebook_screens")); + ++ spin_icon_size = GTK_WIDGET(gtk_builder_get_object(main_gxml, "spin_icon_size")); ++ ++ g_signal_connect(G_OBJECT(spin_icon_size), "value-changed", ++ G_CALLBACK(cb_xfdesktop_spin_icon_size_changed), ++ channel); ++ ++ gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_icon_size), ++ xfconf_channel_get_uint(channel, ++ DESKTOP_ICONS_ICON_SIZE_PROP, ++ DEFAULT_ICON_SIZE)); ++ + chk_custom_font_size = GTK_WIDGET(gtk_builder_get_object(main_gxml, + "chk_custom_font_size")); + spin_font_size = GTK_WIDGET(gtk_builder_get_object(main_gxml, "spin_font_size")); +@@ -1240,6 +1288,9 @@ xfdesktop_settings_dialog_add_screens(GtkBuilder *main_gxml, + G_CALLBACK(cb_xfdesktop_chk_custom_font_size_toggled), + spin_font_size); + ++ chk_show_thumbnails = GTK_WIDGET(gtk_builder_get_object(main_gxml, ++ "chk_show_thumbnails")); ++ + nscreens = gdk_display_get_n_screens(gdk_display_get_default()); + + for(i = 0; i < nscreens; ++i) { +@@ -1478,16 +1529,15 @@ xfdesktop_settings_dialog_new(GtkBuilder + #endif + xfconf_g_property_bind(channel, DESKTOP_ICONS_STYLE_PROP, G_TYPE_INT, + G_OBJECT(w), "active"); +- xfconf_g_property_bind(channel, DESKTOP_ICONS_ICON_SIZE_PROP, G_TYPE_UINT, +- G_OBJECT(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(gtk_builder_get_object(main_gxml, +- "spin_icon_size")))), +- "value"); + xfconf_g_property_bind(channel, DESKTOP_ICONS_FONT_SIZE_PROP, G_TYPE_DOUBLE, + G_OBJECT(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(spin_font_size))), + "value"); + xfconf_g_property_bind(channel, DESKTOP_ICONS_CUSTOM_FONT_SIZE_PROP, + G_TYPE_BOOLEAN, G_OBJECT(chk_custom_font_size), + "active"); ++ xfconf_g_property_bind(channel, DESKTOP_ICONS_SHOW_THUMBNAILS_PROP, ++ G_TYPE_BOOLEAN, G_OBJECT(chk_show_thumbnails), ++ "active"); + + setup_special_icon_list(main_gxml, channel); + +diff --git a/settings/xfdesktop-settings-ui.glade b/settings/xfdesktop-settings-ui.glade +index 0ae289c..5fcc836 100644 +--- a/settings/xfdesktop-settings-ui.glade ++++ b/settings/xfdesktop-settings-ui.glade +@@ -685,6 +685,17 @@ + + + ++ ++ True ++ True ++ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK ++ _Show thumbnails ++ Select this option to display preview-able files on the desktop as automatically generated thumbnail icons. ++ True ++ True ++ ++ ++ + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK +diff --git a/src/Makefile.am b/src/Makefile.am +index 5d1fd4d..3adb3d2 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -4,9 +4,7 @@ bin_PROGRAMS = xfdesktop + + xfdesktop_built_sources = \ + xfce-desktop-enum-types.c \ +- xfce-desktop-enum-types.h \ +- xfdesktop-marshal.c \ +- xfdesktop-marshal.h ++ xfce-desktop-enum-types.h + + if HAVE_LIBNOTIFY + xfdesktop_notify_sources = \ +@@ -149,17 +147,8 @@ BUILT_SOURCES = \ + + DISTCLEANFILES = \ + $(xfdesktop_built_sources) \ +- stamp-xfdesktop-marshal.h \ + stamp-xfce-desktop-enum-types.h + +-xfdesktop-marshal.h: stamp-xfdesktop-marshal.h +- @true +-stamp-xfdesktop-marshal.h: xfdesktop-marshal.list Makefile +- $(AM_V_GEN) glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --header > xfdesktop-marshal.h && \ +- echo timestamp > $(@F) +-xfdesktop-marshal.c: xfdesktop-marshal.list Makefile +- $(AM_V_GEN) echo '#include "xfdesktop-marshal.h"' > xfdesktop-marshal.c && \ +- glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --body >> xfdesktop-marshal.c + + enum_headers = \ + xfce-backdrop.h \ +@@ -227,5 +216,4 @@ endif + EXTRA_DIST = \ + $(desktop_menu_sources) \ + $(desktop_icon_sources) \ +- $(desktop_file_icon_sources) \ +- xfdesktop-marshal.list ++ $(desktop_file_icon_sources) +diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c +index 8b82fdc..5a897a1 100644 +--- a/src/xfdesktop-file-icon-manager.c ++++ b/src/xfdesktop-file-icon-manager.c +@@ -71,6 +71,7 @@ + #include "xfdesktop-special-file-icon.h" + #include "xfdesktop-trash-proxy.h" + #include "xfdesktop-volume-icon.h" ++#include "xfdesktop-thumbnailer.h" + + #include + #include +@@ -82,6 +83,7 @@ + #define SETTING_SHOW_HOME "/desktop-icons/file-icons/show-home" + #define SETTING_SHOW_TRASH "/desktop-icons/file-icons/show-trash" + #define SETTING_SHOW_REMOVABLE "/desktop-icons/file-icons/show-removable" ++#define SETTING_SHOW_THUMBNAILS "/desktop-icons/show-thumbnails" + + enum + { +@@ -91,6 +93,7 @@ enum + PROP_SHOW_HOME, + PROP_SHOW_TRASH, + PROP_SHOW_REMOVABLE, ++ PROP_SHOW_THUMBNAILS + }; + + struct _XfdesktopFileIconManagerPrivate +@@ -117,6 +120,7 @@ struct _XfdesktopFileIconManagerPrivate + + gboolean show_removable_media; + gboolean show_special[XFDESKTOP_SPECIAL_FILE_ICON_TRASH+1]; ++ gboolean show_thumbnails; + + guint save_icons_id; + +@@ -129,6 +133,8 @@ struct _XfdesktopFileIconManagerPrivate + GList *thunarx_menu_providers; + GList *thunarx_properties_providers; + #endif ++ ++ XfdesktopThumbnailer *thumbnailer; + }; + + static void xfdesktop_file_icon_manager_set_property(GObject *object, +@@ -175,6 +181,10 @@ static void xfdesktop_file_icon_manager_remove_removable_media(XfdesktopFileIcon + static void xfdesktop_file_icon_position_changed(XfdesktopFileIcon *icon, + gpointer user_data); + ++static void xfdesktop_file_icon_manager_update_image(GtkWidget *widget, ++ gchar *srcfile, ++ gchar *thumbfile, ++ XfdesktopFileIconManager *fmanager); + + G_DEFINE_TYPE_EXTENDED(XfdesktopFileIconManager, + xfdesktop_file_icon_manager, +@@ -264,6 +274,12 @@ xfdesktop_file_icon_manager_class_init(XfdesktopFileIconManagerClass *klass) + "show removable", + TRUE, + XFDESKTOP_PARAM_FLAGS)); ++ g_object_class_install_property(gobject_class, PROP_SHOW_THUMBNAILS, ++ g_param_spec_boolean("show-thumbnails", ++ "show-thumbnails", ++ "show-thumbnails", ++ FALSE, ++ XFDESKTOP_PARAM_FLAGS)); + #undef XFDESKTOP_PARAM_FLAGS + + xfdesktop_app_info_quark = g_quark_from_static_string("xfdesktop-app-info-quark"); +@@ -282,6 +298,10 @@ xfdesktop_file_icon_manager_init(XfdesktopFileIconManager *fmanager) + n_drag_targets); + fmanager->priv->drop_targets = gtk_target_list_new(drop_targets, + n_drop_targets); ++ ++ fmanager->priv->thumbnailer = xfdesktop_thumbnailer_new(); ++ ++ g_signal_connect(G_OBJECT(fmanager->priv->thumbnailer), "thumbnail-ready", G_CALLBACK(xfdesktop_file_icon_manager_update_image), fmanager); + } + + static void +@@ -321,6 +341,11 @@ xfdesktop_file_icon_manager_set_property(GObject *object, + g_value_get_boolean(value)); + break; + ++ case PROP_SHOW_THUMBNAILS: ++ xfdesktop_file_icon_manager_set_show_thumbnails(fmanager, ++ g_value_get_boolean(value)); ++ break; ++ + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); + } +@@ -357,6 +382,10 @@ xfdesktop_file_icon_manager_get_property(GObject *object, + case PROP_SHOW_REMOVABLE: + g_value_set_boolean(value, fmanager->priv->show_removable_media); + break; ++ ++ case PROP_SHOW_THUMBNAILS: ++ g_value_set_boolean(value, fmanager->priv->show_thumbnails); ++ break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); +@@ -377,6 +406,7 @@ xfdesktop_file_icon_manager_finalize(GObject *obj) + gtk_target_list_unref(fmanager->priv->drop_targets); + + g_object_unref(fmanager->priv->folder); ++ g_object_unref(fmanager->priv->thumbnailer); + + G_OBJECT_CLASS(xfdesktop_file_icon_manager_parent_class)->finalize(obj); + } +@@ -1829,6 +1859,15 @@ xfdesktop_file_icon_manager_add_icon(XfdesktopFileIconManager *fmanager, + gint16 row = -1, col = -1; + gboolean do_add = FALSE; + const gchar *name; ++ GFile *file; ++ ++ file = xfdesktop_file_icon_peek_file(icon); ++ ++ if(fmanager->priv->show_thumbnails && g_file_get_path(file) != NULL) { ++ xfdesktop_thumbnailer_queue_thumbnail(fmanager->priv->thumbnailer, ++ g_file_get_path(file)); ++ } ++ + + name = xfdesktop_icon_peek_label(XFDESKTOP_ICON(icon)); + if(xfdesktop_file_icon_manager_get_cached_icon_position(fmanager, name, +@@ -1839,7 +1878,6 @@ xfdesktop_file_icon_manager_add_icon(XfdesktopFileIconManager *fmanager, + do_add = TRUE; + } else { + if(defer_if_missing) { +- GFile *file = xfdesktop_file_icon_peek_file(icon); + fmanager->priv->deferred_icons = g_list_prepend(fmanager->priv->deferred_icons, + g_object_ref(file)); + } else +@@ -2195,6 +2233,13 @@ xfdesktop_file_icon_manager_file_changed(GFileMonitor *monitor, + + icon = g_hash_table_lookup(fmanager->priv->icons, file); + if(icon) { ++ /* Always try to remove thumbnail so it doesn't take up ++ * space on the user's disk. ++ */ ++ xfdesktop_thumbnailer_delete_thumbnail(fmanager->priv->thumbnailer, ++ g_file_get_path(file)); ++ xfdesktop_icon_delete_thumbnail(XFDESKTOP_ICON(icon)); ++ + xfdesktop_icon_view_remove_item(fmanager->priv->icon_view, + XFDESKTOP_ICON(icon)); + g_hash_table_remove(fmanager->priv->icons, file); +@@ -3136,6 +3181,8 @@ xfdesktop_file_icon_manager_new(GFile *folder, + G_OBJECT(fmanager), "show-trash"); + xfconf_g_property_bind(channel, SETTING_SHOW_REMOVABLE, G_TYPE_BOOLEAN, + G_OBJECT(fmanager), "show-removable"); ++ xfconf_g_property_bind(channel, SETTING_SHOW_THUMBNAILS, G_TYPE_BOOLEAN, ++ G_OBJECT(fmanager), "show-thumbnails"); + + return XFDESKTOP_ICON_VIEW_MANAGER(fmanager); + } +@@ -3167,6 +3214,64 @@ xfdesktop_file_icon_manager_get_show_removable_media(XfdesktopFileIconManager *m + return manager->priv->show_removable_media; + } + ++static void ++xfdesktop_file_icon_manager_requeue_thumbnails(gpointer key, ++ gpointer value, ++ gpointer data) ++{ ++ GFile *file = key; ++ XfdesktopFileIconManager *fmanager = XFDESKTOP_FILE_ICON_MANAGER(data); ++ ++ xfdesktop_thumbnailer_queue_thumbnail(fmanager->priv->thumbnailer, ++ g_file_get_path(file)); ++} ++ ++static void ++xfdesktop_file_icon_manager_remove_thumbnails(gpointer key, ++ gpointer value, ++ gpointer data) ++{ ++ XfdesktopRegularFileIcon *icon = XFDESKTOP_REGULAR_FILE_ICON(value); ++ ++ xfdesktop_icon_delete_thumbnail(XFDESKTOP_ICON(icon)); ++} ++ ++void ++xfdesktop_file_icon_manager_set_show_thumbnails(XfdesktopFileIconManager *manager, ++ gboolean show_thumbnails) ++{ ++ g_return_if_fail(XFDESKTOP_IS_FILE_ICON_MANAGER(manager)); ++ ++ if(show_thumbnails == manager->priv->show_thumbnails) ++ return; ++ ++ manager->priv->show_thumbnails = show_thumbnails; ++ ++ if(!manager->priv->inited) ++ return; ++ ++ if(show_thumbnails) { ++ /* We have to request to create the thumbnails everytime. */ ++ g_hash_table_foreach(manager->priv->icons, ++ xfdesktop_file_icon_manager_requeue_thumbnails, ++ manager); ++ } else { ++ /* We have to remove the thumbnails because the regular file ++ * icons can't easily check if thumbnails are allowed. ++ */ ++ g_hash_table_foreach(manager->priv->icons, ++ xfdesktop_file_icon_manager_remove_thumbnails, ++ manager); ++ } ++} ++ ++gboolean ++xfdesktop_file_icon_manager_get_show_thumbnails(XfdesktopFileIconManager *manager) ++{ ++ g_return_val_if_fail(XFDESKTOP_IS_FILE_ICON_MANAGER(manager), FALSE); ++ return manager->priv->show_thumbnails; ++} ++ + void + xfdesktop_file_icon_manager_set_show_special_file(XfdesktopFileIconManager *manager, + XfdesktopSpecialFileIconType type, +@@ -3208,3 +3313,26 @@ xfdesktop_file_icon_manager_get_show_special_file(XfdesktopFileIconManager *mana + + return manager->priv->show_special[type]; + } ++ ++static void ++xfdesktop_file_icon_manager_update_image(GtkWidget *widget, ++ gchar *srcfile, ++ gchar *thumbfile, ++ XfdesktopFileIconManager *manager) ++{ ++ GFile *file; ++ XfdesktopIcon *icon; ++ ++ g_return_if_fail(srcfile && thumbfile); ++ g_return_if_fail(XFDESKTOP_FILE_ICON_MANAGER(manager)); ++ ++ file = g_file_new_for_path(srcfile); ++ ++ icon = g_hash_table_lookup(manager->priv->icons, file); ++ if(icon) ++ { ++ g_object_unref(file); ++ file = g_file_new_for_path(thumbfile); ++ xfdesktop_icon_set_thumbnail_file(icon, file); ++ } ++} +diff --git a/src/xfdesktop-file-icon-manager.h b/src/xfdesktop-file-icon-manager.h +index 703a6f4..1c45ecb 100644 +--- a/src/xfdesktop-file-icon-manager.h ++++ b/src/xfdesktop-file-icon-manager.h +@@ -64,6 +64,10 @@ void xfdesktop_file_icon_manager_set_show_special_file(XfdesktopFileIconManager + gboolean show_special_file); + gboolean xfdesktop_file_icon_manager_get_show_special_file(XfdesktopFileIconManager *manager, + XfdesktopSpecialFileIconType type); ++void xfdesktop_file_icon_manager_set_show_thumbnails(XfdesktopFileIconManager *manager, ++ gboolean show_thumbnails); ++gboolean xfdesktop_file_icon_manager_get_show_thumbnails(XfdesktopFileIconManager *manager); ++ + + G_END_DECLS + +diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c +index e1c918a..fb18856 100644 +--- a/src/xfdesktop-icon-view.c ++++ b/src/xfdesktop-icon-view.c +@@ -169,6 +169,7 @@ struct _XfdesktopIconViewPrivate + gdouble cell_text_width_proportion; + + gboolean ellipsize_icon_labels; ++ guint tooltip_size; + }; + + static gboolean xfdesktop_icon_view_button_press(GtkWidget *widget, +@@ -546,6 +547,13 @@ xfdesktop_icon_view_class_init(XfdesktopIconViewClass *klass) + 0.0, 50.0, 4.0, + G_PARAM_READABLE)); + ++ gtk_widget_class_install_style_property(widget_class, ++ g_param_spec_uint("tooltip-size", ++ "Tooltip Image Size", ++ "The size of the tooltip image preview", ++ 0, 512, 0, ++ G_PARAM_READABLE)); ++ + /* same binding entries as GtkIconView */ + gtk_binding_entry_add_signal(binding_set, GDK_a, GDK_CONTROL_MASK, + "select-all", 0); +@@ -932,7 +940,13 @@ xfdesktop_icon_view_show_tooltip(GtkWidget *widget, + tip_text = xfdesktop_icon_peek_tooltip(icon_view->priv->item_under_pointer); + if(!tip_text) + return FALSE; +- ++ ++ if(icon_view->priv->tooltip_size > 0) { ++ gtk_tooltip_set_icon(tooltip, ++ xfdesktop_icon_peek_pixbuf(icon_view->priv->item_under_pointer, ++ icon_view->priv->tooltip_size)); ++ } ++ + gtk_tooltip_set_text(tooltip, tip_text); + + return TRUE; +@@ -1382,7 +1396,6 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget, + + /* clear out old extents, if any */ + /* FIXME: is this right? */ +- //xfdesktop_icon_mark_extents_dirty(icon); + xfdesktop_icon_view_invalidate_icon(icon_view, icon, TRUE); + + DBG("drag succeeded"); +@@ -1520,12 +1533,14 @@ xfdesktop_icon_view_style_set(GtkWidget *widget, + "cell-padding", &icon_view->priv->cell_padding, + "cell-text-width-proportion", &icon_view->priv->cell_text_width_proportion, + "ellipsize-icon-labels", &icon_view->priv->ellipsize_icon_labels, ++ "tooltip-size", &icon_view->priv->tooltip_size, + NULL); + + DBG("cell spacing is %d", icon_view->priv->cell_spacing); + DBG("cell padding is %d", icon_view->priv->cell_padding); + DBG("cell text width proportion is %f", icon_view->priv->cell_text_width_proportion); + DBG("ellipsize icon label is %s", icon_view->priv->ellipsize_icon_labels?"true":"false"); ++ DBG("tooltip size is %d", icon_view->priv->tooltip_size); + + if(icon_view->priv->selection_box_color) { + gdk_color_free(icon_view->priv->selection_box_color); +@@ -2628,29 +2643,17 @@ xfdesktop_icon_view_paint_icon(XfdesktopIconView *icon_view, + + playout = icon_view->priv->playout; + +- if(xfdesktop_icon_get_extents(icon, &pixbuf_extents, +- &text_extents, &total_extents)) ++ xfdesktop_icon_get_extents(icon, &pixbuf_extents, ++ &text_extents, &total_extents); ++ xfdesktop_icon_view_setup_pango_layout(icon_view, icon, playout); ++ ++ if(!xfdesktop_icon_view_update_icon_extents(icon_view, icon, ++ &pixbuf_extents, ++ &text_extents, ++ &total_extents)) + { +- xfdesktop_icon_view_setup_pango_layout(icon_view, icon, playout); +- } else { +- /* if we get here, it's likely that the expose area doesn't +- * include everything we *actually* need to repaint. the +- * extents should be recalculated before invalidating rects +- * in the first place. for now just fix it up and re-expose +- * the correct area. */ +- if(!xfdesktop_icon_view_update_icon_extents(icon_view, icon, +- &pixbuf_extents, +- &text_extents, +- &total_extents)) +- { +- g_warning("Can't update extents for icon '%s'", +- xfdesktop_icon_peek_label(icon)); +- } else { +- gtk_widget_queue_draw_area(GTK_WIDGET(icon_view), +- total_extents.x, total_extents.y, +- total_extents.width, total_extents.height); +- } +- return; ++ g_warning("Can't update extents for icon '%s'", ++ xfdesktop_icon_peek_label(icon)); + } + + if(g_list_find(icon_view->priv->selected_icons, icon)) { +@@ -2790,7 +2793,6 @@ xfdesktop_grid_do_resize(XfdesktopIconView *icon_view) + + /* move all icons into the pending_icons list */ + for(l = icon_view->priv->icons; l; l = l->next) { +- xfdesktop_icon_mark_extents_dirty(XFDESKTOP_ICON(l->data)); + g_signal_handlers_disconnect_by_func(G_OBJECT(l->data), + G_CALLBACK(xfdesktop_icon_view_icon_changed), + icon_view); +@@ -3210,7 +3212,6 @@ xfdesktop_icon_view_remove_item(XfdesktopIconView *icon_view, + + if(xfdesktop_icon_get_position(icon, &row, &col)) { + xfdesktop_icon_view_invalidate_icon(icon_view, icon, FALSE); +- xfdesktop_icon_mark_extents_dirty(icon); + xfdesktop_grid_set_position_free(icon_view, row, col); + } + icon_view->priv->icons = g_list_delete_link(icon_view->priv->icons, l); +@@ -3258,7 +3259,6 @@ xfdesktop_icon_view_remove_all(XfdesktopIconView *icon_view) + if(xfdesktop_icon_get_position(icon, &row, &col)) { + xfdesktop_icon_view_invalidate_icon(icon_view, icon, FALSE); + xfdesktop_grid_set_position_free(icon_view, row, col); +- xfdesktop_icon_mark_extents_dirty(icon); + } + + g_signal_handlers_disconnect_by_func(G_OBJECT(l->data), +diff --git a/src/xfdesktop-icon.c b/src/xfdesktop-icon.c +index 431ba79..38c1538 100644 +--- a/src/xfdesktop-icon.c ++++ b/src/xfdesktop-icon.c +@@ -37,7 +37,6 @@ struct _XfdesktopIconPrivate + gint16 row; + gint16 col; + +- gboolean extents_dirty; + GdkRectangle pixbuf_extents; + GdkRectangle text_extents; + GdkRectangle total_extents; +@@ -116,7 +115,6 @@ xfdesktop_icon_init(XfdesktopIcon *icon) + { + icon->priv = G_TYPE_INSTANCE_GET_PRIVATE(icon, XFDESKTOP_TYPE_ICON, + XfdesktopIconPrivate); +- icon->priv->extents_dirty = TRUE; + } + + +@@ -158,7 +156,6 @@ xfdesktop_icon_set_extents(XfdesktopIcon *icon, + icon->priv->pixbuf_extents = *pixbuf_extents; + icon->priv->text_extents = *text_extents; + icon->priv->total_extents = *total_extents; +- icon->priv->extents_dirty = FALSE; + } + + gboolean +@@ -169,9 +166,6 @@ xfdesktop_icon_get_extents(XfdesktopIcon *icon, + { + g_return_val_if_fail(XFDESKTOP_IS_ICON(icon), FALSE); + +- if(icon->priv->extents_dirty) +- return FALSE; +- + if(pixbuf_extents) + *pixbuf_extents = icon->priv->pixbuf_extents; + if(text_extents) +@@ -182,16 +176,6 @@ xfdesktop_icon_get_extents(XfdesktopIcon *icon, + return TRUE; + } + +-void +-xfdesktop_icon_mark_extents_dirty(XfdesktopIcon *icon) +-{ +- g_return_if_fail(XFDESKTOP_IS_ICON(icon)); +- +- icon->priv->extents_dirty = TRUE; +-} +- +- +- + /*< required >*/ + GdkPixbuf * + xfdesktop_icon_peek_pixbuf(XfdesktopIcon *icon, +@@ -283,6 +267,37 @@ xfdesktop_icon_peek_tooltip(XfdesktopIcon *icon) + } + + /*< optional >*/ ++void xfdesktop_icon_delete_thumbnail(XfdesktopIcon *icon) ++{ ++ XfdesktopIconClass *klass; ++ ++ g_return_if_fail(XFDESKTOP_IS_ICON(icon)); ++ ++ klass = XFDESKTOP_ICON_GET_CLASS(icon); ++ ++ if(!klass->delete_thumbnail_file) ++ return; ++ ++ klass->delete_thumbnail_file(icon); ++} ++ ++/*< optional >*/ ++void ++xfdesktop_icon_set_thumbnail_file(XfdesktopIcon *icon, GFile *file) ++{ ++ XfdesktopIconClass *klass; ++ ++ g_return_if_fail(XFDESKTOP_IS_ICON(icon)); ++ ++ klass = XFDESKTOP_ICON_GET_CLASS(icon); ++ ++ if(!klass->set_thumbnail_file) ++ return; ++ ++ klass->set_thumbnail_file(icon, file); ++} ++ ++/*< optional >*/ + gboolean + xfdesktop_icon_populate_context_menu(XfdesktopIcon *icon, + GtkWidget *menu) +@@ -312,7 +327,6 @@ void + xfdesktop_icon_pixbuf_changed(XfdesktopIcon *icon) + { + g_return_if_fail(XFDESKTOP_IS_ICON(icon)); +- xfdesktop_icon_mark_extents_dirty(icon); + g_signal_emit(icon, __signals[SIG_PIXBUF_CHANGED], 0); + } + +@@ -320,7 +334,6 @@ void + xfdesktop_icon_label_changed(XfdesktopIcon *icon) + { + g_return_if_fail(XFDESKTOP_IS_ICON(icon)); +- xfdesktop_icon_mark_extents_dirty(icon); + g_signal_emit(icon, __signals[SIG_LABEL_CHANGED], 0); + } + +@@ -328,7 +341,6 @@ void + xfdesktop_icon_position_changed(XfdesktopIcon *icon) + { + g_return_if_fail(XFDESKTOP_IS_ICON(icon)); +- xfdesktop_icon_mark_extents_dirty(icon); + g_signal_emit(icon, __signals[SIG_POS_CHANGED], 0); + } + +@@ -337,7 +349,6 @@ void + xfdesktop_icon_selected(XfdesktopIcon *icon) + { + g_return_if_fail(XFDESKTOP_IS_ICON(icon)); +- xfdesktop_icon_mark_extents_dirty(icon); + g_signal_emit(G_OBJECT(icon), __signals[SIG_SELECTED], 0, NULL); + } + +diff --git a/src/xfdesktop-icon.h b/src/xfdesktop-icon.h +index b838ed5..e42261e 100644 +--- a/src/xfdesktop-icon.h ++++ b/src/xfdesktop-icon.h +@@ -73,6 +73,9 @@ struct _XfdesktopIconClass + + G_CONST_RETURN gchar *(*peek_tooltip)(XfdesktopIcon *icon); + ++ void (*set_thumbnail_file)(XfdesktopIcon *icon, GFile *file); ++ void (*delete_thumbnail_file)(XfdesktopIcon *icon); ++ + gboolean (*populate_context_menu)(XfdesktopIcon *icon, + GtkWidget *menu); + }; +@@ -105,6 +108,9 @@ gboolean xfdesktop_icon_populate_context_menu(XfdesktopIcon *icon, + + GtkWidget *xfdesktop_icon_peek_icon_view(XfdesktopIcon *icon); + ++void xfdesktop_icon_set_thumbnail_file(XfdesktopIcon *icon, GFile *file); ++void xfdesktop_icon_delete_thumbnail(XfdesktopIcon *icon); ++ + /*< signal triggers >*/ + + void xfdesktop_icon_pixbuf_changed(XfdesktopIcon *icon); +@@ -123,7 +129,6 @@ gboolean xfdesktop_icon_get_extents(XfdesktopIcon *icon, + GdkRectangle *pixbuf_extents, + GdkRectangle *text_extents, + GdkRectangle *total_extents); +-void xfdesktop_icon_mark_extents_dirty(XfdesktopIcon *icon); + + G_END_DECLS + +diff --git a/src/xfdesktop-marshal.list b/src/xfdesktop-marshal.list +deleted file mode 100644 +index 819c32e..0000000 +--- a/src/xfdesktop-marshal.list ++++ /dev/null +@@ -1,2 +0,0 @@ +-BOOLEAN:VOID +-BOOLEAN:ENUM,INT +diff --git a/src/xfdesktop-regular-file-icon.c b/src/xfdesktop-regular-file-icon.c +index e14256a..4a2d6c6 100644 +--- a/src/xfdesktop-regular-file-icon.c ++++ b/src/xfdesktop-regular-file-icon.c +@@ -68,11 +68,15 @@ struct _XfdesktopRegularFileIconPrivate + GFileInfo *file_info; + GFileInfo *filesystem_info; + GFile *file; ++ GFile *thumbnail_file; + GdkScreen *gscreen; + }; + + static void xfdesktop_regular_file_icon_finalize(GObject *obj); + ++static void xfdesktop_regular_file_icon_set_thumbnail_file(XfdesktopIcon *icon, GFile *file); ++static void xfdesktop_regular_file_icon_delete_thumbnail_file(XfdesktopIcon *icon); ++ + static GdkPixbuf *xfdesktop_regular_file_icon_peek_pixbuf(XfdesktopIcon *icon, + gint size); + static G_CONST_RETURN gchar *xfdesktop_regular_file_icon_peek_label(XfdesktopIcon *icon); +@@ -127,6 +131,8 @@ xfdesktop_regular_file_icon_class_init(XfdesktopRegularFileIconClass *klass) + icon_class->get_allowed_drag_actions = xfdesktop_regular_file_icon_get_allowed_drag_actions; + icon_class->get_allowed_drop_actions = xfdesktop_regular_file_icon_get_allowed_drop_actions; + icon_class->do_drop_dest = xfdesktop_regular_file_icon_do_drop_dest; ++ icon_class->set_thumbnail_file = xfdesktop_regular_file_icon_set_thumbnail_file; ++ icon_class->delete_thumbnail_file = xfdesktop_regular_file_icon_delete_thumbnail_file; + + file_icon_class->peek_file_info = xfdesktop_regular_file_icon_peek_file_info; + file_icon_class->peek_filesystem_info = xfdesktop_regular_file_icon_peek_filesystem_info; +@@ -171,6 +177,9 @@ xfdesktop_regular_file_icon_finalize(GObject *obj) + + if(icon->priv->tooltip) + g_free(icon->priv->tooltip); ++ ++ if(icon->priv->thumbnail_file) ++ g_object_unref(icon->priv->thumbnail_file); + + G_OBJECT_CLASS(xfdesktop_regular_file_icon_parent_class)->finalize(obj); + } +@@ -201,6 +210,43 @@ xfdesktop_regular_file_icon_invalidate_pixbuf(XfdesktopRegularFileIcon *icon) + } + } + ++static void ++xfdesktop_regular_file_icon_delete_thumbnail_file(XfdesktopIcon *icon) ++{ ++ XfdesktopRegularFileIcon *file_icon; ++ ++ if(!XFDESKTOP_IS_REGULAR_FILE_ICON(icon)) ++ return; ++ ++ file_icon = XFDESKTOP_REGULAR_FILE_ICON(icon); ++ ++ if(file_icon->priv->thumbnail_file) { ++ g_object_unref(file_icon->priv->thumbnail_file); ++ file_icon->priv->thumbnail_file = NULL; ++ } ++ ++ xfdesktop_regular_file_icon_invalidate_pixbuf(file_icon); ++ xfdesktop_icon_pixbuf_changed(XFDESKTOP_ICON(icon)); ++} ++ ++static void ++xfdesktop_regular_file_icon_set_thumbnail_file(XfdesktopIcon *icon, GFile *file) ++{ ++ XfdesktopRegularFileIcon *file_icon; ++ ++ if(!XFDESKTOP_IS_REGULAR_FILE_ICON(icon)) ++ return; ++ ++ file_icon = XFDESKTOP_REGULAR_FILE_ICON(icon); ++ ++ if(file_icon->priv->thumbnail_file) ++ g_object_unref(file_icon->priv->thumbnail_file); ++ ++ file_icon->priv->thumbnail_file = file; ++ ++ xfdesktop_regular_file_icon_invalidate_pixbuf(file_icon); ++ xfdesktop_icon_pixbuf_changed(XFDESKTOP_ICON(icon)); ++} + + static GdkPixbuf * + xfdesktop_regular_file_icon_peek_pixbuf(XfdesktopIcon *icon, +@@ -224,6 +270,10 @@ xfdesktop_regular_file_icon_peek_pixbuf(XfdesktopIcon *icon, + if(g_file_has_prefix(file_icon->priv->file, thumbnail_dir)) { + /* use the filename as custom icon name for thumbnails */ + icon_name = g_file_get_path(file_icon->priv->file); ++ ++ /* release thumbnail path */ ++ g_object_unref(thumbnail_dir); ++ g_free(thumbnail_dir_path); + } else if(xfdesktop_file_utils_is_desktop_file(file_icon->priv->file_info)) { + gchar *contents; + gsize length; +@@ -248,12 +298,16 @@ xfdesktop_regular_file_icon_peek_pixbuf(XfdesktopIcon *icon, + g_key_file_free(key_file); + g_free(contents); + } ++ } else { ++ /* If we have a thumbnail then they are enabled, use it. */ ++ if(file_icon->priv->thumbnail_file) ++ { ++ file_icon->priv->pix = gdk_pixbuf_new_from_file_at_size(g_file_get_path(file_icon->priv->thumbnail_file), ++ size, size, ++ NULL); ++ } + } + +- /* release thumbnail path */ +- g_object_unref(thumbnail_dir); +- g_free(thumbnail_dir_path); +- + /* load the symlink emblem if necessary */ + if(g_file_info_get_attribute_boolean(file_icon->priv->file_info, + G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK)) +@@ -280,10 +334,24 @@ xfdesktop_regular_file_icon_peek_pixbuf(XfdesktopIcon *icon, + + if(file_icon->priv->file_info) + gicon = g_file_info_get_icon(file_icon->priv->file_info); +- +- file_icon->priv->pix = xfdesktop_file_utils_get_icon(icon_name, gicon, +- size, emblem_pix, +- file_icon->priv->pix_opacity); ++ ++ if(file_icon->priv->pix) { ++ if(emblem_pix) { ++ gint emblem_pix_size = gdk_pixbuf_get_width(emblem_pix); ++ gint dest_size = size - emblem_pix_size; ++ ++ /* We have to add the emblem */ ++ gdk_pixbuf_composite(emblem_pix, file_icon->priv->pix, ++ dest_size, dest_size, ++ emblem_pix_size, emblem_pix_size, ++ dest_size, dest_size, ++ 1.0, 1.0, GDK_INTERP_BILINEAR, 255); ++ } ++ } else { ++ file_icon->priv->pix = xfdesktop_file_utils_get_icon(icon_name, gicon, ++ size, emblem_pix, ++ file_icon->priv->pix_opacity); ++ } + + file_icon->priv->cur_pix_size = size; + +-- +1.7.9 + diff -Nru xfdesktop4-4.8.3/debian/patches/0004-Adds-the-code-required-to-perform-a-paste-on-the-on-.patch xfdesktop4-4.8.3/debian/patches/0004-Adds-the-code-required-to-perform-a-paste-on-the-on-.patch --- xfdesktop4-4.8.3/debian/patches/0004-Adds-the-code-required-to-perform-a-paste-on-the-on-.patch 1970-01-01 00:00:00.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/0004-Adds-the-code-required-to-perform-a-paste-on-the-on-.patch 2012-02-13 21:20:54.000000000 +0000 @@ -0,0 +1,236 @@ +From 48e0ab66233c95a7f5a5890f580761fd8e40a275 Mon Sep 17 00:00:00 2001 +From: Eric Koegel +Date: Sat, 17 Dec 2011 10:37:04 +0300 +Subject: Adds the code required to perform a paste on the on the desktop. + Fixes bug 3804. + +--- + src/xfdesktop-clipboard-manager.c | 114 ++++++++++++++++++++++++++++++------- + src/xfdesktop-file-icon-manager.c | 27 ++++++++- + 2 files changed, 120 insertions(+), 21 deletions(-) + +diff --git a/src/xfdesktop-clipboard-manager.c b/src/xfdesktop-clipboard-manager.c +index 76b4bef..ed90aa0 100644 +--- a/src/xfdesktop-clipboard-manager.c ++++ b/src/xfdesktop-clipboard-manager.c +@@ -307,7 +307,6 @@ xfdesktop_clipboard_manager_owner_changed (GtkClipboard *clipboard, + } + + +-#if 0 + static void + xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, + GtkSelectionData *selection_data, +@@ -318,6 +317,8 @@ xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, + GtkWindow *parent = GTK_WINDOW(gtk_widget_get_toplevel(request->widget)); + gboolean path_copy = TRUE; + GList *path_list = NULL; ++ GList *dest_file_list = NULL; ++ GList *l = NULL; + gchar *data; + + /* check whether the retrieval worked */ +@@ -340,19 +341,43 @@ xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, + } + + /* determine the path list stored with the selection */ +- path_list = thunar_vfs_path_list_from_string (data, NULL); ++ path_list = xfdesktop_file_utils_file_list_from_string (data); + } + + /* perform the action if possible */ + if (G_LIKELY (path_list != NULL)) + { ++ for (l = path_list; l; l = l->next) { ++ gchar *dest_basename = g_file_get_basename(l->data); ++ ++ if(dest_basename && *dest_basename != '\0') { ++ /* If we copy a file, we need to use the new absolute filename ++ * as the destination. If we move, we need to use the destination ++ * directory. */ ++ if(path_copy) { ++ GFile *dest_file = g_file_get_child(request->target_file, dest_basename); ++ dest_file_list = g_list_prepend(dest_file_list, dest_file); ++ } else { ++ dest_file_list = g_list_prepend(dest_file_list, request->target_file); ++ } ++ } ++ g_free(dest_basename); ++ } ++ ++ dest_file_list = g_list_reverse(dest_file_list); ++ + if (G_LIKELY (path_copy)) +- xfdesktop_file_utils_copy_into(parent, path_list, request->target_path); +- //thunar_application_copy_into (application, request->widget, path_list, request->target_path, request->new_files_closure); +- else +- xfdesktop_file_utils_move_into(parent, path_list, request->target_path); +- //thunar_application_move_into (application, request->widget, path_list, request->target_path, request->new_files_closure); +- thunar_vfs_path_list_free (path_list); ++ { ++ xfdesktop_file_utils_transfer_files(GDK_ACTION_COPY, ++ path_list, ++ dest_file_list, ++ gtk_widget_get_screen(GTK_WIDGET(parent))); ++ } else { ++ xfdesktop_file_utils_transfer_files(GDK_ACTION_MOVE, ++ path_list, ++ dest_file_list, ++ gtk_widget_get_screen(GTK_WIDGET(parent))); ++ } + + /* clear the clipboard if it contained "cutted data" + * (gtk_clipboard_clear takes care of not clearing +@@ -365,18 +390,11 @@ xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, + * if either the Xserver or our GTK+ version + * doesn't support the XFixes extension. + */ +-#if GTK_CHECK_VERSION(2,6,0) + if (!gdk_display_supports_selection_notification (gtk_clipboard_get_display (manager->clipboard))) +-#endif + { + xfdesktop_clipboard_manager_owner_changed (manager->clipboard, NULL, manager); + } + } +- else +- { +- /* tell the user that we cannot paste */ +-// thunar_dialogs_show_error (request->widget, NULL, _("There is nothing on the clipboard to paste")); +- } + + /* free the request */ + if (G_LIKELY (request->widget != NULL)) +@@ -384,10 +402,11 @@ xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, + if (G_LIKELY (request->new_files_closure != NULL)) + g_closure_unref (request->new_files_closure); + g_object_unref (G_OBJECT (request->manager)); +- thunar_vfs_path_unref (request->target_path); +- g_free (request); ++ ++ g_list_free(dest_file_list); ++ g_list_free(path_list); + } +-#endif ++ + + + static void +@@ -654,6 +673,61 @@ xfdesktop_clipboard_manager_cut_files (XfdesktopClipboardManager *manager, + gboolean + xfdesktop_clipboard_manager_get_can_paste (XfdesktopClipboardManager *manager) + { +- /* FIXME: implement */ +- return FALSE; ++ g_return_val_if_fail (XFDESKTOP_IS_CLIPBOARD_MANAGER (manager), FALSE); ++ return manager->can_paste; ++} ++ ++ ++/** ++ * thunar_clipboard_manager_paste_files: ++ * @manager : a #XfdesktopClipboardManager. ++ * @target_file : the #GFile of the folder to which the contents on the clipboard ++ * should be pasted. ++ * @widget : a #GtkWidget, on which to perform the paste or %NULL if no widget is ++ * known. ++ * @new_files_closure : a #GClosure to connect to the job's "new-files" signal, ++ * which will be emitted when the job finishes with the ++ * list of #GFiles created by the job, or ++ * %NULL if you're not interested in the signal. ++ * ++ * Pastes the contents from the clipboard associated with @manager to the directory ++ * referenced by @target_file. ++ * Code copied and adapted from thunar-clipboard-manager.c ++ * Copyright (c) 2005-2006 Benedikt Meurer ++ * Copyright (c) 2009-2011 Jannis Pohlmann ++ **/ ++void ++xfdesktop_clipboard_manager_paste_files (XfdesktopClipboardManager *manager, ++ GFile *target_file, ++ GtkWidget *widget, ++ GClosure *new_files_closure) ++{ ++ XfdesktopClipboardPasteRequest *request; ++ ++ g_return_if_fail (XFDESKTOP_IS_CLIPBOARD_MANAGER (manager)); ++ g_return_if_fail (widget == NULL || GTK_IS_WIDGET (widget)); ++ ++ /* prepare the paste request */ ++ request = g_slice_new0 (XfdesktopClipboardPasteRequest); ++ request->manager = g_object_ref (G_OBJECT (manager)); ++ request->target_file = g_object_ref (target_file); ++ request->widget = widget; ++ ++ /* take a reference on the closure (if any) */ ++ if (G_LIKELY (new_files_closure != NULL)) ++ { ++ request->new_files_closure = new_files_closure; ++ g_closure_ref (new_files_closure); ++ g_closure_sink (new_files_closure); ++ } ++ ++ /* get notified when the widget is destroyed prior to ++ * completing the clipboard contents retrieval ++ */ ++ if (G_LIKELY (request->widget != NULL)) ++ g_object_add_weak_pointer (G_OBJECT (request->widget), (gpointer) &request->widget); ++ ++ /* schedule the request */ ++ gtk_clipboard_request_contents (manager->clipboard, manager->x_special_gnome_copied_files, ++ xfdesktop_clipboard_manager_contents_received, request); + } +diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c +index 5a897a1..92f8422 100644 +--- a/src/xfdesktop-file-icon-manager.c ++++ b/src/xfdesktop-file-icon-manager.c +@@ -888,6 +888,15 @@ xfdesktop_file_icon_menu_delete(GtkWidget *widget, + } + + static void ++xfdesktop_file_icon_menu_paste(GtkWidget *widget, ++ gpointer user_data) ++{ ++ XfdesktopFileIconManager *fmanager = XFDESKTOP_FILE_ICON_MANAGER(user_data); ++ if(widget && fmanager) ++ xfdesktop_clipboard_manager_paste_files(clipboard_manager, fmanager->priv->folder, widget, NULL); ++} ++ ++static void + xfdesktop_file_icon_menu_properties(GtkWidget *widget, + gpointer user_data) + { +@@ -1646,7 +1655,11 @@ xfdesktop_file_icon_manager_populate_context_menu(XfceDesktop *desktop, + mi = gtk_image_menu_item_new_from_stock(GTK_STOCK_PASTE, NULL); + gtk_widget_show(mi); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); +- /* FIXME: implement */ ++ if(xfdesktop_clipboard_manager_get_can_paste(clipboard_manager)) { ++ g_signal_connect(G_OBJECT(mi), "activate", ++ G_CALLBACK(xfdesktop_file_icon_menu_paste), ++ fmanager); ++ } else + gtk_widget_set_sensitive(mi, FALSE); + } else { + mi = gtk_image_menu_item_new_from_stock(GTK_STOCK_COPY, NULL); +@@ -2136,6 +2149,18 @@ xfdesktop_file_icon_manager_key_press(GtkWidget *widget, + } + return TRUE; + ++ case GDK_v: ++ case GDK_V: ++ if(!(evt->state & GDK_CONTROL_MASK) ++ || (evt->state & (GDK_SHIFT_MASK|GDK_MOD1_MASK|GDK_MOD4_MASK))) ++ { ++ return FALSE; ++ } ++ if(xfdesktop_clipboard_manager_get_can_paste(clipboard_manager)) { ++ xfdesktop_clipboard_manager_paste_files(clipboard_manager, fmanager->priv->folder, widget, NULL); ++ } ++ return TRUE; ++ + case GDK_r: + case GDK_R: + if(!(evt->state & GDK_CONTROL_MASK) +-- +1.7.9 + diff -Nru xfdesktop4-4.8.3/debian/patches/0005-Display-correct-trash-icon-on-menu-desktop.patch xfdesktop4-4.8.3/debian/patches/0005-Display-correct-trash-icon-on-menu-desktop.patch --- xfdesktop4-4.8.3/debian/patches/0005-Display-correct-trash-icon-on-menu-desktop.patch 1970-01-01 00:00:00.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/0005-Display-correct-trash-icon-on-menu-desktop.patch 2012-02-13 21:20:54.000000000 +0000 @@ -0,0 +1,218 @@ +From c5dccaa729d20dccb8ee220e06b31a41a79850da Mon Sep 17 00:00:00 2001 +From: Eric Koegel +Date: Fri, 20 Jan 2012 22:24:28 +0300 +Subject: Display correct trash icon on menu & desktop + +Added a check to see if the user can delete files in their trash +before counting it against them. Also added code to load the +correct trash icon based on the trash_item_count. Bug 6256. +--- + src/xfdesktop-special-file-icon.c | 135 +++++++++++++++++++++++++----------- + 1 files changed, 94 insertions(+), 41 deletions(-) + +diff --git a/src/xfdesktop-special-file-icon.c b/src/xfdesktop-special-file-icon.c +index 1226adf..fa0bc0b 100644 +--- a/src/xfdesktop-special-file-icon.c ++++ b/src/xfdesktop-special-file-icon.c +@@ -65,7 +65,7 @@ struct _XfdesktopSpecialFileIconPrivate + GdkScreen *gscreen; + + /* only needed for trash */ +- gboolean trash_item_count; ++ guint trash_item_count; + }; + + static void xfdesktop_special_file_icon_finalize(GObject *obj); +@@ -90,6 +90,7 @@ static void xfdesktop_special_file_icon_changed(GFileMonitor *monitor, + GFile *other_file, + GFileMonitorEvent event, + XfdesktopSpecialFileIcon *special_file_icon); ++static void xfdesktop_special_file_icon_update_trash_count(XfdesktopSpecialFileIcon *special_file_icon); + + #ifdef HAVE_THUNARX + static void xfdesktop_special_file_icon_tfi_init(ThunarxFileInfoIface *iface); +@@ -219,29 +220,43 @@ xfdesktop_special_file_icon_peek_pixbuf(XfdesktopIcon *icon, + gint size) + { + XfdesktopSpecialFileIcon *file_icon = XFDESKTOP_SPECIAL_FILE_ICON(icon); +- ++ GIcon *gicon = NULL; ++ const gchar *custom_icon_name = NULL; ++ GFile *parent = NULL; ++ + if(size != file_icon->priv->cur_pix_size) + xfdesktop_special_file_icon_invalidate_pixbuf(file_icon); +- +- if(!file_icon->priv->pix) { +- GIcon *gicon = NULL; +- const gchar *custom_icon_name = NULL; +- +- /* use a custom icon name for the local filesystem root */ +- GFile *parent = g_file_get_parent(file_icon->priv->file); +- if(!parent && g_file_has_uri_scheme(file_icon->priv->file, "file")) +- custom_icon_name = "drive-harddisk"; +- if(parent) +- g_object_unref(parent); +- +- if(file_icon->priv->file_info) +- gicon = g_file_info_get_icon(file_icon->priv->file_info); +- +- file_icon->priv->pix = xfdesktop_file_utils_get_icon(custom_icon_name, gicon, +- size, NULL, 100); +- +- file_icon->priv->cur_pix_size = size; ++ ++ /* Already have a good icon */ ++ if(file_icon->priv->pix != NULL) ++ return file_icon->priv->pix; ++ ++ /* use a custom icon name for the local filesystem root */ ++ parent = g_file_get_parent(file_icon->priv->file); ++ if(!parent && g_file_has_uri_scheme(file_icon->priv->file, "file")) ++ custom_icon_name = "drive-harddisk"; ++ if(parent) ++ g_object_unref(parent); ++ ++ /* use a custom icon for the trash, based on it having files ++ * the user can delete */ ++ if(file_icon->priv->type == XFDESKTOP_SPECIAL_FILE_ICON_TRASH) { ++ if(file_icon->priv->trash_item_count == 0) ++ custom_icon_name = "user-trash"; ++ else ++ custom_icon_name = "user-trash-full"; + } ++ ++ if(file_icon->priv->file_info) ++ gicon = g_file_info_get_icon(file_icon->priv->file_info); ++ ++ file_icon->priv->pix = xfdesktop_file_utils_get_icon(custom_icon_name, ++ gicon, ++ size, ++ NULL, ++ 100); ++ ++ file_icon->priv->cur_pix_size = size; + + return file_icon->priv->pix; + } +@@ -477,13 +492,10 @@ xfdesktop_special_file_icon_populate_context_menu(XfdesktopIcon *icon, + { + XfdesktopSpecialFileIcon *special_file_icon = XFDESKTOP_SPECIAL_FILE_ICON(icon); + GtkWidget *mi, *img; +- GtkIconTheme *icon_theme; + + if(XFDESKTOP_SPECIAL_FILE_ICON_TRASH != special_file_icon->priv->type) + return FALSE; + +- icon_theme = gtk_icon_theme_get_default(); +- + img = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU); + gtk_widget_show(img); + mi = gtk_image_menu_item_new_with_mnemonic(_("_Open")); +@@ -496,13 +508,12 @@ xfdesktop_special_file_icon_populate_context_menu(XfdesktopIcon *icon, + mi = gtk_separator_menu_item_new(); + gtk_widget_show(mi); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); +- +- if(gtk_icon_theme_has_icon(icon_theme, "user-trash")) ++ ++ if(special_file_icon->priv->trash_item_count == 0) { + img = gtk_image_new_from_icon_name("user-trash", GTK_ICON_SIZE_MENU); +- else if(gtk_icon_theme_has_icon(icon_theme, "gnome-fs-trash-empty")) +- img = gtk_image_new_from_icon_name("gnome-fs-trash-empty", GTK_ICON_SIZE_MENU); +- else +- img = NULL; ++ } else { ++ img = gtk_image_new_from_icon_name("user-trash-full", GTK_ICON_SIZE_MENU); ++ } + + mi = gtk_image_menu_item_new_with_mnemonic(_("_Empty Trash")); + if(img) +@@ -575,12 +586,8 @@ xfdesktop_special_file_icon_changed(GFileMonitor *monitor, + NULL, NULL); + + /* update the trash full state */ +- if(special_file_icon->priv->file_info +- && special_file_icon->priv->type == XFDESKTOP_SPECIAL_FILE_ICON_TRASH) +- { +- special_file_icon->priv->trash_item_count = g_file_info_get_attribute_uint32(special_file_icon->priv->file_info, +- G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT); +- } ++ if(special_file_icon->priv->type == XFDESKTOP_SPECIAL_FILE_ICON_TRASH) ++ xfdesktop_special_file_icon_update_trash_count(special_file_icon); + + /* invalidate the tooltip */ + g_free(special_file_icon->priv->tooltip); +@@ -591,6 +598,54 @@ xfdesktop_special_file_icon_changed(GFileMonitor *monitor, + xfdesktop_icon_pixbuf_changed(XFDESKTOP_ICON(special_file_icon)); + } + ++static void ++xfdesktop_special_file_icon_update_trash_count(XfdesktopSpecialFileIcon *special_file_icon) ++{ ++ GFileEnumerator *enumerator; ++ GFileInfo *f_info; ++ gint n = 0; ++ ++ g_return_if_fail(XFDESKTOP_IS_SPECIAL_FILE_ICON(special_file_icon)); ++ ++ if(special_file_icon->priv->file_info == NULL ++ || special_file_icon->priv->type != XFDESKTOP_SPECIAL_FILE_ICON_TRASH) ++ { ++ return; ++ } ++ ++ special_file_icon->priv->trash_item_count = g_file_info_get_attribute_uint32( ++ special_file_icon->priv->file_info, ++ G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT); ++ ++ if(special_file_icon->priv->trash_item_count == 0) ++ return; ++ ++ /* The trash count may return a number of files the user can't ++ * currently delete, for example if the file is in a removable ++ * drive that isn't mounted. ++ */ ++ enumerator = g_file_enumerate_children(special_file_icon->priv->file, ++ G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, ++ G_FILE_QUERY_INFO_NONE, ++ NULL, ++ NULL); ++ if(enumerator == NULL) ++ return; ++ ++ for(f_info = g_file_enumerator_next_file(enumerator, NULL, NULL); ++ f_info != NULL; ++ f_info = g_file_enumerator_next_file(enumerator, NULL, NULL)) ++ { ++ n++; ++ g_object_unref(f_info); ++ } ++ ++ g_file_enumerator_close(enumerator, NULL, NULL); ++ g_object_unref(enumerator); ++ ++ special_file_icon->priv->trash_item_count = n; ++} ++ + /* public API */ + + XfdesktopSpecialFileIcon * +@@ -636,11 +691,9 @@ xfdesktop_special_file_icon_new(XfdesktopSpecialFileIconType type, + special_file_icon->priv->filesystem_info = g_file_query_filesystem_info(special_file_icon->priv->file, + XFDESKTOP_FILESYSTEM_INFO_NAMESPACE, + NULL, NULL); +- +- if(type == XFDESKTOP_SPECIAL_FILE_ICON_TRASH) { +- special_file_icon->priv->trash_item_count = g_file_info_get_attribute_uint32(special_file_icon->priv->file_info, +- G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT); +- } ++ /* update the trash full state */ ++ if(type == XFDESKTOP_SPECIAL_FILE_ICON_TRASH) ++ xfdesktop_special_file_icon_update_trash_count(special_file_icon); + + g_signal_connect_swapped(G_OBJECT(gtk_icon_theme_get_for_screen(screen)), + "changed", +-- +1.7.9 + diff -Nru xfdesktop4-4.8.3/debian/patches/0006-Fix-for-shift-drag-selections.patch xfdesktop4-4.8.3/debian/patches/0006-Fix-for-shift-drag-selections.patch --- xfdesktop4-4.8.3/debian/patches/0006-Fix-for-shift-drag-selections.patch 1970-01-01 00:00:00.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/0006-Fix-for-shift-drag-selections.patch 2012-02-13 22:44:40.000000000 +0000 @@ -0,0 +1,61 @@ +From ab5aac37a7855b79c2bb1b2df686e938c477ff34 Mon Sep 17 00:00:00 2001 +From: Eric Koegel +Date: Tue, 7 Feb 2012 17:34:11 +0300 +Subject: Fix for shift + drag selections + +Selecting icons during a shift drag action now works. Doing a +right click or shift + left click without dragging the mouse will +cause the root menu to popup. For bug 7525. +--- + src/xfce-desktop.c | 4 ---- + src/xfdesktop-icon-view.c | 12 +++++++++--- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c +index bcd4bd8..fc7839f 100644 +--- a/src/xfce-desktop.c ++++ b/src/xfce-desktop.c +@@ -880,10 +880,6 @@ xfce_desktop_button_press_event(GtkWidget *w, + xfce_desktop_popup_secondary_root_menu(XFCE_DESKTOP(w), + button, evt->time); + return TRUE; +- } else if(button == 3 || (button == 1 && (state & GDK_SHIFT_MASK))) { +- xfce_desktop_popup_root_menu(XFCE_DESKTOP(w), +- button, evt->time); +- return TRUE; + } + } + +diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c +index fb18856..c803206 100644 +--- a/src/xfdesktop-icon-view.c ++++ b/src/xfdesktop-icon-view.c +@@ -815,8 +815,14 @@ xfdesktop_icon_view_button_release(GtkWidget *widget, + + TRACE("entering btn=%d", evt->button); + +- if(evt->button == 3 && !icon_view->priv->definitely_dragging && !icon_view->priv->definitely_rubber_banding) +- xfce_desktop_popup_root_menu(XFCE_DESKTOP(widget), evt->button, evt->time); ++ if((evt->button == 3 || (evt->button == 1 && (evt->state & GDK_SHIFT_MASK))) && ++ icon_view->priv->definitely_dragging == FALSE && ++ icon_view->priv->definitely_rubber_banding == FALSE) ++ { ++ xfce_desktop_popup_root_menu(XFCE_DESKTOP(widget), ++ evt->button, ++ evt->time); ++ } + + if(evt->button == 1 || evt->button == 3) { + DBG("unsetting stuff"); +@@ -1876,7 +1882,7 @@ xfdesktop_icon_view_select_between(XfdesktopIconView *icon_view, + { + if(start_row > end_row || (start_row == end_row && start_col > end_col)) { + /* flip start and end */ +- guint16 tmpr = start_row, tmpc = end_row; ++ guint16 tmpr = start_row, tmpc = start_col; + + start_row = end_row; + start_col = end_col; +-- +1.7.9 + diff -Nru xfdesktop4-4.8.3/debian/patches/0007-Icon-positions-are-saved-restored-per-resolution.patch xfdesktop4-4.8.3/debian/patches/0007-Icon-positions-are-saved-restored-per-resolution.patch --- xfdesktop4-4.8.3/debian/patches/0007-Icon-positions-are-saved-restored-per-resolution.patch 1970-01-01 00:00:00.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/0007-Icon-positions-are-saved-restored-per-resolution.patch 2012-02-13 21:20:54.000000000 +0000 @@ -0,0 +1,172 @@ +From dc4f69b84425cc135c8a70ac04ea3e6ba318d02e Mon Sep 17 00:00:00 2001 +From: Eric Koegel +Date: Tue, 7 Feb 2012 15:26:20 +0300 +Subject: Icon positions are saved/restored per resolution + +Icon positions are now stored in seperate rc files per screen +resolution so that when reverting from a lower screen resolution +the icons aren't stuck at the upper-left. The old rc file is used +as a fallback so that the migration is seemless. For bug 6149. +--- + src/xfdesktop-file-icon-manager.c | 38 +++++++++++++++++++++++++++--------- + src/xfdesktop-file-icon-manager.h | 5 ++++ + src/xfdesktop-icon-view.c | 29 ++++++++++++++++++++++++++- + 3 files changed, 60 insertions(+), 12 deletions(-) + +diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c +index 92f8422..4a19539 100644 +--- a/src/xfdesktop-file-icon-manager.c ++++ b/src/xfdesktop-file-icon-manager.c +@@ -430,8 +430,10 @@ __migrate_old_icon_positions(XfdesktopFileIconManager *fmanager) + { + gchar relpath[PATH_MAX], *old_file; + +- g_snprintf(relpath, PATH_MAX, "xfce4/desktop/icons.screen%d.rc", +- gdk_screen_get_number(fmanager->priv->gscreen)); ++ g_snprintf(relpath, PATH_MAX, "xfce4/desktop/icons.screen%d-%dx%d.rc", ++ gdk_screen_get_number(fmanager->priv->gscreen), ++ gdk_screen_get_width(fmanager->priv->gscreen), ++ gdk_screen_get_height(fmanager->priv->gscreen)); + + old_file = xfce_resource_save_location(XFCE_RESOURCE_CACHE, relpath, FALSE); + +@@ -1764,8 +1766,10 @@ xfdesktop_file_icon_manager_save_icons(gpointer user_data) + + fmanager->priv->save_icons_id = 0; + +- g_snprintf(relpath, PATH_MAX, "xfce4/desktop/icons.screen%d.rc", +- gdk_screen_get_number(fmanager->priv->gscreen)); ++ g_snprintf(relpath, PATH_MAX, "xfce4/desktop/icons.screen%d-%dx%d.rc", ++ gdk_screen_get_number(fmanager->priv->gscreen), ++ gdk_screen_get_width(fmanager->priv->gscreen), ++ gdk_screen_get_height(fmanager->priv->gscreen)); + path = xfce_resource_save_location(XFCE_RESOURCE_CONFIG, relpath, TRUE); + if(!path) + return FALSE; +@@ -1822,20 +1826,33 @@ xfdesktop_file_icon_position_changed(XfdesktopFileIcon *icon, + + /* ***** */ + +-static gboolean ++gboolean + xfdesktop_file_icon_manager_get_cached_icon_position(XfdesktopFileIconManager *fmanager, + const gchar *name, + gint16 *row, + gint16 *col) + { + gchar relpath[PATH_MAX]; +- XfceRc *rcfile; ++ gchar *filename = NULL; + gboolean ret = FALSE; + +- g_snprintf(relpath, PATH_MAX, "xfce4/desktop/icons.screen%d.rc", +- gdk_screen_get_number(fmanager->priv->gscreen)); +- rcfile = xfce_rc_config_open(XFCE_RESOURCE_CONFIG, relpath, TRUE); +- if(rcfile) { ++ g_snprintf(relpath, PATH_MAX, "xfce4/desktop/icons.screen%d-%dx%d.rc", ++ gdk_screen_get_number(fmanager->priv->gscreen), ++ gdk_screen_get_width(fmanager->priv->gscreen), ++ gdk_screen_get_height(fmanager->priv->gscreen)); ++ filename = xfce_resource_lookup(XFCE_RESOURCE_CONFIG, relpath); ++ ++ /* Check if we have to migrate from the old file format */ ++ if(filename == NULL) { ++ g_snprintf(relpath, PATH_MAX, "xfce4/desktop/icons.screen%d.rc", ++ gdk_screen_get_number(fmanager->priv->gscreen)); ++ filename = xfce_resource_lookup(XFCE_RESOURCE_CONFIG, relpath); ++ } ++ ++ if(filename != NULL) { ++ XfceRc *rcfile; ++ rcfile = xfce_rc_simple_open(filename, TRUE); ++ + if(xfce_rc_has_group(rcfile, name)) { + xfce_rc_set_group(rcfile, name); + *row = xfce_rc_read_int_entry(rcfile, "row", -1); +@@ -1844,6 +1861,7 @@ xfdesktop_file_icon_manager_get_cached_icon_position(XfdesktopFileIconManager *f + ret = TRUE; + } + xfce_rc_close(rcfile); ++ g_free(filename); + } + + return ret; +diff --git a/src/xfdesktop-file-icon-manager.h b/src/xfdesktop-file-icon-manager.h +index 1c45ecb..decdb74 100644 +--- a/src/xfdesktop-file-icon-manager.h ++++ b/src/xfdesktop-file-icon-manager.h +@@ -68,6 +68,11 @@ void xfdesktop_file_icon_manager_set_show_thumbnails(XfdesktopFileIconManager *m + gboolean show_thumbnails); + gboolean xfdesktop_file_icon_manager_get_show_thumbnails(XfdesktopFileIconManager *manager); + ++gboolean xfdesktop_file_icon_manager_get_cached_icon_position( ++ XfdesktopFileIconManager *fmanager, ++ const gchar *name, ++ gint16 *row, ++ gint16 *col); + + G_END_DECLS + +diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c +index c803206..2be8970 100644 +--- a/src/xfdesktop-icon-view.c ++++ b/src/xfdesktop-icon-view.c +@@ -47,6 +47,7 @@ + #endif + + #include "xfdesktop-icon-view.h" ++#include "xfdesktop-file-icon-manager.h" + #include "xfdesktop-marshal.h" + #include "xfce-desktop.h" + +@@ -2795,10 +2796,16 @@ xfdesktop_icon_view_paint_icon(XfdesktopIconView *icon_view, + static void + xfdesktop_grid_do_resize(XfdesktopIconView *icon_view) + { ++ XfdesktopFileIconManager *fmanager; + GList *l, *leftovers = NULL; + +- /* move all icons into the pending_icons list */ ++ //* move all icons into the pending_icons list and remove from the desktop */ + for(l = icon_view->priv->icons; l; l = l->next) { ++ guint16 old_row, old_col; ++ ++ if(xfdesktop_icon_get_position(XFDESKTOP_ICON(l->data), &old_row, &old_col)) ++ xfdesktop_grid_set_position_free(icon_view, old_row, old_col); ++ + g_signal_handlers_disconnect_by_func(G_OBJECT(l->data), + G_CALLBACK(xfdesktop_icon_view_icon_changed), + icon_view); +@@ -2816,10 +2823,28 @@ xfdesktop_grid_do_resize(XfdesktopIconView *icon_view) + xfdesktop_setup_grids(icon_view); + + DUMP_GRID_LAYOUT(icon_view); +- ++ ++#ifdef ENABLE_FILE_ICONS ++ fmanager = XFDESKTOP_FILE_ICON_MANAGER(icon_view->priv->manager); ++#endif ++ + /* add all icons back */ + for(l = icon_view->priv->pending_icons; l; l = l->next) { ++ gint16 row, col; + XfdesktopIcon *icon = XFDESKTOP_ICON(l->data); ++ ++#ifdef ENABLE_FILE_ICONS ++ /* Try to get the cached position for the new resolution */ ++ if(xfdesktop_file_icon_manager_get_cached_icon_position( ++ fmanager, ++ xfdesktop_icon_peek_label(icon), ++ &row, ++ &col)) ++ { ++ xfdesktop_icon_set_position(icon, row, col); ++ } ++#endif ++ + if(xfdesktop_icon_view_icon_find_position(icon_view, icon)) + xfdesktop_icon_view_add_item_internal(icon_view, icon); + else +-- +1.7.9 + diff -Nru xfdesktop4-4.8.3/debian/patches/0008-Change-to-POINTER_MOTION_HINT_MASK-use-gdk_event_req.patch xfdesktop4-4.8.3/debian/patches/0008-Change-to-POINTER_MOTION_HINT_MASK-use-gdk_event_req.patch --- xfdesktop4-4.8.3/debian/patches/0008-Change-to-POINTER_MOTION_HINT_MASK-use-gdk_event_req.patch 1970-01-01 00:00:00.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/0008-Change-to-POINTER_MOTION_HINT_MASK-use-gdk_event_req.patch 2012-02-13 21:20:54.000000000 +0000 @@ -0,0 +1,34 @@ +From 1264428edda474f7c59befee1b0d779bc385fc14 Mon Sep 17 00:00:00 2001 +From: Eric Koegel +Date: Sat, 11 Feb 2012 21:22:26 +0300 +Subject: Change to POINTER_MOTION_HINT_MASK & use gdk_event_request_motions + +--- + src/xfdesktop-icon-view.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c +index 2be8970..071ca90 100644 +--- a/src/xfdesktop-icon-view.c ++++ b/src/xfdesktop-icon-view.c +@@ -1101,6 +1101,8 @@ xfdesktop_icon_view_motion_notify(GtkWidget *widget, + } + } + ++ gdk_event_request_motions(evt); ++ + return ret; + } + +@@ -1614,7 +1616,7 @@ xfdesktop_icon_view_realize(GtkWidget *widget) + /* unfortunately GTK_NO_WINDOW widgets don't receive events, with the + * exception of expose events. */ + gtk_widget_add_events(icon_view->priv->parent_window, +- GDK_POINTER_MOTION_MASK | GDK_KEY_PRESS_MASK ++ GDK_POINTER_MOTION_HINT_MASK | GDK_KEY_PRESS_MASK + | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + | GDK_FOCUS_CHANGE_MASK | GDK_EXPOSURE_MASK + | GDK_LEAVE_NOTIFY_MASK); +-- +1.7.9 + diff -Nru xfdesktop4-4.8.3/debian/patches/series xfdesktop4-4.8.3/debian/patches/series --- xfdesktop4-4.8.3/debian/patches/series 2012-01-24 21:34:25.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/series 2012-02-13 23:14:51.000000000 +0000 @@ -1,8 +1,14 @@ xubuntu_hide-ugly-resize-grip.patch xubuntu_avoid-multiple-instances.patch xubuntu_improve-nautilus-interactions.patch +0001-Right-click-Drag-and-Drop.patch +0002-Added-a-check-for-GDK_GRAB_INVALID_TIME-in-xfdesktop.patch +0003-Thumbnail-desktop-icon-previews-using-tumblerd.patch +0004-Adds-the-code-required-to-perform-a-paste-on-the-on-.patch +0005-Display-correct-trash-icon-on-menu-desktop.patch +0006-Fix-for-shift-drag-selections.patch +0007-Icon-positions-are-saved-restored-per-resolution.patch +0008-Change-to-POINTER_MOTION_HINT_MASK-use-gdk_event_req.patch xubuntu_fix-move-multiple-icons.patch -xubuntu_fix-cut-and-paste.patch xubuntu_single-click-option.patch -xubuntu_use-tumbler.patch xubuntu_refreshed-translations.patch diff -Nru xfdesktop4-4.8.3/debian/patches/xubuntu_fix-cut-and-paste.patch xfdesktop4-4.8.3/debian/patches/xubuntu_fix-cut-and-paste.patch --- xfdesktop4-4.8.3/debian/patches/xubuntu_fix-cut-and-paste.patch 2012-01-07 15:23:20.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/xubuntu_fix-cut-and-paste.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,236 +0,0 @@ -From dd57435413a10b288153d1ae0062d37e58bcffd1 Mon Sep 17 00:00:00 2001 -From: Eric Koegel -Date: Sat, 17 Dec 2011 10:37:04 +0300 -Subject: [PATCH] Adds the code required to perform a paste on the on the - desktop. Fixes bug 3804. - ---- - src/xfdesktop-clipboard-manager.c | 114 ++++++++++++++++++++++++++++++------- - src/xfdesktop-file-icon-manager.c | 27 ++++++++- - 2 files changed, 120 insertions(+), 21 deletions(-) - -diff --git a/src/xfdesktop-clipboard-manager.c b/src/xfdesktop-clipboard-manager.c -index 76b4bef..ed90aa0 100644 ---- a/src/xfdesktop-clipboard-manager.c -+++ b/src/xfdesktop-clipboard-manager.c -@@ -307,7 +307,6 @@ xfdesktop_clipboard_manager_owner_changed (GtkClipboard *clipboard, - } - - --#if 0 - static void - xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, - GtkSelectionData *selection_data, -@@ -318,6 +317,8 @@ xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, - GtkWindow *parent = GTK_WINDOW(gtk_widget_get_toplevel(request->widget)); - gboolean path_copy = TRUE; - GList *path_list = NULL; -+ GList *dest_file_list = NULL; -+ GList *l = NULL; - gchar *data; - - /* check whether the retrieval worked */ -@@ -340,19 +341,43 @@ xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, - } - - /* determine the path list stored with the selection */ -- path_list = thunar_vfs_path_list_from_string (data, NULL); -+ path_list = xfdesktop_file_utils_file_list_from_string (data); - } - - /* perform the action if possible */ - if (G_LIKELY (path_list != NULL)) - { -+ for (l = path_list; l; l = l->next) { -+ gchar *dest_basename = g_file_get_basename(l->data); -+ -+ if(dest_basename && *dest_basename != '\0') { -+ /* If we copy a file, we need to use the new absolute filename -+ * as the destination. If we move, we need to use the destination -+ * directory. */ -+ if(path_copy) { -+ GFile *dest_file = g_file_get_child(request->target_file, dest_basename); -+ dest_file_list = g_list_prepend(dest_file_list, dest_file); -+ } else { -+ dest_file_list = g_list_prepend(dest_file_list, request->target_file); -+ } -+ } -+ g_free(dest_basename); -+ } -+ -+ dest_file_list = g_list_reverse(dest_file_list); -+ - if (G_LIKELY (path_copy)) -- xfdesktop_file_utils_copy_into(parent, path_list, request->target_path); -- //thunar_application_copy_into (application, request->widget, path_list, request->target_path, request->new_files_closure); -- else -- xfdesktop_file_utils_move_into(parent, path_list, request->target_path); -- //thunar_application_move_into (application, request->widget, path_list, request->target_path, request->new_files_closure); -- thunar_vfs_path_list_free (path_list); -+ { -+ xfdesktop_file_utils_transfer_files(GDK_ACTION_COPY, -+ path_list, -+ dest_file_list, -+ gtk_widget_get_screen(GTK_WIDGET(parent))); -+ } else { -+ xfdesktop_file_utils_transfer_files(GDK_ACTION_MOVE, -+ path_list, -+ dest_file_list, -+ gtk_widget_get_screen(GTK_WIDGET(parent))); -+ } - - /* clear the clipboard if it contained "cutted data" - * (gtk_clipboard_clear takes care of not clearing -@@ -365,18 +390,11 @@ xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, - * if either the Xserver or our GTK+ version - * doesn't support the XFixes extension. - */ --#if GTK_CHECK_VERSION(2,6,0) - if (!gdk_display_supports_selection_notification (gtk_clipboard_get_display (manager->clipboard))) --#endif - { - xfdesktop_clipboard_manager_owner_changed (manager->clipboard, NULL, manager); - } - } -- else -- { -- /* tell the user that we cannot paste */ --// thunar_dialogs_show_error (request->widget, NULL, _("There is nothing on the clipboard to paste")); -- } - - /* free the request */ - if (G_LIKELY (request->widget != NULL)) -@@ -384,10 +402,11 @@ xfdesktop_clipboard_manager_contents_received (GtkClipboard *clipboard, - if (G_LIKELY (request->new_files_closure != NULL)) - g_closure_unref (request->new_files_closure); - g_object_unref (G_OBJECT (request->manager)); -- thunar_vfs_path_unref (request->target_path); -- g_free (request); -+ -+ g_list_free(dest_file_list); -+ g_list_free(path_list); - } --#endif -+ - - - static void -@@ -654,6 +673,61 @@ xfdesktop_clipboard_manager_cut_files (XfdesktopClipboardManager *manager, - gboolean - xfdesktop_clipboard_manager_get_can_paste (XfdesktopClipboardManager *manager) - { -- /* FIXME: implement */ -- return FALSE; -+ g_return_val_if_fail (XFDESKTOP_IS_CLIPBOARD_MANAGER (manager), FALSE); -+ return manager->can_paste; -+} -+ -+ -+/** -+ * thunar_clipboard_manager_paste_files: -+ * @manager : a #XfdesktopClipboardManager. -+ * @target_file : the #GFile of the folder to which the contents on the clipboard -+ * should be pasted. -+ * @widget : a #GtkWidget, on which to perform the paste or %NULL if no widget is -+ * known. -+ * @new_files_closure : a #GClosure to connect to the job's "new-files" signal, -+ * which will be emitted when the job finishes with the -+ * list of #GFiles created by the job, or -+ * %NULL if you're not interested in the signal. -+ * -+ * Pastes the contents from the clipboard associated with @manager to the directory -+ * referenced by @target_file. -+ * Code copied and adapted from thunar-clipboard-manager.c -+ * Copyright (c) 2005-2006 Benedikt Meurer -+ * Copyright (c) 2009-2011 Jannis Pohlmann -+ **/ -+void -+xfdesktop_clipboard_manager_paste_files (XfdesktopClipboardManager *manager, -+ GFile *target_file, -+ GtkWidget *widget, -+ GClosure *new_files_closure) -+{ -+ XfdesktopClipboardPasteRequest *request; -+ -+ g_return_if_fail (XFDESKTOP_IS_CLIPBOARD_MANAGER (manager)); -+ g_return_if_fail (widget == NULL || GTK_IS_WIDGET (widget)); -+ -+ /* prepare the paste request */ -+ request = g_slice_new0 (XfdesktopClipboardPasteRequest); -+ request->manager = g_object_ref (G_OBJECT (manager)); -+ request->target_file = g_object_ref (target_file); -+ request->widget = widget; -+ -+ /* take a reference on the closure (if any) */ -+ if (G_LIKELY (new_files_closure != NULL)) -+ { -+ request->new_files_closure = new_files_closure; -+ g_closure_ref (new_files_closure); -+ g_closure_sink (new_files_closure); -+ } -+ -+ /* get notified when the widget is destroyed prior to -+ * completing the clipboard contents retrieval -+ */ -+ if (G_LIKELY (request->widget != NULL)) -+ g_object_add_weak_pointer (G_OBJECT (request->widget), (gpointer) &request->widget); -+ -+ /* schedule the request */ -+ gtk_clipboard_request_contents (manager->clipboard, manager->x_special_gnome_copied_files, -+ xfdesktop_clipboard_manager_contents_received, request); - } -diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c -index d3ca2eb..b7fada2 100644 ---- a/src/xfdesktop-file-icon-manager.c -+++ b/src/xfdesktop-file-icon-manager.c -@@ -858,6 +858,15 @@ xfdesktop_file_icon_menu_delete(GtkWidget *widget, - } - - static void -+xfdesktop_file_icon_menu_paste(GtkWidget *widget, -+ gpointer user_data) -+{ -+ XfdesktopFileIconManager *fmanager = XFDESKTOP_FILE_ICON_MANAGER(user_data); -+ if(widget && fmanager) -+ xfdesktop_clipboard_manager_paste_files(clipboard_manager, fmanager->priv->folder, widget, NULL); -+} -+ -+static void - xfdesktop_file_icon_menu_properties(GtkWidget *widget, - gpointer user_data) - { -@@ -1616,7 +1625,11 @@ xfdesktop_file_icon_manager_populate_context_menu(XfceDesktop *desktop, - mi = gtk_image_menu_item_new_from_stock(GTK_STOCK_PASTE, NULL); - gtk_widget_show(mi); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); -- /* FIXME: implement */ -+ if(xfdesktop_clipboard_manager_get_can_paste(clipboard_manager)) { -+ g_signal_connect(G_OBJECT(mi), "activate", -+ G_CALLBACK(xfdesktop_file_icon_menu_paste), -+ fmanager); -+ } else - gtk_widget_set_sensitive(mi, FALSE); - } else { - mi = gtk_image_menu_item_new_from_stock(GTK_STOCK_COPY, NULL); -@@ -2098,6 +2111,18 @@ xfdesktop_file_icon_manager_key_press(GtkWidget *widget, - } - return TRUE; - -+ case GDK_v: -+ case GDK_V: -+ if(!(evt->state & GDK_CONTROL_MASK) -+ || (evt->state & (GDK_SHIFT_MASK|GDK_MOD1_MASK|GDK_MOD4_MASK))) -+ { -+ return FALSE; -+ } -+ if(xfdesktop_clipboard_manager_get_can_paste(clipboard_manager)) { -+ xfdesktop_clipboard_manager_paste_files(clipboard_manager, fmanager->priv->folder, widget, NULL); -+ } -+ return TRUE; -+ - case GDK_r: - case GDK_R: - if(!(evt->state & GDK_CONTROL_MASK) --- -1.7.5.4 - diff -Nru xfdesktop4-4.8.3/debian/patches/xubuntu_fix-move-multiple-icons.patch xfdesktop4-4.8.3/debian/patches/xubuntu_fix-move-multiple-icons.patch --- xfdesktop4-4.8.3/debian/patches/xubuntu_fix-move-multiple-icons.patch 2012-01-04 22:32:16.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/xubuntu_fix-move-multiple-icons.patch 2012-02-13 22:43:39.000000000 +0000 @@ -4,6 +4,8 @@ Subject: [PATCH] Modified xfdesktop_icon_view_drag_drop to allow all selected files to drag and drop. Fixes Bug #5025 + Slightly modified for Xubuntu to apply cleanly on top of other patches. + Origin: other, https://bugzilla.xfce.org/attachment.cgi?id=3978 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/xfdesktop4/+bug/595658 Bug: https://bugzilla.xfce.org/show_bug.cgi?id=5025 @@ -16,7 +18,7 @@ index 0736006..5c56f34 100644 --- a/src/xfdesktop-icon-view.c +++ b/src/xfdesktop-icon-view.c -@@ -1327,6 +1327,7 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget, +@@ -1356,6 +1356,7 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget, GdkAtom target = GDK_NONE; XfdesktopIcon *icon; guint16 old_row, old_col, row, col; @@ -24,7 +26,7 @@ XfdesktopIcon *icon_on_dest = NULL; TRACE("entering: (%d,%d)", x, y); -@@ -1346,7 +1347,6 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget, +@@ -1375,7 +1376,6 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget, if(target == gdk_atom_intern("XFDESKTOP_ICON", FALSE)) { if(icon_on_dest) { @@ -32,7 +34,7 @@ gboolean ret = FALSE; for(l = icon_view->priv->selected_icons; l; l = l->next) { -@@ -1366,10 +1366,20 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget, +@@ -1395,10 +1395,20 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget, icon = icon_view->priv->cursor; g_return_val_if_fail(icon, FALSE); @@ -57,8 +59,8 @@ /* set new position */ xfdesktop_icon_set_position(icon, row, col); xfdesktop_grid_unset_position_free(icon_view, icon); -@@ -1379,6 +1389,32 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget, - //xfdesktop_icon_mark_extents_dirty(icon); +@@ -1407,6 +1417,32 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget, + /* FIXME: is this right? */ xfdesktop_icon_view_invalidate_icon(icon_view, icon, TRUE); + /* Now that we have moved the icon the user selected, diff -Nru xfdesktop4-4.8.3/debian/patches/xubuntu_hide-ugly-resize-grip.patch xfdesktop4-4.8.3/debian/patches/xubuntu_hide-ugly-resize-grip.patch --- xfdesktop4-4.8.3/debian/patches/xubuntu_hide-ugly-resize-grip.patch 2011-09-02 20:04:35.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/xubuntu_hide-ugly-resize-grip.patch 2012-02-13 22:38:48.000000000 +0000 @@ -14,7 +14,7 @@ Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/xfdesktop4/+bug/709279 --- xfdesktop4-4.8.1.orig/src/xfce-desktop.c +++ xfdesktop4-4.8.1/src/xfce-desktop.c -@@ -615,6 +615,7 @@ xfce_desktop_init(XfceDesktop *desktop) +@@ -617,6 +617,7 @@ xfce_desktop_init(XfceDesktop *desktop) gtk_window_set_type_hint(GTK_WINDOW(desktop), GDK_WINDOW_TYPE_HINT_DESKTOP); gtk_window_set_accept_focus(GTK_WINDOW(desktop), FALSE); diff -Nru xfdesktop4-4.8.3/debian/patches/xubuntu_refreshed-translations.patch xfdesktop4-4.8.3/debian/patches/xubuntu_refreshed-translations.patch --- xfdesktop4-4.8.3/debian/patches/xubuntu_refreshed-translations.patch 2012-02-07 19:29:16.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/xubuntu_refreshed-translations.patch 2012-02-13 23:15:55.000000000 +0000 @@ -1,42 +1,63 @@ -Description: Translations for the string added by xubuntu_* patches +Description: Translations for the strings added by some patches Taken from Thunar, as it contains the same strings. Obtained with: $ cd po $ for i in *.po; do \ grep -C 1 '_Single click to activate items' /path/to/thunar-1.2.3/po/$i >> $i; \ grep -C 1 '_Show thumbnails' /path/to/thunar-1.2.3/po/$i >> $i; \ + grep -C 1 '_Copy here' ../../thunar-1.2.3/po/$i >> $i; \ + grep -C 1 '_Move here' ../../thunar-1.2.3/po/$i >> $i; \ + grep -C 1 '_Link here' ../../thunar-1.2.3/po/$i >> $i; \ done Author: Lionel Le Folgoc Forwarded: not-needed -Last-Update: 2012-02-07 +Last-Update: 2012-02-13 ---- xfdesktop4-4.8.3.orig/po/ca.po -+++ xfdesktop4-4.8.3/po/ca.po -@@ -1929,3 +1929,9 @@ msgstr "_Munta el volum" +--- xfdesktop4-4.8.3.orig/po/pt.po ++++ xfdesktop4-4.8.3/po/pt.po +@@ -1812,3 +1812,18 @@ msgstr "_Montar volume" - #~ msgid "_Desktop Properties..." - #~ msgstr "Propietats _de l’escriptori" + #~ msgid "Scientific software" + #~ msgstr "Software científico" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Només un _clic per activar els elements" ++msgstr "_Clique único para activar itens" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Mo_stra miniatures" ---- xfdesktop4-4.8.3.orig/po/sk.po -+++ xfdesktop4-4.8.3/po/sk.po -@@ -1793,3 +1793,9 @@ msgstr "_PripojiÅ¥ zväzok" ++msgstr "_Mostar miniaturas" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copiar aqui" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Mover aqui" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Ligar aqui" +--- xfdesktop4-4.8.3.orig/po/kk.po ++++ xfdesktop4-4.8.3/po/kk.po +@@ -1448,3 +1448,18 @@ msgstr "Бө_лімді тіркеу" - #~ msgid "Scientific software" - #~ msgstr "Vedecký softvér" + #~ msgid "gtk-help" + #~ msgstr "gtk-help" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_AktivovaÅ¥ položky jednoduchým kliknutím" ++msgstr "Э_лементерді белÑенді қылу үшін бір шертуді қолдану" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "ZobraziÅ¥ _miniatúry" ++msgstr "Ò®_лгілерін көрÑету" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_ОÑында көшіру" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "О_Ñында жылжыту" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "ОÑ_ында Ñілтеме жаÑау" --- xfdesktop4-4.8.3.orig/po/nb.po +++ xfdesktop4-4.8.3/po/nb.po -@@ -981,3 +981,9 @@ msgstr "_Monter dataomrÃ¥de" +@@ -981,3 +981,18 @@ msgstr "_Monter dataomrÃ¥de" #~ msgstr "" #~ "Sørg for at du har en filbehandler installert som støtter Zfce " #~ "papirkurvtjenesten, for eksempel Thunar." @@ -46,21 +67,102 @@ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "_Vis miniatyrbilder" ---- xfdesktop4-4.8.3.orig/po/ja.po -+++ xfdesktop4-4.8.3/po/ja.po -@@ -1050,3 +1050,9 @@ msgstr "マウント(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopier hit" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Flytt hit" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Lenke her" +--- xfdesktop4-4.8.3.orig/po/et.po ++++ xfdesktop4-4.8.3/po/et.po +@@ -1789,3 +1789,18 @@ msgstr "_Liida andmeruum" + #, fuzzy + #~ msgid "Scientific software" + #~ msgstr "Hariduslik tarkvara" ++#: ../thunar/thunar-preferences-dialog.c:436 ++msgid "_Single click to activate items" ++msgstr "E_semed aktiveeritakse ühe klõpsuga" ++#: ../thunar/thunar-preferences-dialog.c:253 ++msgid "_Show thumbnails" ++msgstr "Näidata pi_sipilte" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopeerida siia" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Liigutada siia" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Viidata siia" +--- xfdesktop4-4.8.3.orig/po/pa.po ++++ xfdesktop4-4.8.3/po/pa.po +@@ -1843,3 +1843,18 @@ msgstr "ਵਾਲੀਅਮ ਮਾਊਂà - #~ msgid "Are you sure that you want to delete \"%s\"?" - #~ msgstr "\"%s\" を削除ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?" + #~ msgid "Scientific software" + #~ msgstr "ਸਾਇੰਸ ਸਾਫਟਵੇਅਰ" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "シングルクリックã§ã‚¢ã‚¤ãƒ†ãƒ ã‚’アクティブã«ã™ã‚‹(_S)" ++msgstr "ਆਈਟਮਾਂ ਨੂੰ à¨à¨•à¨Ÿà©€à¨µà©‡à¨Ÿ ਕਰਨ ਲਈ ਇੱਕ ਵਾਰ ਕਲਿੱਕ(_S)" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "サムãƒã‚¤ãƒ«ã‚’表示ã™ã‚‹(_S)" ++msgstr "ਥੰਮਨੇਲ ਵੇਖਾਓ(_S)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "ਇੱਥੇ ਨਕਲ(_C)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "ਇੱਥੇ ਭੇਜੋ(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "ਇੱਥੇ ਲਿੰਕ(_L)" +--- xfdesktop4-4.8.3.orig/po/lt.po ++++ xfdesktop4-4.8.3/po/lt.po +@@ -1548,3 +1548,18 @@ msgstr "_Prijungti tomÄ…" + + #~ msgid "Delete the current entry" + #~ msgstr "IÅ¡trinti šį įraÅ¡Ä…" ++#: ../thunar/thunar-preferences-dialog.c:436 ++msgid "_Single click to activate items" ++msgstr "Aktyvuoti _vienu pelÄ—s mygtuko paspaudimu" ++#: ../thunar/thunar-preferences-dialog.c:253 ++msgid "_Show thumbnails" ++msgstr "Rodyti _miniatÅ«ras" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopijuoti Äia" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Perkelti Äia" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Sukurti _nuorodÄ… Äia" +--- xfdesktop4-4.8.3.orig/po/ro.po ++++ xfdesktop4-4.8.3/po/ro.po +@@ -941,3 +941,18 @@ msgstr "_Montare volum" + + #~ msgid "Make sure you have a file manager installed that supports the Xfce Trash service, such as Thunar." + #~ msgstr "AsiguraÈ›i-vă ca aveÈ›i instalat un manager de fiÈ™iere cu suport pentru serviciul Xfce Trash (precum Thunar)." ++#: ../thunar/thunar-preferences-dialog.c:436 ++msgid "_Single click to activate items" ++msgstr "Clic _simplu pentru activarea elementelor" ++#: ../thunar/thunar-preferences-dialog.c:253 ++msgid "_Show thumbnails" ++msgstr "Arată _miniaturi" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copiază aici" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Mută aici" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Leagă aici" --- xfdesktop4-4.8.3.orig/po/pl.po +++ xfdesktop4-4.8.3/po/pl.po -@@ -2004,3 +2004,9 @@ msgstr "_Zamontuj" +@@ -2004,3 +2004,18 @@ msgstr "_Zamontuj" #, fuzzy #~ msgid "Scientific software" #~ msgstr "Oprogramowanie edukacyjne" @@ -70,95 +172,165 @@ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "_Miniatury" ---- xfdesktop4-4.8.3.orig/po/kk.po -+++ xfdesktop4-4.8.3/po/kk.po -@@ -1448,3 +1448,9 @@ msgstr "Бө_лімді тіркеу" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "S_kopiuj" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_PrzenieÅ›" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Utwórz _dowiÄ…zanie" +--- xfdesktop4-4.8.3.orig/po/uk.po ++++ xfdesktop4-4.8.3/po/uk.po +@@ -1731,3 +1731,18 @@ msgstr "_Підключити том" - #~ msgid "gtk-help" - #~ msgstr "gtk-help" + #~ msgid "Scientific software" + #~ msgstr "Ðавчальні програми" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Э_лементерді белÑенді қылу үшін бір шертуді қолдану" ++msgstr "ÐÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚Ñ–Ð² _одинарним клацаннÑм" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Ò®_лгілерін көрÑету" ---- xfdesktop4-4.8.3.orig/po/es.po -+++ xfdesktop4-4.8.3/po/es.po -@@ -1917,3 +1917,9 @@ msgstr "_Montar volumen" - - #~ msgid "Scientific software" - #~ msgstr "Software científico" ++msgstr "_Показувати мініатюри" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Копіювати Ñюди" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "Пере_міÑтити Ñюди" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Створити _поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ñ‚ÑƒÑ‚" +--- xfdesktop4-4.8.3.orig/po/ms.po ++++ xfdesktop4-4.8.3/po/ms.po +@@ -1162,3 +1162,18 @@ msgstr "Lekap Volu_m" + #, fuzzy + #~ msgid "Edit" + #~ msgstr "Edit senarai" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Clic _simple para activar los elementos" ++msgstr "" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Mo_strar miniaturas" ---- xfdesktop4-4.8.3.orig/po/fi.po -+++ xfdesktop4-4.8.3/po/fi.po -@@ -1762,3 +1762,9 @@ msgstr "_Liitä taltio" ++msgstr "" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "" +--- xfdesktop4-4.8.3.orig/po/ca.po ++++ xfdesktop4-4.8.3/po/ca.po +@@ -1929,3 +1929,18 @@ msgstr "_Munta el volum" - #~ msgid "Xfce 4 Menu Editor" - #~ msgstr "Xfce 4 valikkoeditori" + #~ msgid "_Desktop Properties..." + #~ msgstr "Propietats _de l’escriptori" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Aktivoi kohteet k_ertanapsautuksella" ++msgstr "Només un _clic per activar els elements" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Näytä pienoiskuvat" ---- xfdesktop4-4.8.3.orig/po/en_GB.po -+++ xfdesktop4-4.8.3/po/en_GB.po -@@ -1971,3 +1971,11 @@ msgstr "_Mount Volume" - ++msgstr "Mo_stra miniatures" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copia aquí" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Mou aquí" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Enllaça aquí" +--- xfdesktop4-4.8.3.orig/po/ar.po ++++ xfdesktop4-4.8.3/po/ar.po +@@ -1868,3 +1868,18 @@ msgstr "ضم الج_زء" + #, fuzzy #~ msgid "Scientific software" - #~ msgstr "Educational software" + #~ msgstr "برامج تعليمية" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Single click to activate items" -+ ++msgstr "_نقرة واحدة لتÙعيل العناصر" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Show thumbnails" -+ ---- xfdesktop4-4.8.3.orig/po/tr.po -+++ xfdesktop4-4.8.3/po/tr.po -@@ -1727,3 +1727,9 @@ msgstr "Birim _BaÄŸla" - - #~ msgid "Scientific software" - #~ msgstr "EÄŸitimsel uygulama" ++msgstr "أظهر المص_غارات" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_أنسخ هنا" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_أنقل هنا" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_وصلة هنا" +--- xfdesktop4-4.8.3.orig/po/ru.po ++++ xfdesktop4-4.8.3/po/ru.po +@@ -945,3 +945,18 @@ msgstr "_Извлечь том" + #: ../src/xfdesktop-volume-icon.c:689 + msgid "_Mount Volume" + msgstr "_Подключить том" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Ögeleri aktif etmek için _tek tıklama" ++msgstr "_Одиночный щелчок активирует объект" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Küçük _resimleri göster" ---- xfdesktop4-4.8.3.orig/po/da.po -+++ xfdesktop4-4.8.3/po/da.po -@@ -1732,3 +1732,9 @@ msgstr "_Montér arkiv" ++msgstr "Показывать _образцы файлов" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Копировать Ñюда" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_ПеремеÑтить Ñюда" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Создать _ÑÑылку здеÑÑŒ" +--- xfdesktop4-4.8.3.orig/po/nl.po ++++ xfdesktop4-4.8.3/po/nl.po +@@ -1888,3 +1888,18 @@ msgstr "Medium aan_koppelen" #~ msgid "Scientific software" - #~ msgstr "Videnskabelig software" + #~ msgstr "Wetenschappelijke programma's" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Enkeltklik for aktivering af elementer" ++msgstr "_Onderdelen met enkele klik activeren" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Vis miniature" ---- xfdesktop4-4.8.3.orig/po/hr.po -+++ xfdesktop4-4.8.3/po/hr.po -@@ -1142,3 +1142,9 @@ msgstr "_Montiraj ureÄ‘aj" ++msgstr "Miniaturen _weergeven" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "Hierheen _kopiëren" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "Hierheen _verplaatsen" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Hiernaar een koppe_ling maken" +--- xfdesktop4-4.8.3.orig/po/cs.po ++++ xfdesktop4-4.8.3/po/cs.po +@@ -2012,3 +2012,18 @@ msgstr "_PÅ™ipojit svazek" - #~ msgid "_Unmount Volume" - #~ msgstr "_Odmontiraj ureÄ‘aj" + #~ msgid "Scientific software" + #~ msgstr "VÄ›decký software" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Jedan klik za aktiviranje stavki" ++msgstr "_Jednoduché kliknutí pro aktivaci položky" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Pokaži sliÄice" ++msgstr "Z_obrazovat náhledy" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "Zkopírovat _sem" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "PÅ™esunout se_m" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Umístit _odkaz sem" --- xfdesktop4-4.8.3.orig/po/vi.po +++ xfdesktop4-4.8.3/po/vi.po -@@ -1847,3 +1847,9 @@ msgstr "_Gắn ổ" +@@ -1847,3 +1847,18 @@ msgstr "_Gắn ổ" #~ msgid "Unknown error." #~ msgstr "Lá»—i không rõ." @@ -168,9 +340,39 @@ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Sao chép vào đây" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Di chuyển tá»›i đây" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Tạo liên kết ở đây" +--- xfdesktop4-4.8.3.orig/po/zh_TW.po ++++ xfdesktop4-4.8.3/po/zh_TW.po +@@ -1718,3 +1718,18 @@ msgstr "掛載儲存è£ç½®(_M)" + + #~ msgid " Bytes)" + #~ msgstr " ä½å…ƒçµ„)" ++#: ../thunar/thunar-preferences-dialog.c:436 ++msgid "_Single click to activate items" ++msgstr "單點擊以啟用項目(_S)" ++#: ../thunar/thunar-preferences-dialog.c:253 ++msgid "_Show thumbnails" ++msgstr "顯示縮圖(_S)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "複製到這裡(_C)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "移動到這裡(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "連çµåˆ°é€™è£¡(_L)" --- xfdesktop4-4.8.3.orig/po/mk.po +++ xfdesktop4-4.8.3/po/mk.po -@@ -1815,3 +1815,9 @@ msgstr "_Монтирај партици +@@ -1815,3 +1815,18 @@ msgstr "_Монтирај партици #~ msgid "Edit Properties" #~ msgstr "Уреди ги ÑвојÑтвата" @@ -180,33 +382,39 @@ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "_Прикажи Ñликички" ---- xfdesktop4-4.8.3.orig/po/ar.po -+++ xfdesktop4-4.8.3/po/ar.po -@@ -1868,3 +1868,9 @@ msgstr "ضم الج_زء" - #, fuzzy - #~ msgid "Scientific software" - #~ msgstr "برامج تعليمية" -+#: ../thunar/thunar-preferences-dialog.c:436 -+msgid "_Single click to activate items" -+msgstr "_نقرة واحدة لتÙعيل العناصر" -+#: ../thunar/thunar-preferences-dialog.c:253 -+msgid "_Show thumbnails" -+msgstr "أظهر المص_غارات" ---- xfdesktop4-4.8.3.orig/po/bn.po -+++ xfdesktop4-4.8.3/po/bn.po -@@ -1337,3 +1337,9 @@ msgstr "খনà§à¦¡ মাউনà§à¦Ÿ ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Копирај тука" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_ПремеÑти тука" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Поврзи тука" +--- xfdesktop4-4.8.3.orig/po/eu.po ++++ xfdesktop4-4.8.3/po/eu.po +@@ -1741,3 +1741,18 @@ msgstr "Bolumena _muntatu" - #~ msgid "Web Browser" - #~ msgstr "ওয়েব বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°" + #~ msgid "Scientific software" + #~ msgstr "Zientzi softwarea" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "আইটেম সকà§à¦°à¦¿à§Ÿ করতে কà§à¦²à¦¿à¦• করà§à¦¨ (_S)" ++msgstr "Klik _bakana elementuak aktibatzeko" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "থামà§à¦¬à¦¨à§‡à¦‡à¦² পà§à¦°à¦¦à¦°à§à¦¶à¦¨ (_S)" ++msgstr "Argazkitxoak bi_starazi" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopiatu hona" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Mugitu hona" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Lotu hona" --- xfdesktop4-4.8.3.orig/po/ur_PK.po +++ xfdesktop4-4.8.3/po/ur_PK.po -@@ -1903,3 +1903,9 @@ msgstr "والی_Ù… ماؤنٹ کریں" +@@ -1903,3 +1903,18 @@ msgstr "والی_Ù… ماؤنٹ کریں" #, fuzzy #~ msgid "Scientific software" #~ msgstr "تعلیمی پروگرام" @@ -216,93 +424,165 @@ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "ت_ھمبنیل دکھائیں" ---- xfdesktop4-4.8.3.orig/po/be.po -+++ xfdesktop4-4.8.3/po/be.po -@@ -1973,3 +1973,9 @@ msgstr "Пры_мантаваць пад - #, fuzzy - #~ msgid "Scientific software" - #~ msgstr "ÐÐ´ÑƒÐºÐ°Ñ†Ñ‹Ð¹Ð½Ñ‹Ñ Ð¿Ñ€Ð°Ð³Ñ€Ð°Ð¼Ñ‹" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "ÛŒÛÛŒ_Úº کاپی کریں" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "ÛŒÛ_یں منتقل کریں" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "-ÛŒÛاں ربط بنائیں" +--- xfdesktop4-4.8.3.orig/po/he.po ++++ xfdesktop4-4.8.3/po/he.po +@@ -1806,3 +1806,18 @@ msgstr "_חבר כרך" + + #~ msgid "Edit Properties" + #~ msgstr "עריכת מ×פייני×" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Задзейнічаць ÑлемÑнты _Ñамотнай пÑтрычкай" ++msgstr "לחיצה _×חת כדי להפעיל פריטי×" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Паказваць _мініÑтуры" ---- xfdesktop4-4.8.3.orig/po/te.po -+++ xfdesktop4-4.8.3/po/te.po -@@ -939,3 +939,9 @@ msgstr "సంపà±à°Ÿà°®à±à°¨à± à°¨à - #: ../src/xfdesktop-volume-icon.c:689 - msgid "_Mount Volume" - msgstr "సంపà±à°Ÿà°®à±à°¨à± అధిరోహించౠ(_M)" ++msgstr "הצגת _תמונות מוקטנות" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "×”_עתקה לכ×ן" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "×”×¢_ברה לכ×ן" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "יצירת _קישור ×›×ן" +--- xfdesktop4-4.8.3.orig/po/es.po ++++ xfdesktop4-4.8.3/po/es.po +@@ -1917,3 +1917,18 @@ msgstr "_Montar volumen" + + #~ msgid "Scientific software" + #~ msgstr "Software científico" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "ఒకే నొకà±à°•à±à°¤à±‹ అంశాలనౠకà±à°°à°¿à°¯à°¾à°¤à±à°®à°•à°‚ చేయి (_S)" ++msgstr "Clic _simple para activar los elementos" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "à°šà°¿à°°à±à°šà°¿à°¤à±à°°à°¾à°²à°¨à± చూపించౠ(_S)" ---- xfdesktop4-4.8.3.orig/po/ug.po -+++ xfdesktop4-4.8.3/po/ug.po -@@ -1516,3 +1516,9 @@ msgstr "Volume نى Mount قىل(_M)" ++msgstr "Mo_strar miniaturas" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copiar aquí" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Mover aquí" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "En_lazar aquí" +--- xfdesktop4-4.8.3.orig/po/id.po ++++ xfdesktop4-4.8.3/po/id.po +@@ -1889,3 +1889,18 @@ msgstr "_Mount Volume" - #~ msgid "gtk-help" - #~ msgstr "ヘルプ" + #~ msgid "Scientific software" + #~ msgstr "Peranti lunak pendidikan" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "تۈرلەرنى بىرلا Ú†Ûكىپ ئاكتىپلاش(_S)" ++msgstr "_Klik tunggal untk mengaktivasi item" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "thumbnails كۆرسەت(_S)" ---- xfdesktop4-4.8.3.orig/po/pa.po -+++ xfdesktop4-4.8.3/po/pa.po -@@ -1843,3 +1843,9 @@ msgstr "ਵਾਲੀਅਮ ਮਾਊਂà - ++msgstr "_Tampilkan miniatur" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Salin ke sini" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Pindah ke sini" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Taut ke sini" +--- xfdesktop4-4.8.3.orig/po/sq.po ++++ xfdesktop4-4.8.3/po/sq.po +@@ -1804,3 +1804,18 @@ msgstr "_Monto Vëllimin" + #, fuzzy #~ msgid "Scientific software" - #~ msgstr "ਸਾਇੰਸ ਸਾਫਟਵੇਅਰ" + #~ msgstr "Programe edukimi" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "ਆਈਟਮਾਂ ਨੂੰ à¨à¨•à¨Ÿà©€à¨µà©‡à¨Ÿ ਕਰਨ ਲਈ ਇੱਕ ਵਾਰ ਕਲਿੱਕ(_S)" ++msgstr "Klikim _njësh për aktivizim elementësh" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "ਥੰਮਨੇਲ ਵੇਖਾਓ(_S)" ---- xfdesktop4-4.8.3.orig/po/sv.po -+++ xfdesktop4-4.8.3/po/sv.po -@@ -1855,3 +1855,9 @@ msgstr "_Montera volym" ++msgstr "_Shfaqni miniatura" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopjoje këtu" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Lëvize këtu" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Lidhe këtu" +--- xfdesktop4-4.8.3.orig/po/gl.po ++++ xfdesktop4-4.8.3/po/gl.po +@@ -1504,3 +1504,18 @@ msgstr "_Montar volume" #~ msgid "Scientific software" - #~ msgstr "Vetenskaplig programvara" + #~ msgstr "Software científico" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Enkelklicka för att aktivera ett objekt" ++msgstr "Unha _soa pulsación para activar os elementos" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Visa _miniatyrbilder" ---- xfdesktop4-4.8.3.orig/po/ur.po -+++ xfdesktop4-4.8.3/po/ur.po -@@ -1927,3 +1927,9 @@ msgstr "والی_Ù… ماؤنٹ کریں" ++msgstr "Mo_strar miniaturas" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copiar aquí" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Mover aquí" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Ligar aquí" +--- xfdesktop4-4.8.3.orig/po/ja.po ++++ xfdesktop4-4.8.3/po/ja.po +@@ -1050,3 +1050,18 @@ msgstr "マウント(_M)" - #~ msgid "Show windows on each workspace in sub_menus" - #~ msgstr "Ûر مقام کار میں ونڈوز _ذیلی مینیو میں ظاÛر کریں" + #~ msgid "Are you sure that you want to delete \"%s\"?" + #~ msgstr "\"%s\" を削除ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "ایک_ Ú©Ù„Ú© پر عناصر Ú©ÛŒ Ùعالیت" ++msgstr "シングルクリックã§ã‚¢ã‚¤ãƒ†ãƒ ã‚’アクティブã«ã™ã‚‹(_S)" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "ت_ھمبنیل دکھائیں" ---- xfdesktop4-4.8.3.orig/po/zh_CN.po -+++ xfdesktop4-4.8.3/po/zh_CN.po -@@ -1838,3 +1838,9 @@ msgstr "挂载å·(_M)" ++msgstr "サムãƒã‚¤ãƒ«ã‚’表示ã™ã‚‹(_S)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "ã“ã“ã«ã‚³ãƒ”ー(_C)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "ã“ã“ã«ç§»å‹•(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "ã“ã“ã«ãƒªãƒ³ã‚¯(_L)" +--- xfdesktop4-4.8.3.orig/po/it.po ++++ xfdesktop4-4.8.3/po/it.po +@@ -1175,3 +1175,18 @@ msgstr "_Monta volume" - #~ msgid "Scientific software" - #~ msgstr "科学软件" + #~ msgid "Unable to create folder named \"%s\":" + #~ msgstr "Impossibile creare la cartella chiamata \"%s\":" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "å•å‡»æ¿€æ´»é¡¹ç›®(_S)" ++msgstr "_Singolo clic per attivare gli elementi" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "显示缩略图(_S)" ++msgstr "Mostra _miniature" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copia qui" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Sposta qui" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Crea colle_gamento qui" --- xfdesktop4-4.8.3.orig/po/de.po +++ xfdesktop4-4.8.3/po/de.po -@@ -1516,3 +1516,9 @@ msgstr "Datenträger _einhängen" +@@ -1516,3 +1516,18 @@ msgstr "Datenträger _einhängen" #~ msgid "Scientific software" #~ msgstr "Bildungsprogramme" @@ -312,141 +592,275 @@ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "_Miniatur-Vorschaubilder anzeigen" ---- xfdesktop4-4.8.3.orig/po/zh_TW.po -+++ xfdesktop4-4.8.3/po/zh_TW.po -@@ -1718,3 +1718,9 @@ msgstr "掛載儲存è£ç½®(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "Hierher _kopieren" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "Hierher _verschieben" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Hierher verknü_pfen" +--- xfdesktop4-4.8.3.orig/po/en_GB.po ++++ xfdesktop4-4.8.3/po/en_GB.po +@@ -1971,3 +1971,23 @@ msgstr "_Mount Volume" - #~ msgid " Bytes)" - #~ msgstr " ä½å…ƒçµ„)" + #~ msgid "Scientific software" + #~ msgstr "Educational software" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "單點擊以啟用項目(_S)" ++msgstr "_Single click to activate items" ++ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "顯示縮圖(_S)" ---- xfdesktop4-4.8.3.orig/po/he.po -+++ xfdesktop4-4.8.3/po/he.po -@@ -1806,3 +1806,9 @@ msgstr "_חבר כרך" ++msgstr "_Show thumbnails" ++ ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copy here" ++ ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Move here" ++ ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Link here" ++ +--- xfdesktop4-4.8.3.orig/po/fr.po ++++ xfdesktop4-4.8.3/po/fr.po +@@ -1769,3 +1769,18 @@ msgstr "_Monter le périphérique" - #~ msgid "Edit Properties" - #~ msgstr "עריכת מ×פייני×" + #~ msgid "Scientific software" + #~ msgstr "Logiciels éducatifs" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "לחיצה _×חת כדי להפעיל פריטי×" ++msgstr "_Simple clic pour activer les éléments" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "הצגת _תמונות מוקטנות" ---- xfdesktop4-4.8.3.orig/po/eo.po -+++ xfdesktop4-4.8.3/po/eo.po -@@ -1720,3 +1720,9 @@ msgstr "" ++msgstr "_Montrer les miniatures" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copier ici" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Déplacer ici" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Lier ici" +--- xfdesktop4-4.8.3.orig/po/sk.po ++++ xfdesktop4-4.8.3/po/sk.po +@@ -1793,3 +1793,18 @@ msgstr "_PripojiÅ¥ zväzok" - #~ msgid "Delete the current entry" - #~ msgstr "Forigu la kurantan elementon" + #~ msgid "Scientific software" + #~ msgstr "Vedecký softvér" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Unuopa klako por aktivigi erojn" ++msgstr "_AktivovaÅ¥ položky jednoduchým kliknutím" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Montru bildetojn" ---- xfdesktop4-4.8.3.orig/po/ms.po -+++ xfdesktop4-4.8.3/po/ms.po -@@ -1162,3 +1162,9 @@ msgstr "Lekap Volu_m" - #, fuzzy - #~ msgid "Edit" - #~ msgstr "Edit senarai" ++msgstr "ZobraziÅ¥ _miniatúry" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_KopírovaÅ¥ sem" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Presunúť sem" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_VytvoriÅ¥ odkaz" +--- xfdesktop4-4.8.3.orig/po/ka.po ++++ xfdesktop4-4.8.3/po/ka.po +@@ -949,3 +949,18 @@ msgstr "" + + #~ msgid "Style:" + #~ msgstr "სტილი:" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" +msgstr "" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "" ---- xfdesktop4-4.8.3.orig/po/id.po -+++ xfdesktop4-4.8.3/po/id.po -@@ -1889,3 +1889,9 @@ msgstr "_Mount Volume" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "" +--- xfdesktop4-4.8.3.orig/po/da.po ++++ xfdesktop4-4.8.3/po/da.po +@@ -1732,3 +1732,18 @@ msgstr "_Montér arkiv" #~ msgid "Scientific software" - #~ msgstr "Peranti lunak pendidikan" + #~ msgstr "Videnskabelig software" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Klik tunggal untk mengaktivasi item" ++msgstr "_Enkeltklik for aktivering af elementer" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Tampilkan miniatur" ---- xfdesktop4-4.8.3.orig/po/et.po -+++ xfdesktop4-4.8.3/po/et.po -@@ -1789,3 +1789,9 @@ msgstr "_Liida andmeruum" - #, fuzzy - #~ msgid "Scientific software" - #~ msgstr "Hariduslik tarkvara" ++msgstr "_Vis miniature" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopiér her" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Flyt her" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Henvis her" +--- xfdesktop4-4.8.3.orig/po/el.po ++++ xfdesktop4-4.8.3/po/el.po +@@ -1006,3 +1006,18 @@ msgstr "ΠÏο_σάÏτηση τόμου + + #~ msgid "Whether or not the app supports startup notification" + #~ msgstr "Αν η εφαÏμογή υποστηÏίζει ενημέÏωση εκκίνησης" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "E_semed aktiveeritakse ühe klõpsuga" ++msgstr "_Μονό κλικ για την ενεÏγοποίηση αντικειμένων" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Näidata pi_sipilte" ---- xfdesktop4-4.8.3.orig/po/nl.po -+++ xfdesktop4-4.8.3/po/nl.po -@@ -1888,3 +1888,9 @@ msgstr "Medium aan_koppelen" ++msgstr "Εμφάνιση _μικÏογÏαφιών:" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_ΑντιγÏαφή εδώ" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Μετακίνηση εδώ" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Δ_ημιουÏγία Î´ÎµÏƒÎ¼Î¿Ï ÎµÎ´ÏŽ" +--- xfdesktop4-4.8.3.orig/po/ug.po ++++ xfdesktop4-4.8.3/po/ug.po +@@ -1516,3 +1516,18 @@ msgstr "Volume نى Mount قىل(_M)" - #~ msgid "Scientific software" - #~ msgstr "Wetenschappelijke programma's" + #~ msgid "gtk-help" + #~ msgstr "ヘルプ" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Onderdelen met enkele klik activeren" ++msgstr "تۈرلەرنى بىرلا Ú†Ûكىپ ئاكتىپلاش(_S)" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Miniaturen _weergeven" ---- xfdesktop4-4.8.3.orig/po/pt.po -+++ xfdesktop4-4.8.3/po/pt.po -@@ -1812,3 +1812,9 @@ msgstr "_Montar volume" ++msgstr "thumbnails كۆرسەت(_S)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "بۇ يەرگە كۆچۈر(_C)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "بۇ يەرگە يۆتكە(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "بۇ يەرگە ئۇلا(_L)" +--- xfdesktop4-4.8.3.orig/po/hr.po ++++ xfdesktop4-4.8.3/po/hr.po +@@ -1142,3 +1142,18 @@ msgstr "_Montiraj ureÄ‘aj" - #~ msgid "Scientific software" - #~ msgstr "Software científico" + #~ msgid "_Unmount Volume" + #~ msgstr "_Odmontiraj ureÄ‘aj" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Clique único para activar itens" ++msgstr "_Jedan klik za aktiviranje stavki" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Mostar miniaturas" ---- xfdesktop4-4.8.3.orig/po/ast.po -+++ xfdesktop4-4.8.3/po/ast.po -@@ -1499,3 +1499,9 @@ msgstr "_Montar volume" ++msgstr "_Pokaži sliÄice" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopiraj ovdje" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Makni ovdje" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Poveznica ovdje" +--- xfdesktop4-4.8.3.orig/po/zh_CN.po ++++ xfdesktop4-4.8.3/po/zh_CN.po +@@ -1838,3 +1838,18 @@ msgstr "挂载å·(_M)" #~ msgid "Scientific software" - #~ msgstr "Software de ciencia" + #~ msgstr "科学软件" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Clic _simple p'activar los elementos" ++msgstr "å•å‡»æ¿€æ´»é¡¹ç›®(_S)" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Am_osar miniatures" ---- xfdesktop4-4.8.3.orig/po/ka.po -+++ xfdesktop4-4.8.3/po/ka.po -@@ -949,3 +949,9 @@ msgstr "" ++msgstr "显示缩略图(_S)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "å¤åˆ¶åˆ°è¿™é‡Œ(_C)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "移动到这里(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "链接到这里(_L)" +--- xfdesktop4-4.8.3.orig/po/fi.po ++++ xfdesktop4-4.8.3/po/fi.po +@@ -1762,3 +1762,18 @@ msgstr "_Liitä taltio" - #~ msgid "Style:" - #~ msgstr "სტილი:" + #~ msgid "Xfce 4 Menu Editor" + #~ msgstr "Xfce 4 valikkoeditori" ++#: ../thunar/thunar-preferences-dialog.c:436 ++msgid "_Single click to activate items" ++msgstr "Aktivoi kohteet k_ertanapsautuksella" ++#: ../thunar/thunar-preferences-dialog.c:253 ++msgid "_Show thumbnails" ++msgstr "_Näytä pienoiskuvat" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopioi tähän" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Siirrä tähän" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Linkitä tähän" +--- xfdesktop4-4.8.3.orig/po/si.po ++++ xfdesktop4-4.8.3/po/si.po +@@ -1328,3 +1328,18 @@ msgstr "පරිමà·à·€ _Mount කර + + #~ msgid "Scientific software" + #~ msgstr "විද්â€à¶ºà·à¶­à·Šà¶¸à¶š මෘදුකà·à¶‚ග" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" +msgstr "" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "" ---- xfdesktop4-4.8.3.orig/po/it.po -+++ xfdesktop4-4.8.3/po/it.po -@@ -1175,3 +1175,9 @@ msgstr "_Monta volume" - - #~ msgid "Unable to create folder named \"%s\":" - #~ msgstr "Impossibile creare la cartella chiamata \"%s\":" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "" +--- xfdesktop4-4.8.3.orig/po/te.po ++++ xfdesktop4-4.8.3/po/te.po +@@ -939,3 +939,18 @@ msgstr "సంపà±à°Ÿà°®à±à°¨à± à°¨à + #: ../src/xfdesktop-volume-icon.c:689 + msgid "_Mount Volume" + msgstr "సంపà±à°Ÿà°®à±à°¨à± అధిరోహించౠ(_M)" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Singolo clic per attivare gli elementi" ++msgstr "ఒకే నొకà±à°•à±à°¤à±‹ అంశాలనౠకà±à°°à°¿à°¯à°¾à°¤à±à°®à°•à°‚ చేయి (_S)" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Mostra _miniature" ++msgstr "à°šà°¿à°°à±à°šà°¿à°¤à±à°°à°¾à°²à°¨à± చూపించౠ(_S)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "ఇకà±à°•à°¡à°•à± నకలà±à°šà±‡à°¯à°¿ (_C)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "ఇకà±à°•à°¡à°•à± తరలించౠ(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "" --- xfdesktop4-4.8.3.orig/po/dz.po +++ xfdesktop4-4.8.3/po/dz.po -@@ -1824,3 +1824,9 @@ msgstr "སà¾à½‘་ཤུགས་སྠ+@@ -1824,3 +1824,18 @@ msgstr "སà¾à½‘་ཤུགས་སྠ#~ msgid "Edit Properties" #~ msgstr "རྒྱུ་དངོས་ཚུ་ཞུན་དག་རà¾à¾±à½–སà¼" @@ -456,57 +870,102 @@ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "མà½à½ºà¼‹à½‚ཟེར་ཚུ་སྟོནà¼(_S)" ---- xfdesktop4-4.8.3.orig/po/ru.po -+++ xfdesktop4-4.8.3/po/ru.po -@@ -945,3 +945,9 @@ msgstr "_Извлечь том" - #: ../src/xfdesktop-volume-icon.c:689 - msgid "_Mount Volume" - msgstr "_Подключить том" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "ནཱ་ལུ་འདྲ་བཤུས་བརà¾à¾±à½–à¼(_C)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "ནཱ་ལུ་སྤོ་བཤུད་འབདà¼(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "ནཱ་ལུ་འབྲེལ་མà½à½´à½‘་འབདà¼(_L)" +--- xfdesktop4-4.8.3.orig/po/ast.po ++++ xfdesktop4-4.8.3/po/ast.po +@@ -1499,3 +1499,18 @@ msgstr "_Montar volume" + + #~ msgid "Scientific software" + #~ msgstr "Software de ciencia" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Одиночный щелчок активирует объект" ++msgstr "Clic _simple p'activar los elementos" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Показывать _образцы файлов" ---- xfdesktop4-4.8.3.orig/po/pt_BR.po -+++ xfdesktop4-4.8.3/po/pt_BR.po -@@ -1949,3 +1949,9 @@ msgstr "_Montar volume" ++msgstr "Am_osar miniatures" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copiar equí" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Mover equí" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "En_llazar equí" +--- xfdesktop4-4.8.3.orig/po/lv.po ++++ xfdesktop4-4.8.3/po/lv.po +@@ -1927,3 +1927,18 @@ msgstr "_MontÄ“t sÄ“jumu" #~ msgid "Scientific software" - #~ msgstr "Programas científicos" + #~ msgstr "ZinÄtnes programmatÅ«ra" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Clique único para ativar iten_s" ++msgstr "_Viens klikÅ¡Ä·is, lai aktivizÄ“tu vienumus" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Mostar miniaturas" ---- xfdesktop4-4.8.3.orig/po/el.po -+++ xfdesktop4-4.8.3/po/el.po -@@ -1006,3 +1006,9 @@ msgstr "ΠÏο_σάÏτηση τόμου ++msgstr "_RÄdÄ«t sÄ«ktÄ“lus" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_KopÄ“t Å¡eit" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_PÄrvietot Å¡eit" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Saiti Å¡eit" +--- xfdesktop4-4.8.3.orig/po/tr.po ++++ xfdesktop4-4.8.3/po/tr.po +@@ -1727,3 +1727,18 @@ msgstr "Birim _BaÄŸla" - #~ msgid "Whether or not the app supports startup notification" - #~ msgstr "Αν η εφαÏμογή υποστηÏίζει ενημέÏωση εκκίνησης" + #~ msgid "Scientific software" + #~ msgstr "EÄŸitimsel uygulama" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Μονό κλικ για την ενεÏγοποίηση αντικειμένων" ++msgstr "Ögeleri aktif etmek için _tek tıklama" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Εμφάνιση _μικÏογÏαφιών:" ---- xfdesktop4-4.8.3.orig/po/ro.po -+++ xfdesktop4-4.8.3/po/ro.po -@@ -941,3 +941,9 @@ msgstr "_Montare volum" ++msgstr "Küçük _resimleri göster" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "Buraya _kopyala" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "Buraya _taşı" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Buraya _baÄŸ koy" +--- xfdesktop4-4.8.3.orig/po/ur.po ++++ xfdesktop4-4.8.3/po/ur.po +@@ -1927,3 +1927,18 @@ msgstr "والی_Ù… ماؤنٹ کریں" - #~ msgid "Make sure you have a file manager installed that supports the Xfce Trash service, such as Thunar." - #~ msgstr "AsiguraÈ›i-vă ca aveÈ›i instalat un manager de fiÈ™iere cu suport pentru serviciul Xfce Trash (precum Thunar)." + #~ msgid "Show windows on each workspace in sub_menus" + #~ msgstr "Ûر مقام کار میں ونڈوز _ذیلی مینیو میں ظاÛر کریں" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Clic _simplu pentru activarea elementelor" ++msgstr "ایک_ Ú©Ù„Ú© پر عناصر Ú©ÛŒ Ùعالیت" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Arată _miniaturi" ++msgstr "ت_ھمبنیل دکھائیں" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "ÛŒÛÛŒ_Úº کاپی کریں" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "ÛŒÛ_یں منتقل کریں" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "-ÛŒÛاں ربط بنائیں" --- xfdesktop4-4.8.3.orig/po/hu.po +++ xfdesktop4-4.8.3/po/hu.po -@@ -973,3 +973,9 @@ msgstr "Kötet _csatolása" +@@ -973,3 +973,18 @@ msgstr "Kötet _csatolása" #~ msgstr "" #~ "GyÅ‘zÅ‘djön meg, hogy telepítve van az Xfce Kuka szolgáltatást támogató " #~ "fájlkezelÅ‘, például a Thunar." @@ -516,57 +975,60 @@ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "Bélyegké_pek megjelenítése" ---- xfdesktop4-4.8.3.orig/po/gl.po -+++ xfdesktop4-4.8.3/po/gl.po -@@ -1504,3 +1504,9 @@ msgstr "_Montar volume" - - #~ msgid "Scientific software" - #~ msgstr "Software científico" -+#: ../thunar/thunar-preferences-dialog.c:436 -+msgid "_Single click to activate items" -+msgstr "Unha _soa pulsación para activar os elementos" -+#: ../thunar/thunar-preferences-dialog.c:253 -+msgid "_Show thumbnails" -+msgstr "Mo_strar miniaturas" ---- xfdesktop4-4.8.3.orig/po/sq.po -+++ xfdesktop4-4.8.3/po/sq.po -@@ -1804,3 +1804,9 @@ msgstr "_Monto Vëllimin" - #, fuzzy - #~ msgid "Scientific software" - #~ msgstr "Programe edukimi" -+#: ../thunar/thunar-preferences-dialog.c:436 -+msgid "_Single click to activate items" -+msgstr "Klikim _njësh për aktivizim elementësh" -+#: ../thunar/thunar-preferences-dialog.c:253 -+msgid "_Show thumbnails" -+msgstr "_Shfaqni miniatura" ---- xfdesktop4-4.8.3.orig/po/uk.po -+++ xfdesktop4-4.8.3/po/uk.po -@@ -1731,3 +1731,9 @@ msgstr "_Підключити том" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "Más_olás ide" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "Ã_thelyezés ide" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Linkelés ide" +--- xfdesktop4-4.8.3.orig/po/eo.po ++++ xfdesktop4-4.8.3/po/eo.po +@@ -1720,3 +1720,18 @@ msgstr "" - #~ msgid "Scientific software" - #~ msgstr "Ðавчальні програми" + #~ msgid "Delete the current entry" + #~ msgstr "Forigu la kurantan elementon" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "ÐÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚Ñ–Ð² _одинарним клацаннÑм" ++msgstr "_Unuopa klako por aktivigi erojn" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Показувати мініатюри" ---- xfdesktop4-4.8.3.orig/po/lv.po -+++ xfdesktop4-4.8.3/po/lv.po -@@ -1927,3 +1927,9 @@ msgstr "_MontÄ“t sÄ“jumu" ++msgstr "_Montru bildetojn" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopiu ĉi tien" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Movu ĉi tien" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Alligu ĉi tien" +--- xfdesktop4-4.8.3.orig/po/pt_BR.po ++++ xfdesktop4-4.8.3/po/pt_BR.po +@@ -1949,3 +1949,18 @@ msgstr "_Montar volume" #~ msgid "Scientific software" - #~ msgstr "ZinÄtnes programmatÅ«ra" + #~ msgstr "Programas científicos" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Viens klikÅ¡Ä·is, lai aktivizÄ“tu vienumus" ++msgstr "Clique único para ativar iten_s" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_RÄdÄ«t sÄ«ktÄ“lus" ++msgstr "_Mostar miniaturas" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Copiar para cá" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Mover para cá" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Criar link aqui" --- xfdesktop4-4.8.3.orig/po/ko.po +++ xfdesktop4-4.8.3/po/ko.po -@@ -934,3 +934,9 @@ msgstr "볼륨 추출(_j)" +@@ -934,3 +934,18 @@ msgstr "볼륨 추출(_j)" msgid "_Mount Volume" msgstr "볼륨 마운트(_M)" @@ -576,63 +1038,75 @@ +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" +msgstr "ì¸ë„¤ì¼ ë³´ì´ê¸°(_S)" ---- xfdesktop4-4.8.3.orig/po/eu.po -+++ xfdesktop4-4.8.3/po/eu.po -@@ -1741,3 +1741,9 @@ msgstr "Bolumena _muntatu" - - #~ msgid "Scientific software" - #~ msgstr "Zientzi softwarea" -+#: ../thunar/thunar-preferences-dialog.c:436 -+msgid "_Single click to activate items" -+msgstr "Klik _bakana elementuak aktibatzeko" -+#: ../thunar/thunar-preferences-dialog.c:253 -+msgid "_Show thumbnails" -+msgstr "Argazkitxoak bi_starazi" ---- xfdesktop4-4.8.3.orig/po/fr.po -+++ xfdesktop4-4.8.3/po/fr.po -@@ -1769,3 +1769,9 @@ msgstr "_Monter le périphérique" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "여기로 복사(_C)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "여기로 ì´ë™(_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "ì—¬ê¸°ì— ë§í¬(_L)" +--- xfdesktop4-4.8.3.orig/po/bn.po ++++ xfdesktop4-4.8.3/po/bn.po +@@ -1337,3 +1337,18 @@ msgstr "খনà§à¦¡ মাউনà§à¦Ÿ - #~ msgid "Scientific software" - #~ msgstr "Logiciels éducatifs" + #~ msgid "Web Browser" + #~ msgstr "ওয়েব বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Simple clic pour activer les éléments" ++msgstr "আইটেম সকà§à¦°à¦¿à§Ÿ করতে কà§à¦²à¦¿à¦• করà§à¦¨ (_S)" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "_Montrer les miniatures" ---- xfdesktop4-4.8.3.orig/po/cs.po -+++ xfdesktop4-4.8.3/po/cs.po -@@ -2012,3 +2012,9 @@ msgstr "_PÅ™ipojit svazek" ++msgstr "থামà§à¦¬à¦¨à§‡à¦‡à¦² পà§à¦°à¦¦à¦°à§à¦¶à¦¨ (_S)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "à¦à¦–ানে অণà§à¦²à¦¿à¦ªà¦¿ করà§à¦¨ (_C)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "à¦à¦–ানে সরান (_M)" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "à¦à¦–ানে সংযà§à¦•à§à¦¤ করà§à¦¨ (_L)" +--- xfdesktop4-4.8.3.orig/po/sv.po ++++ xfdesktop4-4.8.3/po/sv.po +@@ -1855,3 +1855,18 @@ msgstr "_Montera volym" #~ msgid "Scientific software" - #~ msgstr "VÄ›decký software" + #~ msgstr "Vetenskaplig programvara" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "_Jednoduché kliknutí pro aktivaci položky" ++msgstr "_Enkelklicka för att aktivera ett objekt" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Z_obrazovat náhledy" ---- xfdesktop4-4.8.3.orig/po/si.po -+++ xfdesktop4-4.8.3/po/si.po -@@ -1328,3 +1328,9 @@ msgstr "පරිමà·à·€ _Mount කර - ++msgstr "Visa _miniatyrbilder" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "_Kopiera hit" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "_Flytta hit" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "_Länka hit" +--- xfdesktop4-4.8.3.orig/po/be.po ++++ xfdesktop4-4.8.3/po/be.po +@@ -1973,3 +1973,18 @@ msgstr "Пры_мантаваць пад + #, fuzzy #~ msgid "Scientific software" - #~ msgstr "විද්â€à¶ºà·à¶­à·Šà¶¸à¶š මෘදුකà·à¶‚ග" -+#: ../thunar/thunar-preferences-dialog.c:436 -+msgid "_Single click to activate items" -+msgstr "" -+#: ../thunar/thunar-preferences-dialog.c:253 -+msgid "_Show thumbnails" -+msgstr "" ---- xfdesktop4-4.8.3.orig/po/lt.po -+++ xfdesktop4-4.8.3/po/lt.po -@@ -1548,3 +1548,9 @@ msgstr "_Prijungti tomÄ…" - - #~ msgid "Delete the current entry" - #~ msgstr "IÅ¡trinti šį įraÅ¡Ä…" + #~ msgstr "ÐÐ´ÑƒÐºÐ°Ñ†Ñ‹Ð¹Ð½Ñ‹Ñ Ð¿Ñ€Ð°Ð³Ñ€Ð°Ð¼Ñ‹" +#: ../thunar/thunar-preferences-dialog.c:436 +msgid "_Single click to activate items" -+msgstr "Aktyvuoti _vienu pelÄ—s mygtuko paspaudimu" ++msgstr "Задзейнічаць ÑлемÑнты _Ñамотнай пÑтрычкай" +#: ../thunar/thunar-preferences-dialog.c:253 +msgid "_Show thumbnails" -+msgstr "Rodyti _miniatÅ«ras" ++msgstr "Паказваць _мініÑтуры" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Copy here" ++msgstr "С_капіÑваць Ñюды" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Move here" ++msgstr "Пера_мÑÑьціць Ñюды" ++#: ../thunar/thunar-dnd.c:72 ++msgid "_Link here" ++msgstr "Стварыць Ñ_паÑылку" diff -Nru xfdesktop4-4.8.3/debian/patches/xubuntu_single-click-option.patch xfdesktop4-4.8.3/debian/patches/xubuntu_single-click-option.patch --- xfdesktop4-4.8.3/debian/patches/xubuntu_single-click-option.patch 2012-02-07 19:29:16.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/xubuntu_single-click-option.patch 2012-02-14 21:02:28.000000000 +0000 @@ -11,7 +11,7 @@ has been modified to match the option name in Thunar, so we can reuse existing translations. -Last-Update: 2012-02-07 +Last-Update: 2012-02-13 Origin: other, https://bugzilla.xfce.org/attachment.cgi?id=4113 Bug: https://bugzilla.xfce.org/show_bug.cgi?id=1797 @@ -23,38 +23,37 @@ #define DESKTOP_ICONS_FONT_SIZE_PROP "/desktop-icons/font-size" +#define DESKTOP_ICONS_SINGLE_CLICK_PROP "/desktop-icons/single-click" #define DESKTOP_ICONS_CUSTOM_FONT_SIZE_PROP "/desktop-icons/use-custom-font-size" + #define DESKTOP_ICONS_SHOW_THUMBNAILS_PROP "/desktop-icons/show-thumbnails" #define DESKTOP_ICONS_SHOW_HOME "/desktop-icons/file-icons/show-home" - #define DESKTOP_ICONS_SHOW_TRASH "/desktop-icons/file-icons/show-trash" -@@ -1226,7 +1227,8 @@ xfdesktop_settings_dialog_new(GtkBuilder - { +@@ -1263,7 +1264,7 @@ xfdesktop_settings_dialog_new(GtkBuilder gint i, j, nmonitors, nscreens; GtkWidget *dialog, *appearance_container, *chk_custom_font_size, -- *spin_font_size, *color_style_widget, *w, *box; -+ *spin_font_size, *color_style_widget, *w, *box, -+ *chk_single_click; + *spin_font_size, *color_style_widget, *w, *box, +- *spin_icon_size, *chk_show_thumbnails; ++ *spin_icon_size, *chk_single_click, *chk_show_thumbnails; dialog = GTK_WIDGET(gtk_builder_get_object(main_gxml, "prefs_dialog")); appearance_container = GTK_WIDGET(gtk_builder_get_object(main_gxml, -@@ -1236,6 +1238,9 @@ xfdesktop_settings_dialog_new(GtkBuilder - "chk_custom_font_size")); - spin_font_size = GTK_WIDGET(gtk_builder_get_object(main_gxml, "spin_font_size")); +@@ -1288,6 +1289,9 @@ xfdesktop_settings_dialog_new(GtkBuilder + G_CALLBACK(cb_xfdesktop_chk_custom_font_size_toggled), + spin_font_size); + chk_single_click = GTK_WIDGET(gtk_builder_get_object(main_gxml, + "chk_single_click")); + - g_signal_connect(G_OBJECT(chk_custom_font_size), "toggled", - G_CALLBACK(cb_xfdesktop_chk_custom_font_size_toggled), - spin_font_size); -@@ -1488,6 +1493,9 @@ xfdesktop_settings_dialog_new(GtkBuilder + chk_show_thumbnails = GTK_WIDGET(gtk_builder_get_object(main_gxml, + "chk_show_thumbnails")); + +@@ -1535,6 +1539,9 @@ xfdesktop_settings_dialog_new(GtkBuilder xfconf_g_property_bind(channel, DESKTOP_ICONS_CUSTOM_FONT_SIZE_PROP, G_TYPE_BOOLEAN, G_OBJECT(chk_custom_font_size), "active"); + xfconf_g_property_bind(channel, DESKTOP_ICONS_SINGLE_CLICK_PROP, + G_TYPE_BOOLEAN, G_OBJECT(chk_single_click), + "active"); - - setup_special_icon_list(main_gxml, channel); - + xfconf_g_property_bind(channel, DESKTOP_ICONS_SHOW_THUMBNAILS_PROP, + G_TYPE_BOOLEAN, G_OBJECT(chk_show_thumbnails), + "active"); --- xfdesktop4-4.8.3.orig/settings/xfdesktop-settings-ui.glade +++ xfdesktop4-4.8.3/settings/xfdesktop-settings-ui.glade @@ -685,6 +685,16 @@ @@ -71,16 +70,17 @@ + + + - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + True + True --- xfdesktop4-4.8.3.orig/src/xfdesktop-icon-view.c +++ xfdesktop4-4.8.3/src/xfdesktop-icon-view.c -@@ -48,9 +48,11 @@ - +@@ -49,10 +49,12 @@ #include "xfdesktop-icon-view.h" + #include "xfdesktop-file-icon-manager.h" #include "xfdesktop-marshal.h" +#include "xfdesktop-common.h" + #include "xfce-desktop.h" #include #include @@ -88,7 +88,7 @@ #define DEFAULT_FONT_SIZE 12 #define DEFAULT_ICON_SIZE 32 -@@ -135,6 +137,8 @@ struct _XfdesktopIconViewPrivate +@@ -137,6 +139,8 @@ struct _XfdesktopIconViewPrivate gint press_start_y; GdkRectangle band_rect; @@ -97,11 +97,12 @@ GdkColor *selection_box_color; guchar selection_box_alpha; -@@ -168,8 +172,18 @@ struct _XfdesktopIconViewPrivate +@@ -170,9 +174,19 @@ struct _XfdesktopIconViewPrivate gdouble cell_text_width_proportion; gboolean ellipsize_icon_labels; + gboolean single_click; + guint tooltip_size; }; +static void xfce_icon_view_set_property(GObject *object, @@ -116,7 +117,7 @@ static gboolean xfdesktop_icon_view_button_press(GtkWidget *widget, GdkEventButton *evt, gpointer user_data); -@@ -337,6 +351,13 @@ enum +@@ -340,6 +354,13 @@ enum TARGET_XFDESKTOP_ICON = 9999, }; @@ -130,7 +131,7 @@ static const GtkTargetEntry icon_view_targets[] = { { "XFDESKTOP_ICON", GTK_TARGET_SAME_APP, TARGET_XFDESKTOP_ICON } }; -@@ -362,6 +383,8 @@ xfdesktop_icon_view_class_init(Xfdesktop +@@ -365,6 +386,8 @@ xfdesktop_icon_view_class_init(Xfdesktop g_type_class_add_private(klass, sizeof(XfdesktopIconViewPrivate)); gobject_class->finalize = xfdesktop_icon_view_finalize; @@ -139,9 +140,9 @@ widget_class->style_set = xfdesktop_icon_view_style_set; widget_class->realize = xfdesktop_icon_view_realize; -@@ -545,6 +568,21 @@ xfdesktop_icon_view_class_init(Xfdesktop - 0.0, 50.0, 4.0, - G_PARAM_READABLE)); +@@ -555,6 +578,21 @@ xfdesktop_icon_view_class_init(Xfdesktop + 0, 512, 0, + G_PARAM_READABLE)); +#define XFDESKTOP_PARAM_FLAGS (G_PARAM_READWRITE \ + | G_PARAM_CONSTRUCT \ @@ -161,7 +162,7 @@ /* same binding entries as GtkIconView */ gtk_binding_entry_add_signal(binding_set, GDK_a, GDK_CONTROL_MASK, "select-all", 0); -@@ -633,6 +671,14 @@ xfdesktop_icon_view_init(XfdesktopIconVi +@@ -643,6 +681,14 @@ xfdesktop_icon_view_init(XfdesktopIconVi g_object_set(G_OBJECT(icon_view), "has-tooltip", TRUE, NULL); g_signal_connect(G_OBJECT(icon_view), "query-tooltip", G_CALLBACK(xfdesktop_icon_view_show_tooltip), NULL); @@ -176,7 +177,7 @@ GTK_WIDGET_SET_FLAGS(GTK_WIDGET(icon_view), GTK_NO_WINDOW); } -@@ -654,11 +700,54 @@ xfdesktop_icon_view_finalize(GObject *ob +@@ -664,11 +710,54 @@ xfdesktop_icon_view_finalize(GObject *ob g_list_foreach(icon_view->priv->pending_icons, (GFunc)g_object_unref, NULL); g_list_free(icon_view->priv->pending_icons); /* icon_view->priv->icons should be cleared in _unrealize() */ @@ -231,7 +232,7 @@ xfdesktop_icon_view_add_move_binding(GtkBindingSet *binding_set, guint keyval, guint modmask, -@@ -802,6 +891,14 @@ xfdesktop_icon_view_button_press(GtkWidg +@@ -808,6 +897,14 @@ xfdesktop_icon_view_button_press(GtkWidg } static gboolean @@ -246,10 +247,10 @@ xfdesktop_icon_view_button_release(GtkWidget *widget, GdkEventButton *evt, gpointer user_data) -@@ -810,6 +907,23 @@ xfdesktop_icon_view_button_release(GtkWi +@@ -816,6 +913,24 @@ xfdesktop_icon_view_button_release(GtkWi TRACE("entering btn=%d", evt->button); - + + /* single-click */ + if(xfdesktop_icon_view_get_single_click(icon_view) + && evt->button == 1 @@ -267,10 +268,11 @@ + } + } + - if(evt->button == 1) { - DBG("unsetting stuff"); - icon_view->priv->definitely_dragging = FALSE; -@@ -874,6 +988,12 @@ xfdesktop_icon_view_focus_out(GtkWidget ++ + if((evt->button == 3 || (evt->button == 1 && (evt->state & GDK_SHIFT_MASK))) && + icon_view->priv->definitely_dragging == FALSE && + icon_view->priv->definitely_rubber_banding == FALSE) +@@ -889,6 +1004,12 @@ xfdesktop_icon_view_focus_out(GtkWidget xfdesktop_icon_view_invalidate_icon(icon_view, l->data, FALSE); } @@ -283,7 +285,7 @@ return FALSE; } -@@ -1049,6 +1169,11 @@ xfdesktop_icon_view_motion_notify(GtkWid +@@ -1076,6 +1197,11 @@ xfdesktop_icon_view_motion_notify(GtkWid /* normal movement; highlight icons as they go under the pointer */ if(icon_view->priv->item_under_pointer) { @@ -295,7 +297,7 @@ if(!xfdesktop_icon_get_extents(icon_view->priv->item_under_pointer, NULL, NULL, &extents) || !xfdesktop_rectangle_contains_point(&extents, evt->x, evt->y)) -@@ -1060,6 +1185,9 @@ xfdesktop_icon_view_motion_notify(GtkWid +@@ -1087,6 +1213,9 @@ xfdesktop_icon_view_motion_notify(GtkWid #endif } } else { @@ -305,7 +307,7 @@ icon = xfdesktop_icon_view_widget_coords_to_item(icon_view, evt->x, evt->y); -@@ -1093,6 +1221,12 @@ xfdesktop_icon_view_leave_notify(GtkWidg +@@ -1122,6 +1251,12 @@ xfdesktop_icon_view_leave_notify(GtkWidg xfdesktop_icon_view_invalidate_icon(icon_view, icon, FALSE); #endif } diff -Nru xfdesktop4-4.8.3/debian/patches/xubuntu_use-tumbler.patch xfdesktop4-4.8.3/debian/patches/xubuntu_use-tumbler.patch --- xfdesktop4-4.8.3/debian/patches/xubuntu_use-tumbler.patch 2012-02-07 19:29:16.000000000 +0000 +++ xfdesktop4-4.8.3/debian/patches/xubuntu_use-tumbler.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,1454 +0,0 @@ -Description: use Tumbler to generate thumbnails on desktop - Slightly modified for Xubuntu to apply cleanly, comment out debug - statements, remove the thumbnail from the icon tooltip and disable - thumbnails by default. The added string has been modified to match - the option name in Thunar, so we can reuse existing translations - (yes, there's a mnemonics conflict, I know). -Last-Update: 2012-02-07 -Origin: other, https://bugzilla.xfce.org/attachment.cgi?id=4168 -Bug: https://bugzilla.xfce.org/show_bug.cgi?id=4344 - ---- xfdesktop4-4.8.3.orig/common/Makefile.am -+++ xfdesktop4-4.8.3/common/Makefile.am -@@ -2,9 +2,44 @@ noinst_LTLIBRARIES = libxfdesktop.la - - libxfdesktop_la_SOURCES = \ - xfdesktop-common.c \ -- xfdesktop-common.h -+ xfdesktop-common.h \ -+ xfdesktop-marshal.c \ -+ xfdesktop-marshal.h - - libxfdesktop_la_CFLAGS = \ - -I$(top_srcdir)/src \ - $(LIBXFCE4UTIL_CFLAGS) \ - $(GTK_CFLAGS) -+ -+if ENABLE_DESKTOP_ICONS -+if ENABLE_FILE_ICONS -+ -+libxfdesktop_la_SOURCES += \ -+ xfdesktop-thumbnailer.c \ -+ xfdesktop-thumbnailer.h -+ -+libxfdesktop_la_CFLAGS += \ -+ -DDBUS_API_SUBJECT_TO_CHANGE \ -+ $(DBUS_CFLAGS) -+ -+endif -+endif -+ -+DISTCLEANFILES = \ -+ $(xfdesktop_built_sources) \ -+ stamp-xfdesktop-marshal.h \ -+ xfdesktop-marshal.c \ -+ xfdesktop-marshal.h -+ -+xfdesktop-marshal.h: stamp-xfdesktop-marshal.h -+ @true -+stamp-xfdesktop-marshal.h: xfdesktop-marshal.list Makefile -+ $(AM_V_GEN) glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --header > xfdesktop-marshal.h && \ -+ echo timestamp > $(@F) -+xfdesktop-marshal.c: xfdesktop-marshal.list Makefile -+ $(AM_V_GEN) echo '#include "xfdesktop-marshal.h"' > xfdesktop-marshal.c && \ -+ glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --body >> xfdesktop-marshal.c && \ -+ glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --header > xfdesktop-marshal.h -+ -+EXTRA_DIST = \ -+ xfdesktop-marshal.list ---- /dev/null -+++ xfdesktop4-4.8.3/common/xfdesktop-marshal.list -@@ -0,0 +1,4 @@ -+BOOLEAN:VOID -+BOOLEAN:ENUM,INT -+VOID:UINT,BOXED -+VOID:STRING,STRING ---- /dev/null -+++ xfdesktop4-4.8.3/common/xfdesktop-thumbnailer.c -@@ -0,0 +1,571 @@ -+/* -+ * xfdesktop - xfce4's desktop manager -+ * -+ * Copyright(c) 2006 Brian Tarricone, -+ * Copyright(c) 2006 Benedikt Meurer, -+ * Copyright(c) 2010-2011 Jannis Pohlmann, -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU Library General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ * xfdesktop-thumbnailer is based on thumbnailer code from Ristretto -+ * Copyright (c) Stephan Arts 2009-2011 -+ * -+ * Thumbnailer Spec -+ * http://live.gnome.org/ThumbnailerSpec -+ * Thumbnail Managing Standard -+ * http://people.freedesktop.org/~vuntz/thumbnail-spec-cache/creation.html -+ */ -+ -+#include -+ -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#include "xfdesktop-thumbnailer.h" -+#include "xfdesktop-marshal.h" -+ -+static void xfdesktop_thumbnailer_init(GObject *); -+static void xfdesktop_thumbnailer_class_init(GObjectClass *); -+ -+static void xfdesktop_thumbnailer_dispose(GObject *object); -+static void xfdesktop_thumbnailer_finalize(GObject *object); -+ -+static void xfdesktop_thumbnailer_request_finished_dbus(DBusGProxy *proxy, -+ gint handle, -+ gpointer data); -+ -+static void xfdesktop_thumbnailer_thumbnail_ready_dbus(DBusGProxy *proxy, -+ gint handle, -+ const gchar **uri, -+ gpointer data); -+ -+static gboolean xfdesktop_thumbnailer_queue_request_timer(XfdesktopThumbnailer *thumbnailer); -+ -+static GObjectClass *parent_class = NULL; -+static XfdesktopThumbnailer *thumbnailer_object = NULL; -+ -+enum -+{ -+ THUMBNAIL_READY, -+ LAST_SIGNAL, -+}; -+ -+static guint thumbnailer_signals[LAST_SIGNAL] = { 0, }; -+ -+GType -+xfdesktop_thumbnailer_get_type(void) -+{ -+ static GType xfdesktop_thumbnailer_type = 0; -+ -+ if(!xfdesktop_thumbnailer_type) { -+ static const GTypeInfo xfdesktop_thumbnailer_info = -+ { -+ sizeof (XfdesktopThumbnailerClass), -+ (GBaseInitFunc) NULL, -+ (GBaseFinalizeFunc) NULL, -+ (GClassInitFunc) xfdesktop_thumbnailer_class_init, -+ (GClassFinalizeFunc) NULL, -+ NULL, -+ sizeof (XfdesktopThumbnailer), -+ 0, -+ (GInstanceInitFunc) xfdesktop_thumbnailer_init, -+ NULL -+ }; -+ -+ xfdesktop_thumbnailer_type = g_type_register_static( -+ G_TYPE_OBJECT, -+ "XfdesktopThumbnailer", -+ &xfdesktop_thumbnailer_info, -+ 0); -+ } -+ return xfdesktop_thumbnailer_type; -+} -+ -+struct _XfdesktopThumbnailerPriv -+{ -+ DBusGProxy *proxy; -+ -+ GSList *queue; -+ gchar **supported_mimetypes; -+ gint handle; -+ -+ gint request_timer_id; -+}; -+ -+static void -+xfdesktop_thumbnailer_init(GObject *object) -+{ -+ XfdesktopThumbnailer *thumbnailer; -+ DBusGConnection *connection; -+ -+ thumbnailer = XFDESKTOP_THUMBNAILER(object); -+ -+ thumbnailer->priv = g_new0(XfdesktopThumbnailerPriv, 1); -+ -+ connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); -+ -+ if(connection) { -+ thumbnailer->priv->proxy = dbus_g_proxy_new_for_name( -+ connection, -+ "org.freedesktop.thumbnails.Thumbnailer1", -+ "/org/freedesktop/thumbnails/Thumbnailer1", -+ "org.freedesktop.thumbnails.Thumbnailer1"); -+ -+ if(thumbnailer->priv->proxy) { -+ gchar **supported_uris; -+ -+ dbus_g_object_register_marshaller( -+ (GClosureMarshal) xfdesktop_marshal_VOID__UINT_BOXED, -+ G_TYPE_NONE, G_TYPE_UINT, -+ G_TYPE_STRV, G_TYPE_INVALID); -+ -+ dbus_g_proxy_add_signal( -+ thumbnailer->priv->proxy, -+ "Finished", G_TYPE_UINT, G_TYPE_INVALID); -+ dbus_g_proxy_add_signal( -+ thumbnailer->priv->proxy, -+ "Ready", G_TYPE_UINT, G_TYPE_STRV, G_TYPE_INVALID); -+ -+ dbus_g_proxy_connect_signal( -+ thumbnailer->priv->proxy, -+ "Finished", G_CALLBACK (xfdesktop_thumbnailer_request_finished_dbus), -+ thumbnailer, NULL); -+ dbus_g_proxy_connect_signal( -+ thumbnailer->priv->proxy, -+ "Ready", G_CALLBACK(xfdesktop_thumbnailer_thumbnail_ready_dbus), -+ thumbnailer, NULL); -+ -+ dbus_g_proxy_call(thumbnailer->priv->proxy, "GetSupported", NULL, G_TYPE_INVALID, -+ G_TYPE_STRV, &supported_uris, -+ G_TYPE_STRV, &thumbnailer->priv->supported_mimetypes, -+ G_TYPE_INVALID); -+ } -+ -+ dbus_g_connection_unref(connection); -+ } -+} -+ -+static void -+xfdesktop_thumbnailer_class_init (GObjectClass *object_class) -+{ -+ XfdesktopThumbnailerClass *thumbnailer_class = XFDESKTOP_THUMBNAILER_CLASS(object_class); -+ -+ parent_class = g_type_class_peek_parent(thumbnailer_class); -+ -+ object_class->dispose = xfdesktop_thumbnailer_dispose; -+ object_class->finalize = xfdesktop_thumbnailer_finalize; -+ -+ thumbnailer_signals[THUMBNAIL_READY] = g_signal_new ( -+ "thumbnail-ready", -+ G_OBJECT_CLASS_TYPE (object_class), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(XfdesktopThumbnailerClass, thumbnail_ready), -+ NULL, NULL, -+ xfdesktop_marshal_VOID__STRING_STRING, -+ G_TYPE_NONE, 2, -+ G_TYPE_STRING, G_TYPE_STRING); -+} -+ -+/** -+ * xfdesktop_thumbnailer_dispose: -+ * @object: -+ * -+ */ -+static void -+xfdesktop_thumbnailer_dispose(GObject *object) -+{ -+ XfdesktopThumbnailer *thumbnailer = XFDESKTOP_THUMBNAILER(object); -+ -+ if(thumbnailer->priv->proxy) -+ g_object_unref(thumbnailer->priv->proxy); -+ -+ if(thumbnailer->priv->supported_mimetypes) -+ g_free(thumbnailer->priv->supported_mimetypes); -+ -+ if(thumbnailer->priv) { -+ g_free(thumbnailer->priv); -+ thumbnailer->priv = NULL; -+ } -+ -+ thumbnailer_object = NULL; -+} -+ -+/** -+ * xfdesktop_thumbnailer_finalize: -+ * @object: -+ * -+ */ -+static void -+xfdesktop_thumbnailer_finalize(GObject *object) -+{ -+} -+ -+/** -+ * xfdesktop_thumbnailer_new: -+ * -+ * -+ * Singleton -+ */ -+XfdesktopThumbnailer * -+xfdesktop_thumbnailer_new(void) -+{ -+ if(thumbnailer_object == NULL) { -+ thumbnailer_object = g_object_new(XFDESKTOP_TYPE_THUMBNAILER, NULL); -+ } else { -+ g_object_ref(thumbnailer_object); -+ } -+ -+ return thumbnailer_object; -+} -+ -+static gchar * -+xfdesktop_get_file_mimetype(gchar *file) -+{ -+ GFile *temp_file; -+ GFileInfo *file_info; -+ gchar *mime_type = NULL; -+ -+ g_return_val_if_fail(file != NULL, NULL); -+ -+ temp_file = g_file_new_for_path(file); -+ -+ g_return_val_if_fail(temp_file != NULL, NULL); -+ -+ file_info = g_file_query_info(temp_file, -+ "standard::content-type", -+ 0, -+ NULL, -+ NULL); -+ -+ if(file_info != NULL) { -+ mime_type = g_strdup(g_file_info_get_content_type(file_info)); -+ -+ g_object_unref(file_info); -+ } -+ -+ g_object_unref(temp_file); -+ -+ return mime_type; -+} -+ -+gboolean -+xfdesktop_thumbnailer_is_supported(XfdesktopThumbnailer *thumbnailer, -+ gchar *file) -+{ -+ guint n; -+ gchar *mime_type = NULL; -+ -+ g_return_val_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer), FALSE); -+ g_return_val_if_fail(file != NULL, FALSE); -+ -+ mime_type = xfdesktop_get_file_mimetype(file); -+ -+ if(mime_type == NULL) { -+ g_warning("File has no mime type"); -+ return FALSE; -+ } -+ -+ if(thumbnailer->priv->supported_mimetypes != NULL) { -+ for(n = 0; thumbnailer->priv->supported_mimetypes[n] != NULL; ++n) { -+ if(g_content_type_is_a (mime_type, thumbnailer->priv->supported_mimetypes[n])) { -+ g_free(mime_type); -+ return TRUE; -+ } -+ } -+ } -+ -+ g_free(mime_type); -+ return FALSE; -+} -+ -+/** -+ * xfdesktop_thumbnailer_queue_thumbnail: -+ * -+ * Queues a file for thumbnail creation. -+ * A "thumbnail-ready" signal will be emitted when the thumbnail is ready. -+ * The signal will pass 2 parameters: a gchar *file which will be file -+ * that's passed in here and a gchar *thumbnail_file which will be the -+ * location of the thumbnail. -+ */ -+gboolean -+xfdesktop_thumbnailer_queue_thumbnail(XfdesktopThumbnailer *thumbnailer, -+ gchar *file) -+{ -+ g_return_val_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer), FALSE); -+ g_return_val_if_fail(file != NULL, FALSE); -+ -+ if(!xfdesktop_thumbnailer_is_supported(thumbnailer, file)) { -+ /*g_debug("file: %s not supported", file);*/ -+ return FALSE; -+ } -+ if(thumbnailer->priv->request_timer_id) { -+ g_source_remove(thumbnailer->priv->request_timer_id); -+ -+ if(thumbnailer->priv->handle && thumbnailer->priv->proxy != NULL) { -+ if(dbus_g_proxy_call(thumbnailer->priv->proxy, -+ "Dequeue", -+ NULL, -+ G_TYPE_UINT, thumbnailer->priv->handle, -+ G_TYPE_INVALID) == FALSE) -+ { -+ g_warning("Dequeue of thumbnailer->priv->handle: %d failed", -+ thumbnailer->priv->handle); -+ } -+ -+ thumbnailer->priv->handle = 0; -+ } -+ } -+ -+ if(g_slist_find(thumbnailer->priv->queue, file) == NULL) { -+ thumbnailer->priv->queue = g_slist_prepend(thumbnailer->priv->queue, -+ file); -+ } -+ -+ thumbnailer->priv->request_timer_id = g_timeout_add_full( -+ G_PRIORITY_LOW, -+ 300, -+ (GSourceFunc)xfdesktop_thumbnailer_queue_request_timer, -+ thumbnailer, -+ NULL); -+ -+ return TRUE; -+} -+ -+/** -+ * xfdesktop_thumbnailer_dequeue_thumbnail: -+ * -+ * Removes a file from the list of pending thumbnail creations. -+ * This is not guaranteed to always remove the file, if processing -+ * of that thumbnail has started it won't stop. -+ */ -+void -+xfdesktop_thumbnailer_dequeue_thumbnail(XfdesktopThumbnailer *thumbnailer, -+ gchar *file) -+{ -+ g_return_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer)); -+ g_return_if_fail(file != NULL); -+ -+ if(thumbnailer->priv->request_timer_id) { -+ g_source_remove(thumbnailer->priv->request_timer_id); -+ -+ if(thumbnailer->priv->handle && thumbnailer->priv->proxy) { -+ if(dbus_g_proxy_call(thumbnailer->priv->proxy, -+ "Dequeue", -+ NULL, -+ G_TYPE_UINT, thumbnailer->priv->handle, -+ G_TYPE_INVALID) == FALSE) -+ { -+ g_warning("Dequeue of thumbnailer->priv->handle: %d failed", -+ thumbnailer->priv->handle); -+ } -+ } -+ thumbnailer->priv->handle = 0; -+ } -+ -+ if(g_slist_find(thumbnailer->priv->queue, file) != NULL) { -+ thumbnailer->priv->queue = g_slist_remove_all( -+ thumbnailer->priv->queue, -+ file); -+ } -+ -+ thumbnailer->priv->request_timer_id = g_timeout_add_full( -+ G_PRIORITY_LOW, -+ 300, -+ (GSourceFunc)xfdesktop_thumbnailer_queue_request_timer, -+ thumbnailer, -+ NULL); -+} -+ -+static gboolean -+xfdesktop_thumbnailer_queue_request_timer(XfdesktopThumbnailer *thumbnailer) -+{ -+ gchar **uris; -+ gchar **mimetypes; -+ GSList *iter; -+ gint i = 0; -+ GFile *file; -+ GError *error = NULL; -+ -+ g_return_val_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer), FALSE); -+ -+ uris = g_new0(gchar *, -+ g_slist_length(thumbnailer->priv->queue) + 1); -+ mimetypes = g_new0(gchar *, -+ g_slist_length (thumbnailer->priv->queue) + 1); -+ -+ iter = thumbnailer->priv->queue; -+ while(iter) { -+ if(iter->data) { -+ file = g_file_new_for_path(iter->data); -+ uris[i] = g_file_get_uri(file); -+ mimetypes[i] = xfdesktop_get_file_mimetype(iter->data); -+ g_object_unref(file); -+ } -+ iter = g_slist_next(iter); -+ i++; -+ } -+ -+ if(thumbnailer->priv->proxy != NULL) { -+ if(dbus_g_proxy_call(thumbnailer->priv->proxy, -+ "Queue", -+ &error, -+ G_TYPE_STRV, uris, -+ G_TYPE_STRV, mimetypes, -+ G_TYPE_STRING, "normal", -+ G_TYPE_STRING, "default", -+ G_TYPE_UINT, 0, -+ G_TYPE_INVALID, -+ G_TYPE_UINT, &thumbnailer->priv->handle, -+ G_TYPE_INVALID) == FALSE) -+ { -+ if(error != NULL) -+ g_warning("DBUS-call failed: %s", error->message); -+ } -+ } -+ -+ g_free(uris); -+ g_free(mimetypes); -+ -+ if(error) -+ g_error_free(error); -+ -+ thumbnailer->priv->request_timer_id = 0; -+ -+ return FALSE; -+} -+ -+static void -+xfdesktop_thumbnailer_request_finished_dbus(DBusGProxy *proxy, -+ gint handle, -+ gpointer data) -+{ -+ XfdesktopThumbnailer *thumbnailer = XFDESKTOP_THUMBNAILER(data); -+ -+ g_return_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer)); -+ -+ thumbnailer->priv->handle = 0; -+} -+ -+static void -+xfdesktop_thumbnailer_thumbnail_ready_dbus(DBusGProxy *proxy, -+ gint handle, -+ const gchar **uri, -+ gpointer data) -+{ -+ XfdesktopThumbnailer *thumbnailer = XFDESKTOP_THUMBNAILER(data); -+ gchar *thumbnail_location; -+ GFile *file; -+ GSList *iter = thumbnailer->priv->queue; -+ gchar *f_uri, *f_uri_checksum, *filename; -+ gint x = 0; -+ -+ g_return_if_fail(XFDESKTOP_IS_THUMBNAILER(thumbnailer)); -+ -+ while(iter) { -+ if((uri[x] == NULL) || (iter->data == NULL)) { -+ break; -+ } -+ -+ file = g_file_new_for_path(iter->data); -+ f_uri = g_file_get_uri(file); -+ -+ if(strcmp (uri[x], f_uri) == 0) { -+ /* The thumbnail is in the format/location -+ * /homedir/.thumbnails/normal/MD5_Hash_Of_URI.png -+ */ -+ f_uri_checksum = g_compute_checksum_for_string(G_CHECKSUM_MD5, -+ f_uri, strlen (f_uri)); -+ filename = g_strconcat(f_uri_checksum, ".png", NULL); -+ -+ thumbnail_location = g_build_path("/", g_get_home_dir(), -+ ".thumbnails", "normal", -+ filename, NULL); -+ -+ /*g_debug("thumbnail-ready src: %s thumbnail: %s", -+ (char*)iter->data, -+ thumbnail_location);*/ -+ -+ g_signal_emit(G_OBJECT(thumbnailer), -+ thumbnailer_signals[THUMBNAIL_READY], -+ 0, -+ iter->data, -+ thumbnail_location); -+ -+ thumbnailer->priv->queue = g_slist_remove(thumbnailer->priv->queue, -+ iter->data); -+ -+ iter = thumbnailer->priv->queue; -+ x++; -+ -+ g_free(filename); -+ g_free(f_uri_checksum); -+ } else { -+ iter = g_slist_next(iter); -+ } -+ -+ g_object_unref(file); -+ g_free(f_uri); -+ } -+} -+ -+/** -+ * xfdesktop_thumbnailer_delete_thumbnail: -+ * -+ * Tells the thumbnail service the src_file will be deleted. -+ * This function should be called when the file is deleted or moved so -+ * the thumbnail file doesn't take up space on the user's drive. -+ */ -+void -+xfdesktop_thumbnailer_delete_thumbnail(XfdesktopThumbnailer *thumbnailer, gchar *src_file) -+{ -+ DBusGConnection *connection; -+ gchar **uris; -+ GFile *file; -+ GError *error = NULL; -+ static DBusGProxy *cache = NULL; -+ -+ if(!cache) { -+ connection = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); -+ if (connection != NULL) { -+ cache = dbus_g_proxy_new_for_name(connection, -+ "org.freedesktop.thumbnails.Cache1", -+ "/org/freedesktop/thumbnails/Cache1", -+ "org.freedesktop.thumbnails.Cache1"); -+ -+ dbus_g_connection_unref(connection); -+ } -+ } -+ -+ file = g_file_new_for_path(src_file); -+ -+ if(cache) { -+ uris = g_new0 (gchar *, 2); -+ uris[0] = g_file_get_uri(file); -+ dbus_g_proxy_call(cache, "Delete", &error, G_TYPE_STRV, uris, G_TYPE_INVALID, G_TYPE_INVALID); -+ if(error != NULL) { -+ g_warning("DBUS-call failed:%s", error->message); -+ } -+ g_free(uris); -+ } -+ -+ g_object_unref(file); -+ if(error) -+ g_error_free(error); -+} ---- /dev/null -+++ xfdesktop4-4.8.3/common/xfdesktop-thumbnailer.h -@@ -0,0 +1,76 @@ -+/* -+ * xfdesktop - xfce4's desktop manager -+ * -+ * Copyright(c) 2006 Brian Tarricone, -+ * Copyright(c) 2006 Benedikt Meurer, -+ * Copyright(c) 2010-2011 Jannis Pohlmann, -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU Library General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ * xfdesktop-thumbnailer is based on thumbnailer code from Ristretto -+ * Copyright (c) Stephan Arts 2009-2011 -+ */ -+ -+#ifndef __XFDESKTOP_THUMBNAILER_H__ -+#define __XFDESKTOP_THUMBNAILER_H__ -+ -+#include -+ -+G_BEGIN_DECLS -+ -+#define XFDESKTOP_TYPE_THUMBNAILER (xfdesktop_thumbnailer_get_type()) -+#define XFDESKTOP_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), XFDESKTOP_TYPE_THUMBNAILER, XfdesktopThumbnailer)) -+#define XFDESKTOP_IS_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDESKTOP_TYPE_THUMBNAILER)) -+#define XFDESKTOP_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFDESKTOP_TYPE_THUMBNAILER, XfdesktopThumbnailerClass)) -+#define XFDESKTOP_IS_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFDESKTOP_TYPE_THUMBNAILER())) -+ -+typedef struct _XfdesktopThumbnailer XfdesktopThumbnailer; -+typedef struct _XfdesktopThumbnailerPriv XfdesktopThumbnailerPriv; -+ -+struct _XfdesktopThumbnailer -+{ -+ GObject parent; -+ -+ XfdesktopThumbnailerPriv *priv; -+}; -+ -+typedef struct _XfdesktopThumbnailerClass XfdesktopThumbnailerClass; -+ -+struct _XfdesktopThumbnailerClass -+{ -+ GObjectClass parent_class; -+ -+ /*< signals >*/ -+ void (*thumbnail_ready)(gchar *src_file, gchar *thumb_file); -+}; -+ -+XfdesktopThumbnailer * xfdesktop_thumbnailer_new(void); -+ -+GType xfdesktop_thumbnailer_get_type(void); -+ -+gboolean xfdesktop_thumbnailer_is_supported(XfdesktopThumbnailer *thumbnailer, -+ gchar *file); -+ -+gboolean xfdesktop_thumbnailer_queue_thumbnail(XfdesktopThumbnailer *thumbnailer, -+ gchar *file); -+void xfdesktop_thumbnailer_dequeue_thumbnail(XfdesktopThumbnailer *thumbnailer, -+ gchar *file); -+ -+void xfdesktop_thumbnailer_delete_thumbnail(XfdesktopThumbnailer *thumbnailer, -+ gchar *src_file); -+ -+G_END_DECLS -+ -+#endif /* __XFDESKTOP_THUMBNAILER_H__ */ ---- xfdesktop4-4.8.3.orig/settings/xfdesktop-settings-ui.glade -+++ xfdesktop4-4.8.3/settings/xfdesktop-settings-ui.glade -@@ -695,6 +695,17 @@ - - - -+ -+ True -+ True -+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK -+ _Show thumbnails -+ Select this option to display preview-able files on the desktop as automatically generated thumbnail icons. -+ True -+ True -+ -+ -+ - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK ---- xfdesktop4-4.8.3.orig/settings/main.c -+++ xfdesktop4-4.8.3/settings/main.c -@@ -71,6 +71,7 @@ - #define DESKTOP_ICONS_FONT_SIZE_PROP "/desktop-icons/font-size" - #define DESKTOP_ICONS_SINGLE_CLICK_PROP "/desktop-icons/single-click" - #define DESKTOP_ICONS_CUSTOM_FONT_SIZE_PROP "/desktop-icons/use-custom-font-size" -+#define DESKTOP_ICONS_SHOW_THUMBNAILS_PROP "/desktop-icons/show-thumbnails" - #define DESKTOP_ICONS_SHOW_HOME "/desktop-icons/file-icons/show-home" - #define DESKTOP_ICONS_SHOW_TRASH "/desktop-icons/file-icons/show-trash" - #define DESKTOP_ICONS_SHOW_FILESYSTEM "/desktop-icons/file-icons/show-filesystem" -@@ -1228,7 +1229,7 @@ xfdesktop_settings_dialog_new(GtkBuilder - gint i, j, nmonitors, nscreens; - GtkWidget *dialog, *appearance_container, *chk_custom_font_size, - *spin_font_size, *color_style_widget, *w, *box, -- *chk_single_click; -+ *chk_single_click, *chk_show_thumbnails; - - dialog = GTK_WIDGET(gtk_builder_get_object(main_gxml, "prefs_dialog")); - appearance_container = GTK_WIDGET(gtk_builder_get_object(main_gxml, -@@ -1245,6 +1246,9 @@ xfdesktop_settings_dialog_new(GtkBuilder - G_CALLBACK(cb_xfdesktop_chk_custom_font_size_toggled), - spin_font_size); - -+ chk_show_thumbnails = GTK_WIDGET(gtk_builder_get_object(main_gxml, -+ "chk_show_thumbnails")); -+ - nscreens = gdk_display_get_n_screens(gdk_display_get_default()); - - for(i = 0; i < nscreens; ++i) { -@@ -1496,6 +1500,9 @@ xfdesktop_settings_dialog_new(GtkBuilder - xfconf_g_property_bind(channel, DESKTOP_ICONS_SINGLE_CLICK_PROP, - G_TYPE_BOOLEAN, G_OBJECT(chk_single_click), - "active"); -+ xfconf_g_property_bind(channel, DESKTOP_ICONS_SHOW_THUMBNAILS_PROP, -+ G_TYPE_BOOLEAN, G_OBJECT(chk_show_thumbnails), -+ "active"); - - setup_special_icon_list(main_gxml, channel); - ---- xfdesktop4-4.8.3.orig/src/xfdesktop-icon.c -+++ xfdesktop4-4.8.3/src/xfdesktop-icon.c -@@ -37,7 +37,6 @@ struct _XfdesktopIconPrivate - gint16 row; - gint16 col; - -- gboolean extents_dirty; - GdkRectangle pixbuf_extents; - GdkRectangle text_extents; - GdkRectangle total_extents; -@@ -116,7 +115,6 @@ xfdesktop_icon_init(XfdesktopIcon *icon) - { - icon->priv = G_TYPE_INSTANCE_GET_PRIVATE(icon, XFDESKTOP_TYPE_ICON, - XfdesktopIconPrivate); -- icon->priv->extents_dirty = TRUE; - } - - -@@ -158,7 +156,6 @@ xfdesktop_icon_set_extents(XfdesktopIcon - icon->priv->pixbuf_extents = *pixbuf_extents; - icon->priv->text_extents = *text_extents; - icon->priv->total_extents = *total_extents; -- icon->priv->extents_dirty = FALSE; - } - - gboolean -@@ -169,9 +166,6 @@ xfdesktop_icon_get_extents(XfdesktopIcon - { - g_return_val_if_fail(XFDESKTOP_IS_ICON(icon), FALSE); - -- if(icon->priv->extents_dirty) -- return FALSE; -- - if(pixbuf_extents) - *pixbuf_extents = icon->priv->pixbuf_extents; - if(text_extents) -@@ -182,16 +176,6 @@ xfdesktop_icon_get_extents(XfdesktopIcon - return TRUE; - } - --void --xfdesktop_icon_mark_extents_dirty(XfdesktopIcon *icon) --{ -- g_return_if_fail(XFDESKTOP_IS_ICON(icon)); -- -- icon->priv->extents_dirty = TRUE; --} -- -- -- - /*< required >*/ - GdkPixbuf * - xfdesktop_icon_peek_pixbuf(XfdesktopIcon *icon, -@@ -283,6 +267,37 @@ xfdesktop_icon_peek_tooltip(XfdesktopIco - } - - /*< optional >*/ -+void xfdesktop_icon_delete_thumbnail(XfdesktopIcon *icon) -+{ -+ XfdesktopIconClass *klass; -+ -+ g_return_if_fail(XFDESKTOP_IS_ICON(icon)); -+ -+ klass = XFDESKTOP_ICON_GET_CLASS(icon); -+ -+ if(!klass->delete_thumbnail_file) -+ return; -+ -+ klass->delete_thumbnail_file(icon); -+} -+ -+/*< optional >*/ -+void -+xfdesktop_icon_set_thumbnail_file(XfdesktopIcon *icon, GFile *file) -+{ -+ XfdesktopIconClass *klass; -+ -+ g_return_if_fail(XFDESKTOP_IS_ICON(icon)); -+ -+ klass = XFDESKTOP_ICON_GET_CLASS(icon); -+ -+ if(!klass->set_thumbnail_file) -+ return; -+ -+ klass->set_thumbnail_file(icon, file); -+} -+ -+/*< optional >*/ - gboolean - xfdesktop_icon_populate_context_menu(XfdesktopIcon *icon, - GtkWidget *menu) -@@ -312,7 +327,6 @@ void - xfdesktop_icon_pixbuf_changed(XfdesktopIcon *icon) - { - g_return_if_fail(XFDESKTOP_IS_ICON(icon)); -- xfdesktop_icon_mark_extents_dirty(icon); - g_signal_emit(icon, __signals[SIG_PIXBUF_CHANGED], 0); - } - -@@ -320,7 +334,6 @@ void - xfdesktop_icon_label_changed(XfdesktopIcon *icon) - { - g_return_if_fail(XFDESKTOP_IS_ICON(icon)); -- xfdesktop_icon_mark_extents_dirty(icon); - g_signal_emit(icon, __signals[SIG_LABEL_CHANGED], 0); - } - -@@ -328,7 +341,6 @@ void - xfdesktop_icon_position_changed(XfdesktopIcon *icon) - { - g_return_if_fail(XFDESKTOP_IS_ICON(icon)); -- xfdesktop_icon_mark_extents_dirty(icon); - g_signal_emit(icon, __signals[SIG_POS_CHANGED], 0); - } - -@@ -337,7 +349,6 @@ void - xfdesktop_icon_selected(XfdesktopIcon *icon) - { - g_return_if_fail(XFDESKTOP_IS_ICON(icon)); -- xfdesktop_icon_mark_extents_dirty(icon); - g_signal_emit(G_OBJECT(icon), __signals[SIG_SELECTED], 0, NULL); - } - ---- xfdesktop4-4.8.3.orig/src/xfdesktop-file-icon-manager.h -+++ xfdesktop4-4.8.3/src/xfdesktop-file-icon-manager.h -@@ -64,6 +64,10 @@ void xfdesktop_file_icon_manager_set_sho - gboolean show_special_file); - gboolean xfdesktop_file_icon_manager_get_show_special_file(XfdesktopFileIconManager *manager, - XfdesktopSpecialFileIconType type); -+void xfdesktop_file_icon_manager_set_show_thumbnails(XfdesktopFileIconManager *manager, -+ gboolean show_thumbnails); -+gboolean xfdesktop_file_icon_manager_get_show_thumbnails(XfdesktopFileIconManager *manager); -+ - - G_END_DECLS - ---- xfdesktop4-4.8.3.orig/src/Makefile.am -+++ xfdesktop4-4.8.3/src/Makefile.am -@@ -4,9 +4,7 @@ bin_PROGRAMS = xfdesktop - - xfdesktop_built_sources = \ - xfce-desktop-enum-types.c \ -- xfce-desktop-enum-types.h \ -- xfdesktop-marshal.c \ -- xfdesktop-marshal.h -+ xfce-desktop-enum-types.h - - if HAVE_LIBNOTIFY - xfdesktop_notify_sources = \ -@@ -149,17 +147,8 @@ BUILT_SOURCES = \ - - DISTCLEANFILES = \ - $(xfdesktop_built_sources) \ -- stamp-xfdesktop-marshal.h \ - stamp-xfce-desktop-enum-types.h - --xfdesktop-marshal.h: stamp-xfdesktop-marshal.h -- @true --stamp-xfdesktop-marshal.h: xfdesktop-marshal.list Makefile -- $(AM_V_GEN) glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --header > xfdesktop-marshal.h && \ -- echo timestamp > $(@F) --xfdesktop-marshal.c: xfdesktop-marshal.list Makefile -- $(AM_V_GEN) echo '#include "xfdesktop-marshal.h"' > xfdesktop-marshal.c && \ -- glib-genmarshal --prefix=xfdesktop_marshal xfdesktop-marshal.list --body >> xfdesktop-marshal.c - - enum_headers = \ - xfce-backdrop.h \ -@@ -227,5 +216,4 @@ endif - EXTRA_DIST = \ - $(desktop_menu_sources) \ - $(desktop_icon_sources) \ -- $(desktop_file_icon_sources) \ -- xfdesktop-marshal.list -+ $(desktop_file_icon_sources) ---- xfdesktop4-4.8.3.orig/src/xfdesktop-icon.h -+++ xfdesktop4-4.8.3/src/xfdesktop-icon.h -@@ -73,6 +73,9 @@ struct _XfdesktopIconClass - - G_CONST_RETURN gchar *(*peek_tooltip)(XfdesktopIcon *icon); - -+ void (*set_thumbnail_file)(XfdesktopIcon *icon, GFile *file); -+ void (*delete_thumbnail_file)(XfdesktopIcon *icon); -+ - gboolean (*populate_context_menu)(XfdesktopIcon *icon, - GtkWidget *menu); - }; -@@ -105,6 +108,9 @@ gboolean xfdesktop_icon_populate_context - - GtkWidget *xfdesktop_icon_peek_icon_view(XfdesktopIcon *icon); - -+void xfdesktop_icon_set_thumbnail_file(XfdesktopIcon *icon, GFile *file); -+void xfdesktop_icon_delete_thumbnail(XfdesktopIcon *icon); -+ - /*< signal triggers >*/ - - void xfdesktop_icon_pixbuf_changed(XfdesktopIcon *icon); -@@ -123,7 +129,6 @@ gboolean xfdesktop_icon_get_extents(Xfde - GdkRectangle *pixbuf_extents, - GdkRectangle *text_extents, - GdkRectangle *total_extents); --void xfdesktop_icon_mark_extents_dirty(XfdesktopIcon *icon); - - G_END_DECLS - ---- xfdesktop4-4.8.3.orig/src/xfdesktop-regular-file-icon.c -+++ xfdesktop4-4.8.3/src/xfdesktop-regular-file-icon.c -@@ -68,11 +68,15 @@ struct _XfdesktopRegularFileIconPrivate - GFileInfo *file_info; - GFileInfo *filesystem_info; - GFile *file; -+ GFile *thumbnail_file; - GdkScreen *gscreen; - }; - - static void xfdesktop_regular_file_icon_finalize(GObject *obj); - -+static void xfdesktop_regular_file_icon_set_thumbnail_file(XfdesktopIcon *icon, GFile *file); -+static void xfdesktop_regular_file_icon_delete_thumbnail_file(XfdesktopIcon *icon); -+ - static GdkPixbuf *xfdesktop_regular_file_icon_peek_pixbuf(XfdesktopIcon *icon, - gint size); - static G_CONST_RETURN gchar *xfdesktop_regular_file_icon_peek_label(XfdesktopIcon *icon); -@@ -127,6 +131,8 @@ xfdesktop_regular_file_icon_class_init(X - icon_class->get_allowed_drag_actions = xfdesktop_regular_file_icon_get_allowed_drag_actions; - icon_class->get_allowed_drop_actions = xfdesktop_regular_file_icon_get_allowed_drop_actions; - icon_class->do_drop_dest = xfdesktop_regular_file_icon_do_drop_dest; -+ icon_class->set_thumbnail_file = xfdesktop_regular_file_icon_set_thumbnail_file; -+ icon_class->delete_thumbnail_file = xfdesktop_regular_file_icon_delete_thumbnail_file; - - file_icon_class->peek_file_info = xfdesktop_regular_file_icon_peek_file_info; - file_icon_class->peek_filesystem_info = xfdesktop_regular_file_icon_peek_filesystem_info; -@@ -171,6 +177,9 @@ xfdesktop_regular_file_icon_finalize(GOb - - if(icon->priv->tooltip) - g_free(icon->priv->tooltip); -+ -+ if(icon->priv->thumbnail_file) -+ g_object_unref(icon->priv->thumbnail_file); - - G_OBJECT_CLASS(xfdesktop_regular_file_icon_parent_class)->finalize(obj); - } -@@ -201,6 +210,43 @@ xfdesktop_regular_file_icon_invalidate_p - } - } - -+static void -+xfdesktop_regular_file_icon_delete_thumbnail_file(XfdesktopIcon *icon) -+{ -+ XfdesktopRegularFileIcon *file_icon; -+ -+ if(!XFDESKTOP_IS_REGULAR_FILE_ICON(icon)) -+ return; -+ -+ file_icon = XFDESKTOP_REGULAR_FILE_ICON(icon); -+ -+ if(file_icon->priv->thumbnail_file) { -+ g_object_unref(file_icon->priv->thumbnail_file); -+ file_icon->priv->thumbnail_file = NULL; -+ } -+ -+ xfdesktop_regular_file_icon_invalidate_pixbuf(file_icon); -+ xfdesktop_icon_pixbuf_changed(XFDESKTOP_ICON(icon)); -+} -+ -+static void -+xfdesktop_regular_file_icon_set_thumbnail_file(XfdesktopIcon *icon, GFile *file) -+{ -+ XfdesktopRegularFileIcon *file_icon; -+ -+ if(!XFDESKTOP_IS_REGULAR_FILE_ICON(icon)) -+ return; -+ -+ file_icon = XFDESKTOP_REGULAR_FILE_ICON(icon); -+ -+ if(file_icon->priv->thumbnail_file) -+ g_object_unref(file_icon->priv->thumbnail_file); -+ -+ file_icon->priv->thumbnail_file = file; -+ -+ xfdesktop_regular_file_icon_invalidate_pixbuf(file_icon); -+ xfdesktop_icon_pixbuf_changed(XFDESKTOP_ICON(icon)); -+} - - static GdkPixbuf * - xfdesktop_regular_file_icon_peek_pixbuf(XfdesktopIcon *icon, -@@ -224,6 +270,10 @@ xfdesktop_regular_file_icon_peek_pixbuf( - if(g_file_has_prefix(file_icon->priv->file, thumbnail_dir)) { - /* use the filename as custom icon name for thumbnails */ - icon_name = g_file_get_path(file_icon->priv->file); -+ -+ /* release thumbnail path */ -+ g_object_unref(thumbnail_dir); -+ g_free(thumbnail_dir_path); - } else if(xfdesktop_file_utils_is_desktop_file(file_icon->priv->file_info)) { - gchar *contents; - gsize length; -@@ -248,12 +298,16 @@ xfdesktop_regular_file_icon_peek_pixbuf( - g_key_file_free(key_file); - g_free(contents); - } -+ } else { -+ /* If we have a thumbnail then they are enabled, use it. */ -+ if(file_icon->priv->thumbnail_file) -+ { -+ file_icon->priv->pix = gdk_pixbuf_new_from_file_at_scale(g_file_get_path(file_icon->priv->thumbnail_file), -+ size, size, -+ TRUE, NULL); -+ } - } - -- /* release thumbnail path */ -- g_object_unref(thumbnail_dir); -- g_free(thumbnail_dir_path); -- - /* load the symlink emblem if necessary */ - if(g_file_info_get_attribute_boolean(file_icon->priv->file_info, - G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK)) -@@ -280,10 +334,24 @@ xfdesktop_regular_file_icon_peek_pixbuf( - - if(file_icon->priv->file_info) - gicon = g_file_info_get_icon(file_icon->priv->file_info); -- -- file_icon->priv->pix = xfdesktop_file_utils_get_icon(icon_name, gicon, -- size, emblem_pix, -- file_icon->priv->pix_opacity); -+ -+ if(file_icon->priv->pix) { -+ if(emblem_pix) { -+ gint emblem_pix_size = gdk_pixbuf_get_width(emblem_pix); -+ gint dest_size = size - emblem_pix_size; -+ -+ /* We have to add the emblem */ -+ gdk_pixbuf_composite(emblem_pix, file_icon->priv->pix, -+ dest_size, dest_size, -+ emblem_pix_size, emblem_pix_size, -+ dest_size, dest_size, -+ 1.0, 1.0, GDK_INTERP_BILINEAR, 255); -+ } -+ } else { -+ file_icon->priv->pix = xfdesktop_file_utils_get_icon(icon_name, gicon, -+ size, emblem_pix, -+ file_icon->priv->pix_opacity); -+ } - - file_icon->priv->cur_pix_size = size; - ---- xfdesktop4-4.8.3.orig/src/xfdesktop-file-icon-manager.c -+++ xfdesktop4-4.8.3/src/xfdesktop-file-icon-manager.c -@@ -71,6 +71,7 @@ - #include "xfdesktop-special-file-icon.h" - #include "xfdesktop-trash-proxy.h" - #include "xfdesktop-volume-icon.h" -+#include "xfdesktop-thumbnailer.h" - - #include - #include -@@ -82,6 +83,7 @@ - #define SETTING_SHOW_HOME "/desktop-icons/file-icons/show-home" - #define SETTING_SHOW_TRASH "/desktop-icons/file-icons/show-trash" - #define SETTING_SHOW_REMOVABLE "/desktop-icons/file-icons/show-removable" -+#define SETTING_SHOW_THUMBNAILS "/desktop-icons/show-thumbnails" - - enum - { -@@ -91,6 +93,7 @@ enum - PROP_SHOW_HOME, - PROP_SHOW_TRASH, - PROP_SHOW_REMOVABLE, -+ PROP_SHOW_THUMBNAILS - }; - - struct _XfdesktopFileIconManagerPrivate -@@ -117,6 +120,7 @@ struct _XfdesktopFileIconManagerPrivate - - gboolean show_removable_media; - gboolean show_special[XFDESKTOP_SPECIAL_FILE_ICON_TRASH+1]; -+ gboolean show_thumbnails; - - guint save_icons_id; - -@@ -129,6 +133,8 @@ struct _XfdesktopFileIconManagerPrivate - GList *thunarx_menu_providers; - GList *thunarx_properties_providers; - #endif -+ -+ XfdesktopThumbnailer *thumbnailer; - }; - - static void xfdesktop_file_icon_manager_set_property(GObject *object, -@@ -175,6 +181,10 @@ static void xfdesktop_file_icon_manager_ - static void xfdesktop_file_icon_position_changed(XfdesktopFileIcon *icon, - gpointer user_data); - -+static void xfdesktop_file_icon_manager_update_image(GtkWidget *widget, -+ gchar *srcfile, -+ gchar *thumbfile, -+ XfdesktopFileIconManager *fmanager); - - G_DEFINE_TYPE_EXTENDED(XfdesktopFileIconManager, - xfdesktop_file_icon_manager, -@@ -264,6 +274,12 @@ xfdesktop_file_icon_manager_class_init(X - "show removable", - TRUE, - XFDESKTOP_PARAM_FLAGS)); -+ g_object_class_install_property(gobject_class, PROP_SHOW_THUMBNAILS, -+ g_param_spec_boolean("show-thumbnails", -+ "show-thumbnails", -+ "show-thumbnails", -+ FALSE, -+ XFDESKTOP_PARAM_FLAGS)); - #undef XFDESKTOP_PARAM_FLAGS - - xfdesktop_app_info_quark = g_quark_from_static_string("xfdesktop-app-info-quark"); -@@ -282,6 +298,10 @@ xfdesktop_file_icon_manager_init(Xfdeskt - n_drag_targets); - fmanager->priv->drop_targets = gtk_target_list_new(drop_targets, - n_drop_targets); -+ -+ fmanager->priv->thumbnailer = xfdesktop_thumbnailer_new(); -+ -+ g_signal_connect(G_OBJECT(fmanager->priv->thumbnailer), "thumbnail-ready", G_CALLBACK(xfdesktop_file_icon_manager_update_image), fmanager); - } - - static void -@@ -321,6 +341,11 @@ xfdesktop_file_icon_manager_set_property - g_value_get_boolean(value)); - break; - -+ case PROP_SHOW_THUMBNAILS: -+ xfdesktop_file_icon_manager_set_show_thumbnails(fmanager, -+ g_value_get_boolean(value)); -+ break; -+ - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); - } -@@ -357,6 +382,10 @@ xfdesktop_file_icon_manager_get_property - case PROP_SHOW_REMOVABLE: - g_value_set_boolean(value, fmanager->priv->show_removable_media); - break; -+ -+ case PROP_SHOW_THUMBNAILS: -+ g_value_set_boolean(value, fmanager->priv->show_thumbnails); -+ break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); -@@ -377,6 +406,7 @@ xfdesktop_file_icon_manager_finalize(GOb - gtk_target_list_unref(fmanager->priv->drop_targets); - - g_object_unref(fmanager->priv->folder); -+ g_object_unref(fmanager->priv->thumbnailer); - - G_OBJECT_CLASS(xfdesktop_file_icon_manager_parent_class)->finalize(obj); - } -@@ -1842,6 +1872,15 @@ xfdesktop_file_icon_manager_add_icon(Xfd - gint16 row = -1, col = -1; - gboolean do_add = FALSE; - const gchar *name; -+ GFile *file; -+ -+ file = xfdesktop_file_icon_peek_file(icon); -+ -+ if(fmanager->priv->show_thumbnails && g_file_get_path(file) != NULL) { -+ xfdesktop_thumbnailer_queue_thumbnail(fmanager->priv->thumbnailer, -+ g_file_get_path(file)); -+ } -+ - - name = xfdesktop_icon_peek_label(XFDESKTOP_ICON(icon)); - if(xfdesktop_file_icon_manager_get_cached_icon_position(fmanager, name, -@@ -1852,7 +1891,6 @@ xfdesktop_file_icon_manager_add_icon(Xfd - do_add = TRUE; - } else { - if(defer_if_missing) { -- GFile *file = xfdesktop_file_icon_peek_file(icon); - fmanager->priv->deferred_icons = g_list_prepend(fmanager->priv->deferred_icons, - g_object_ref(file)); - } else -@@ -2220,6 +2258,13 @@ xfdesktop_file_icon_manager_file_changed - - icon = g_hash_table_lookup(fmanager->priv->icons, file); - if(icon) { -+ /* Always try to remove thumbnail so it doesn't take up -+ * space on the user's disk. -+ */ -+ xfdesktop_thumbnailer_delete_thumbnail(fmanager->priv->thumbnailer, -+ g_file_get_path(file)); -+ xfdesktop_icon_delete_thumbnail(XFDESKTOP_ICON(icon)); -+ - xfdesktop_icon_view_remove_item(fmanager->priv->icon_view, - XFDESKTOP_ICON(icon)); - g_hash_table_remove(fmanager->priv->icons, file); -@@ -3021,6 +3066,8 @@ xfdesktop_file_icon_manager_new(GFile *f - G_OBJECT(fmanager), "show-trash"); - xfconf_g_property_bind(channel, SETTING_SHOW_REMOVABLE, G_TYPE_BOOLEAN, - G_OBJECT(fmanager), "show-removable"); -+ xfconf_g_property_bind(channel, SETTING_SHOW_THUMBNAILS, G_TYPE_BOOLEAN, -+ G_OBJECT(fmanager), "show-thumbnails"); - - return XFDESKTOP_ICON_VIEW_MANAGER(fmanager); - } -@@ -3052,6 +3099,64 @@ xfdesktop_file_icon_manager_get_show_rem - return manager->priv->show_removable_media; - } - -+static void -+xfdesktop_file_icon_manager_requeue_thumbnails(gpointer key, -+ gpointer value, -+ gpointer data) -+{ -+ GFile *file = key; -+ XfdesktopFileIconManager *fmanager = XFDESKTOP_FILE_ICON_MANAGER(data); -+ -+ xfdesktop_thumbnailer_queue_thumbnail(fmanager->priv->thumbnailer, -+ g_file_get_path(file)); -+} -+ -+static void -+xfdesktop_file_icon_manager_remove_thumbnails(gpointer key, -+ gpointer value, -+ gpointer data) -+{ -+ XfdesktopRegularFileIcon *icon = XFDESKTOP_REGULAR_FILE_ICON(value); -+ -+ xfdesktop_icon_delete_thumbnail(XFDESKTOP_ICON(icon)); -+} -+ -+void -+xfdesktop_file_icon_manager_set_show_thumbnails(XfdesktopFileIconManager *manager, -+ gboolean show_thumbnails) -+{ -+ g_return_if_fail(XFDESKTOP_IS_FILE_ICON_MANAGER(manager)); -+ -+ if(show_thumbnails == manager->priv->show_thumbnails) -+ return; -+ -+ manager->priv->show_thumbnails = show_thumbnails; -+ -+ if(!manager->priv->inited) -+ return; -+ -+ if(show_thumbnails) { -+ /* We have to request to create the thumbnails everytime. */ -+ g_hash_table_foreach(manager->priv->icons, -+ xfdesktop_file_icon_manager_requeue_thumbnails, -+ manager); -+ } else { -+ /* We have to remove the thumbnails because the regular file -+ * icons can't easily check if thumbnails are allowed. -+ */ -+ g_hash_table_foreach(manager->priv->icons, -+ xfdesktop_file_icon_manager_remove_thumbnails, -+ manager); -+ } -+} -+ -+gboolean -+xfdesktop_file_icon_manager_get_show_thumbnails(XfdesktopFileIconManager *manager) -+{ -+ g_return_val_if_fail(XFDESKTOP_IS_FILE_ICON_MANAGER(manager), FALSE); -+ return manager->priv->show_thumbnails; -+} -+ - void - xfdesktop_file_icon_manager_set_show_special_file(XfdesktopFileIconManager *manager, - XfdesktopSpecialFileIconType type, -@@ -3093,3 +3198,26 @@ xfdesktop_file_icon_manager_get_show_spe - - return manager->priv->show_special[type]; - } -+ -+static void -+xfdesktop_file_icon_manager_update_image(GtkWidget *widget, -+ gchar *srcfile, -+ gchar *thumbfile, -+ XfdesktopFileIconManager *manager) -+{ -+ GFile *file; -+ XfdesktopIcon *icon; -+ -+ g_return_if_fail(srcfile && thumbfile); -+ g_return_if_fail(XFDESKTOP_FILE_ICON_MANAGER(manager)); -+ -+ file = g_file_new_for_path(srcfile); -+ -+ icon = g_hash_table_lookup(manager->priv->icons, file); -+ if(icon) -+ { -+ g_object_unref(file); -+ file = g_file_new_for_path(thumbfile); -+ xfdesktop_icon_set_thumbnail_file(icon, file); -+ } -+} ---- xfdesktop4-4.8.3.orig/src/xfdesktop-icon-view.c -+++ xfdesktop4-4.8.3/src/xfdesktop-icon-view.c -@@ -1046,7 +1046,7 @@ xfdesktop_icon_view_show_tooltip(GtkWidg - tip_text = xfdesktop_icon_peek_tooltip(icon_view->priv->item_under_pointer); - if(!tip_text) - return FALSE; -- -+ - gtk_tooltip_set_text(tooltip, tip_text); - - return TRUE; -@@ -1520,7 +1520,6 @@ xfdesktop_icon_view_drag_drop(GtkWidget - - /* clear out old extents, if any */ - /* FIXME: is this right? */ -- //xfdesktop_icon_mark_extents_dirty(icon); - xfdesktop_icon_view_invalidate_icon(icon_view, icon, TRUE); - - /* Now that we have moved the icon the user selected, -@@ -2792,29 +2791,17 @@ xfdesktop_icon_view_paint_icon(Xfdesktop - - playout = icon_view->priv->playout; - -- if(xfdesktop_icon_get_extents(icon, &pixbuf_extents, -- &text_extents, &total_extents)) -+ xfdesktop_icon_get_extents(icon, &pixbuf_extents, -+ &text_extents, &total_extents); -+ xfdesktop_icon_view_setup_pango_layout(icon_view, icon, playout); -+ -+ if(!xfdesktop_icon_view_update_icon_extents(icon_view, icon, -+ &pixbuf_extents, -+ &text_extents, -+ &total_extents)) - { -- xfdesktop_icon_view_setup_pango_layout(icon_view, icon, playout); -- } else { -- /* if we get here, it's likely that the expose area doesn't -- * include everything we *actually* need to repaint. the -- * extents should be recalculated before invalidating rects -- * in the first place. for now just fix it up and re-expose -- * the correct area. */ -- if(!xfdesktop_icon_view_update_icon_extents(icon_view, icon, -- &pixbuf_extents, -- &text_extents, -- &total_extents)) -- { -- g_warning("Can't update extents for icon '%s'", -- xfdesktop_icon_peek_label(icon)); -- } else { -- gtk_widget_queue_draw_area(GTK_WIDGET(icon_view), -- total_extents.x, total_extents.y, -- total_extents.width, total_extents.height); -- } -- return; -+ g_warning("Can't update extents for icon '%s'", -+ xfdesktop_icon_peek_label(icon)); - } - - if(g_list_find(icon_view->priv->selected_icons, icon)) { -@@ -2954,7 +2941,6 @@ xfdesktop_grid_do_resize(XfdesktopIconVi - - /* move all icons into the pending_icons list */ - for(l = icon_view->priv->icons; l; l = l->next) { -- xfdesktop_icon_mark_extents_dirty(XFDESKTOP_ICON(l->data)); - g_signal_handlers_disconnect_by_func(G_OBJECT(l->data), - G_CALLBACK(xfdesktop_icon_view_icon_changed), - icon_view); -@@ -3374,7 +3360,6 @@ xfdesktop_icon_view_remove_item(Xfdeskto - - if(xfdesktop_icon_get_position(icon, &row, &col)) { - xfdesktop_icon_view_invalidate_icon(icon_view, icon, FALSE); -- xfdesktop_icon_mark_extents_dirty(icon); - xfdesktop_grid_set_position_free(icon_view, row, col); - } - icon_view->priv->icons = g_list_delete_link(icon_view->priv->icons, l); -@@ -3422,7 +3407,6 @@ xfdesktop_icon_view_remove_all(Xfdesktop - if(xfdesktop_icon_get_position(icon, &row, &col)) { - xfdesktop_icon_view_invalidate_icon(icon_view, icon, FALSE); - xfdesktop_grid_set_position_free(icon_view, row, col); -- xfdesktop_icon_mark_extents_dirty(icon); - } - - g_signal_handlers_disconnect_by_func(G_OBJECT(l->data), diff -Nru xfdesktop4-4.8.3/debian/xfdesktop4.lintian-overrides xfdesktop4-4.8.3/debian/xfdesktop4.lintian-overrides --- xfdesktop4-4.8.3/debian/xfdesktop4.lintian-overrides 2009-02-27 01:13:49.000000000 +0000 +++ xfdesktop4-4.8.3/debian/xfdesktop4.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# Those are part of a common Xfce desktop -xfdesktop4: desktop-command-not-in-package /usr/share/applications/xfce4-about-xfce.desktop xfce4-about -xfdesktop4: desktop-command-not-in-package /usr/share/applications/xfce4-file-manager.desktop Thunar -xfdesktop4: desktop-command-not-in-package /usr/share/applications/xfce4-help.desktop xfhelp4 -xfdesktop4: desktop-command-not-in-package /usr/share/applications/xfce4-logout.desktop xfce4-session-logout -xfdesktop4: desktop-command-not-in-package /usr/share/applications/xfce4-run-program.desktop xfrun4 -xfdesktop4: desktop-command-not-in-package /usr/share/applications/xfce4-term.desktop exo-open -xfdesktop4: desktop-command-not-in-package /usr/share/applications/xfce4-web-browser.desktop exo-open -# Those are private but are still places in /usr/share/applications for the -# moment -xfdesktop4: desktop-entry-lacks-main-category /usr/share/applications/xfce4-about-xfce.desktop -xfdesktop4: desktop-entry-lacks-main-category /usr/share/applications/xfce4-file-manager.desktop -xfdesktop4: desktop-entry-lacks-main-category /usr/share/applications/xfce4-help.desktop -xfdesktop4: desktop-entry-lacks-main-category /usr/share/applications/xfce4-logout.desktop -xfdesktop4: desktop-entry-lacks-main-category /usr/share/applications/xfce4-run-program.desktop -xfdesktop4: desktop-entry-lacks-main-category /usr/share/applications/xfce4-term.desktop -xfdesktop4: desktop-entry-lacks-main-category /usr/share/applications/xfce4-web-browser.desktop