FreeBSD Bugzilla – Attachment 226471 Details for
Bug 257192
x11-fm/thunar: Add signals for trash shortcut view (trash icon in side pane)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix signals for trash shortcut view
thunar.diff (text/plain), 4.57 KB, created by
Olivier Duchateau
on 2021-07-14 19:25:14 UTC
(
hide
)
Description:
Fix signals for trash shortcut view
Filename:
MIME Type:
Creator:
Olivier Duchateau
Created:
2021-07-14 19:25:14 UTC
Size:
4.57 KB
patch
obsolete
>diff --git a/x11-fm/thunar/Makefile b/x11-fm/thunar/Makefile >index 911459eaf..0815aec39 100644 >--- a/x11-fm/thunar/Makefile >+++ b/x11-fm/thunar/Makefile >@@ -2,6 +2,7 @@ > > PORTNAME= thunar > DISTVERSION= 4.16.8 >+PORTREVISION= 1 > CATEGORIES= x11-fm xfce > MASTER_SITES= XFCE > DIST_SUBDIR= xfce4 >@@ -70,7 +71,8 @@ PLUG_UCA_CONFIGURE_ENABLE= uca-plugin > PLUG_WALL_CONFIGURE_ENABLE= wallpaper-plugin > > post-patch: >- @${REINPLACE_CMD} -e 's|mail-send|emblem-mail|' \ >+# 'org.xfce.mailreader' image is provided by sysutils/xfce4-settings >+ @${REINPLACE_CMD} -e 's|mail-send|org.xfce.mailreader|' \ > ${WRKSRC}/plugins/thunar-sendto-email/thunar-sendto-email.desktop.in.in > > post-install: >diff --git a/x11-fm/thunar/files/patch-thunar_thunar-shortcuts-model.c b/x11-fm/thunar/files/patch-thunar_thunar-shortcuts-model.c >new file mode 100644 >index 000000000..0a137c9bb >--- /dev/null >+++ b/x11-fm/thunar/files/patch-thunar_thunar-shortcuts-model.c >@@ -0,0 +1,97 @@ >+--- thunar/thunar-shortcuts-model.c.orig 2021-05-07 13:29:31 UTC >++++ thunar/thunar-shortcuts-model.c >+@@ -141,7 +141,10 @@ static void thunar_shortcuts_model_devic >+ static void thunar_shortcuts_model_device_changed (ThunarDeviceMonitor *device_monitor, >+ ThunarDevice *device, >+ ThunarShortcutsModel *model); >+- >++static void thunar_shortcuts_model_file_changed (ThunarFile *file, >++ ThunarShortcutsModel *model); >++static void thunar_shortcuts_model_file_destroy (ThunarFile *file, >++ ThunarShortcutsModel *model); >+ static void thunar_shortcut_free (ThunarShortcut *shortcut, >+ ThunarShortcutsModel *model); >+ >+@@ -1217,6 +1220,13 @@ thunar_shortcuts_model_add_shortcut_with_path (ThunarS >+ /* watch the trash for changes */ >+ if (thunar_g_file_is_trash (thunar_file_get_file (shortcut->file))) >+ thunar_file_watch (shortcut->file); >++ >++ g_signal_connect (G_OBJECT (shortcut->file), "changed", >++ G_CALLBACK (thunar_shortcuts_model_file_changed), >++ model); >++ g_signal_connect (G_OBJECT (shortcut->file), "destroy", >++ G_CALLBACK (thunar_shortcuts_model_file_destroy), >++ model); >+ } >+ >+ if (path == NULL) >+@@ -1640,6 +1650,68 @@ thunar_shortcuts_model_device_changed (ThunarDeviceMon >+ /* header visibility */ >+ if (update_header) >+ thunar_shortcuts_model_header_visibility (model); >++} >++ >++ >++ >++static void >++thunar_shortcuts_model_file_changed (ThunarFile *file, >++ ThunarShortcutsModel *model) >++{ >++ GtkTreeIter iter; >++ GList *lp; >++ gint idx; >++ GtkTreePath *path; >++ >++ _thunar_return_if_fail (THUNAR_IS_FILE (file)); >++ _thunar_return_if_fail (THUNAR_IS_SHORTCUTS_MODEL (model)); >++ >++ if (G_UNLIKELY (!thunar_file_is_directory (file))) >++ { >++ thunar_shortcuts_model_file_destroy (file, model); >++ return; >++ } >++ >++ /* find the shortcut */ >++ for (idx = 0, lp = model->shortcuts; lp != NULL; lp = lp->next, idx++) >++ { >++ if (THUNAR_SHORTCUT (lp->data)->file == file) >++ { >++ path = gtk_tree_path_new_from_indices (idx, -1); >++ gtk_tree_model_row_changed (GTK_TREE_MODEL (model), path, >++ &iter); >++ >++ gtk_tree_path_free (path); >++ break; >++ } >++ } >++} >++ >++ >++ >++static void >++thunar_shortcuts_model_file_destroy (ThunarFile *file, >++ ThunarShortcutsModel *model) >++{ >++ ThunarShortcut *shortcut = NULL; >++ GList *lp; >++ >++ _thunar_return_if_fail (THUNAR_IS_FILE (file)); >++ _thunar_return_if_fail (THUNAR_IS_SHORTCUTS_MODEL (model)); >++ >++ /* lookup the shortcut matching the file */ >++ for (lp = model->shortcuts; lp != NULL; lp = lp->next) >++ { >++ shortcut = THUNAR_SHORTCUT (lp->data); >++ if (shortcut->file == file) >++ break; >++ } >++ >++ /* verify that we actually found a shortcut */ >++ _thunar_assert (lp != NULL); >++ _thunar_assert (THUNAR_IS_FILE (shortcut->file)); >++ >++ thunar_shortcuts_model_remove_shortcut (model, shortcut); >+ } >+ >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 257192
: 226471