diff --git a/0001-Fix-the-file-can-be-rename-to-only-container-space-n.patch b/0001-Fix-the-file-can-be-rename-to-only-container-space-n.patch deleted file mode 100644 index 06bbc0f1b626588ccea6db723f5271b7520e765e..0000000000000000000000000000000000000000 --- a/0001-Fix-the-file-can-be-rename-to-only-container-space-n.patch +++ /dev/null @@ -1,52 +0,0 @@ -From b36d0047bc7012b387abf775d25078b4195b83e5 Mon Sep 17 00:00:00 2001 -From: wangxiaoqing -Date: Wed, 27 Jul 2022 17:49:59 +0800 -Subject: [PATCH 1/4] Fix the file can be rename to only container space name - file -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复重命名文件和文件夹时只输入空格,文件命名成了空文件名 - Related #I5I8KI - -Signed-off-by: wangxiaoqing ---- - libcaja-private/caja-icon-container.c | 4 +++- - src/file-manager/fm-list-view.c | 5 ++++- - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c -index 5de4ac3..9a2c3e8 100644 ---- a/libcaja-private/caja-icon-container.c -+++ b/libcaja-private/caja-icon-container.c -@@ -9132,7 +9132,9 @@ end_renaming_mode (CajaIconContainer *container, gboolean commit) - - /* Verify that text has been modified before signalling change. */ - changed_text = eel_editable_label_get_text (EEL_EDITABLE_LABEL (container->details->rename_widget)); -- if (strcmp (container->details->original_text, changed_text) != 0) -+ if (strlen (changed_text) > 0 && -+ strcmp (container->details->original_text, changed_text) != 0 && -+ strncmp (changed_text, " ", 1) != 0) - { - AtkObject *accessible_icon; - -diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c -index bfc29c2..6339a1c 100644 ---- a/src/file-manager/fm-list-view.c -+++ b/src/file-manager/fm-list-view.c -@@ -1402,7 +1402,10 @@ cell_renderer_edited (GtkCellRendererText *cell, - -1); - - /* Only rename if name actually changed */ -- if (strcmp (new_text, view->details->original_name) != 0) -+ if (strlen (new_text) > 0 && -+ strcmp (new_text, view->details->original_name) != 0 && -+ strncmp (new_text, " ", 1) != 0) -+ - { - view->details->renaming_file = caja_file_ref (file); - view->details->rename_done = FALSE; --- -2.36.1 - diff --git a/0001-Fix-the-file-rename-error-msg-too-long.patch b/0001-Fix-the-file-rename-error-msg-too-long.patch deleted file mode 100644 index 02b1b8962f23ea52dd02db6c16e902f38420e30e..0000000000000000000000000000000000000000 --- a/0001-Fix-the-file-rename-error-msg-too-long.patch +++ /dev/null @@ -1,59 +0,0 @@ -From a563dba2c4a920b8caae1a3cef9e87168327c9bf Mon Sep 17 00:00:00 2001 -From: wangxiaoqing -Date: Wed, 27 Jul 2022 17:33:08 +0800 -Subject: [PATCH 1/4] Fix the file rename error msg too long -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复文件重命名失败时,错误消息窗口太长的问题 - Related #I5I8IM - -Signed-off-by: wangxiaoqing ---- - po/caja.pot | 4 ++++ - po/zh_CN.po | 3 +++ - src/file-manager/fm-error-reporting.c | 4 ++++ - 3 files changed, 11 insertions(+) - -diff --git a/po/caja.pot b/po/caja.pot -index 2eb694e..33f556a 100644 ---- a/po/caja.pot -+++ b/po/caja.pot -@@ -7503,3 +7503,7 @@ msgstr "" - #: src/file-manager/fm-widget-view.c:447 - msgid "Display this location with the widget view." - msgstr "" -+ -+#: src/file-manager/fm-error-reporting.c:148 -+msgid "File name too long. Please use a different name." -+msgstr "" -diff --git a/po/zh_CN.po b/po/zh_CN.po -index cbaf91e..5a70ffe 100644 ---- a/po/zh_CN.po -+++ b/po/zh_CN.po -@@ -7607,3 +7607,6 @@ msgstr "用部件视图来展示该位置。" - - #~ msgid "network-workgroup" - #~ msgstr "network-workgroup" -+#: src/file-manager/fm-error-reporting.c:148 -+msgid "File name too long. Please use a different name." -+msgstr "文件名称太长。请使用另外的名字。" -diff --git a/src/file-manager/fm-error-reporting.c b/src/file-manager/fm-error-reporting.c -index 93cf77f..4a9b515 100644 ---- a/src/file-manager/fm-error-reporting.c -+++ b/src/file-manager/fm-error-reporting.c -@@ -144,6 +144,10 @@ fm_report_error_renaming_file (CajaFile *file, - new_name_truncated); - } - break; -+ case G_IO_ERROR_FILENAME_TOO_LONG: -+ message = g_strdup_printf (_("File name too long. " -+ "Please use a different name.")); -+ break; - default: - break; - } --- -2.36.1 - diff --git a/0001-Support-change-desktop-background-image-in-kiran-des.patch b/0001-Support-change-desktop-background-image-in-kiran-des.patch deleted file mode 100644 index f8f2f031e99dcd601efc5a1efafc105fd33c6986..0000000000000000000000000000000000000000 --- a/0001-Support-change-desktop-background-image-in-kiran-des.patch +++ /dev/null @@ -1,85 +0,0 @@ -From b8c487050e04975cb81bd9404f4f4281b6ed6f86 Mon Sep 17 00:00:00 2001 -From: wangxiaoqing -Date: Wed, 27 Jul 2022 14:14:11 +0800 -Subject: [PATCH] Support change desktop background image in kiran desktop -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复在Kiran桌面中桌面右键更改桌面背景菜单无法使用的问题 - Related #I5I1HE - -Signed-off-by: wangxiaoqing ---- - libcaja-private/caja-program-choosing.c | 5 ++++ - src/file-manager/fm-desktop-icon-view.c | 32 +++++++++++++++++++++---- - 2 files changed, 32 insertions(+), 5 deletions(-) - -diff --git a/libcaja-private/caja-program-choosing.c b/libcaja-private/caja-program-choosing.c -index 5e3d22b..033142d 100644 ---- a/libcaja-private/caja-program-choosing.c -+++ b/libcaja-private/caja-program-choosing.c -@@ -358,6 +358,11 @@ caja_launch_application_from_command (GdkScreen *screen, - display = gdk_screen_get_display (screen); - launch_context = gdk_display_get_app_launch_context (display); - gdk_app_launch_context_set_screen (launch_context, screen); -+ /** -+ * Remove GIO_LAUNCHED_DESKTOP_FILE Environment variables to allow -+ * the KIRAN taskbar to find the corresponding window icon. -+ */ -+ g_app_launch_context_unsetenv (G_APP_LAUNCH_CONTEXT (launch_context), "GIO_LAUNCHED_DESKTOP_FILE"); - g_app_info_launch (app_info, NULL, G_APP_LAUNCH_CONTEXT (launch_context), NULL); - g_object_unref (launch_context); - g_object_unref (app_info); -diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c -index aa40b2d..22dfa3f 100644 ---- a/src/file-manager/fm-desktop-icon-view.c -+++ b/src/file-manager/fm-desktop-icon-view.c -@@ -656,17 +656,39 @@ action_new_launcher_callback (GtkAction *action, gpointer data) - - } - -+static gboolean -+running_in_kiran (void) -+{ -+ return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "KIRAN") == 0) -+ || (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "KIRAN") == 0) -+ || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "KIRAN") == 0); -+} -+ - static void - action_change_background_callback (GtkAction *action, - gpointer data) - { - g_assert (FM_DIRECTORY_VIEW (data)); - -- caja_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (data)), -- _("Background"), -- "mate-appearance-properties", -- FALSE, -- "--show-page=background", NULL); -+ if (running_in_kiran()) -+ { -+ caja_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (data)), -+ _("Background"), -+ "kiran-control-panel", -+ FALSE, -+ "-c", -+ "individuation", -+ "-s", -+ "Wallpaper", NULL); -+ } -+ else -+ { -+ caja_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (data)), -+ _("Background"), -+ "mate-appearance-properties", -+ FALSE, -+ "--show-page=background", NULL); -+ } - } - - static void --- -2.36.1 - diff --git a/0001-allow-root-to-use-desktop-manager.patch b/0001-allow-root-to-use-desktop-manager.patch deleted file mode 100644 index 1f03d6d60df77041f2fa068010f97ec7f3d1d117..0000000000000000000000000000000000000000 --- a/0001-allow-root-to-use-desktop-manager.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b081e9b4b21113e74e497df6d8ca92b2a41f16bc Mon Sep 17 00:00:00 2001 -From: tangjie02 -Date: Mon, 13 Dec 2021 14:06:04 +0800 -Subject: [PATCH] allow root to use desktop manager - -Signed-off-by: tangjie02 ---- - src/caja-application.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/caja-application.c b/src/caja-application.c -index 090c3dd..d8c7acd 100644 ---- a/src/caja-application.c -+++ b/src/caja-application.c -@@ -2293,7 +2293,7 @@ init_desktop (CajaApplication *self) - self->priv->no_desktop = TRUE; - } - -- if (running_as_root () || !running_in_mate ()) -+ if (!running_in_mate ()) - { - /* do not manage desktop when running as root or on other desktops unless forced */ - self->priv->no_desktop = TRUE; --- -2.27.0 - diff --git a/0001-fix-desktop-Add-Chinese-name-translation-to-desktop-.patch b/0001-fix-desktop-Add-Chinese-name-translation-to-desktop-.patch deleted file mode 100644 index 8768891415c7243b7115092ff75f26e9c4a87a03..0000000000000000000000000000000000000000 --- a/0001-fix-desktop-Add-Chinese-name-translation-to-desktop-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 2e401e51b4a4755bd77932b4a13e82c834905fc8 Mon Sep 17 00:00:00 2001 -From: wangxiaoqing -Date: Fri, 2 Sep 2022 09:40:03 +0800 -Subject: [PATCH] fix(desktop): Add Chinese name translation to desktop files -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 给桌面文件添加中文名称翻译, 使得面板上图标的提示语为文件管理器 - -Signed-off-by: wangxiaoqing ---- - data/caja.desktop.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/data/caja.desktop.in b/data/caja.desktop.in -index 3d8a122..b1fb931 100644 ---- a/data/caja.desktop.in -+++ b/data/caja.desktop.in -@@ -1,5 +1,6 @@ - [Desktop Entry] - Name=Caja -+Name[zh_CN]=文件管理器 - GenericName[af]=Lêerbestuurder - GenericName[am]=የ ፋይል አስተዳዳሪ - GenericName[ar]=مدير الملفات --- -2.36.1 - diff --git a/0002-Let-the-location-bar-background-change-with-theme.patch b/0002-Let-the-location-bar-background-change-with-theme.patch deleted file mode 100644 index e2964e85a26a3be97696fe6f00a70e85a2356806..0000000000000000000000000000000000000000 --- a/0002-Let-the-location-bar-background-change-with-theme.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f8df64351263ced3b369a03b93ac2a1644f56678 Mon Sep 17 00:00:00 2001 -From: wangxiaoqing -Date: Thu, 28 Jul 2022 08:57:36 +0800 -Subject: [PATCH 2/4] Let the location bar background change with theme -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 让位置栏背景和主题一起变化, 修复切换为浅色主题后文件管理器位置栏仍为黑色 - Related #I5I8V9 - -Signed-off-by: wangxiaoqing ---- - src/caja-navigation-window-pane.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/caja-navigation-window-pane.c b/src/caja-navigation-window-pane.c -index 29018b5..019162c 100644 ---- a/src/caja-navigation-window-pane.c -+++ b/src/caja-navigation-window-pane.c -@@ -58,9 +58,6 @@ real_set_active (CajaWindowPane *pane, gboolean is_active) - gtk_widget_set_sensitive (gtk_bin_get_child (GTK_BIN (caja_path_bar_get_button_from_button_list_entry (l->data))), is_active); - } - -- /* navigation bar (manual entry) */ -- caja_location_bar_set_active (CAJA_LOCATION_BAR (nav_pane->navigation_bar), is_active); -- - /* location button */ - gtk_widget_set_sensitive (gtk_bin_get_child (GTK_BIN (nav_pane->location_button)), is_active); - } --- -2.36.1 - diff --git a/0002-feature-kiran-Support-kiran-desktop-environment.patch b/0002-feature-kiran-Support-kiran-desktop-environment.patch deleted file mode 100644 index 367d81256eb438a0ddbe7646c53d7db27fa28330..0000000000000000000000000000000000000000 --- a/0002-feature-kiran-Support-kiran-desktop-environment.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 91dcb951c19e7a05b16f81474e0708e2389ce1d3 Mon Sep 17 00:00:00 2001 -From: tangjie02 -Date: Mon, 9 Aug 2021 18:00:34 +0800 -Subject: [PATCH 2/3] feature(kiran): Support kiran desktop environment. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 支持kiran桌面环境 - -Signed-off-by: tangjie02 ---- - libegg/eggsmclient.c | 10 +++++++++- - src/caja-application.c | 11 +++++++++-- - 2 files changed, 18 insertions(+), 3 deletions(-) - -diff --git a/libegg/eggsmclient.c b/libegg/eggsmclient.c -index c404349..3113e6b 100644 ---- a/libegg/eggsmclient.c -+++ b/libegg/eggsmclient.c -@@ -59,6 +59,14 @@ running_in_mate (void) - || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate") == 0); - } - -+static gboolean -+running_in_kiran (void) -+{ -+ return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "KIRAN") == 0) -+ || (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "kiran") == 0) -+ || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "kiran") == 0); -+} -+ - static void - egg_sm_client_init (EggSMClient *client) - { -@@ -360,7 +368,7 @@ egg_sm_client_get (void) - as egg_sm_client_set_mode must be called prior to start of main loop - to stop caja restart but this is diffcult in GtkApplication */ - -- if (geteuid () == 0 || !running_in_mate ()){ -+ if (geteuid () == 0 || !(running_in_mate () || running_in_kiran ())){ - global_client = g_object_new (EGG_TYPE_SM_CLIENT, NULL); - } - } -diff --git a/src/caja-application.c b/src/caja-application.c -index 2791bd9..8d33baa 100644 ---- a/src/caja-application.c -+++ b/src/caja-application.c -@@ -1838,6 +1838,13 @@ running_in_mate (void) - || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate") == 0); - } - -+static gboolean -+running_in_kiran (void) -+{ -+ return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "KIRAN") == 0) -+ || (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "KIRAN") == 0) -+ || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "KIRAN") == 0); -+} - static gboolean - running_as_root (void) - { -@@ -2110,7 +2117,7 @@ init_desktop (CajaApplication *self) - self->priv->no_desktop = TRUE; - } - -- if (!running_in_mate ()) -+ if (!running_in_mate () && !running_in_kiran ()) - { - /* do not manage desktop when running as root or on other desktops unless forced */ - self->priv->no_desktop = TRUE; -@@ -2262,7 +2269,7 @@ caja_application_startup (GApplication *app) - * Otherwise, we read the value from the configuration. - */ - -- if (running_in_mate () && !running_as_root()) -+ if ((running_in_mate () || running_in_kiran ()) && !running_as_root()) - { - GApplication *instance; - --- -2.33.0 - diff --git a/0003-Fix-the-background-image-can-not-draw-all-when-rotat.patch b/0003-Fix-the-background-image-can-not-draw-all-when-rotat.patch deleted file mode 100644 index 6f856b6c1adffe96a3c5e6d651a63ef3a9388319..0000000000000000000000000000000000000000 --- a/0003-Fix-the-background-image-can-not-draw-all-when-rotat.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 84bd5f2ea9d84094b5a2b0cba2eab9b8c3116c53 Mon Sep 17 00:00:00 2001 -From: wangxiaoqing -Date: Thu, 28 Jul 2022 14:00:58 +0800 -Subject: [PATCH 3/4] Fix the background image can not draw all when rotating - screen -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复旋转屏幕90°时,一半屏幕无法正常显示 - Related #I5I2U6 - -Signed-off-by: wangxiaoqing ---- - src/caja-desktop-window.c | 37 +++++++++++++++++++++++++++++++++++-- - 1 file changed, 35 insertions(+), 2 deletions(-) - -diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c -index 36ae52c..97b5a0b 100644 ---- a/src/caja-desktop-window.c -+++ b/src/caja-desktop-window.c -@@ -148,17 +148,50 @@ caja_desktop_window_update_directory (CajaDesktopWindow *window) - g_object_unref (location); - } - -+static void -+calculate_screen_size (GdkScreen *screen, -+ int *width, -+ int *height) -+{ -+ GdkDisplay *display; -+ gint monitors; -+ gint i, x1, y1, x2, y2; -+ -+ display = gdk_screen_get_display (screen); -+ monitors = gdk_display_get_n_monitors (display); -+ -+ x1 = y1 = G_MAXINT; -+ x2 = y2 = G_MININT; -+ -+ for (i = 0; i < monitors; i++) -+ { -+ GdkMonitor *monitor = gdk_display_get_monitor (display, i); -+ GdkRectangle geometry; -+ -+ gdk_monitor_get_geometry (monitor, &geometry); -+ x1 = MIN (x1, geometry.x); -+ y1 = MIN (y1, geometry.y); -+ x2 = MAX (x2, geometry.x + geometry.width); -+ y2 = MAX (y2, geometry.y + geometry.height); -+ } -+ -+ *width = x2 - x1; -+ *height = y2 - y1; -+} -+ - static void - caja_desktop_window_screen_size_changed (GdkScreen *screen, - CajaDesktopWindow *window) - { - int width_request, height_request; - int scale; -+ int screen_width, screen_height; - - scale = gdk_window_get_scale_factor (gdk_screen_get_root_window (screen)); - -- width_request = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale; -- height_request = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale; -+ calculate_screen_size (screen, &screen_width, &screen_height); -+ width_request = screen_width / scale; -+ height_request = screen_height / scale; - - g_object_set (window, - "width_request", width_request, --- -2.36.1 - diff --git a/0003-fix-libegg-caja-not-register-for-root-in-MATE-deskto.patch b/0003-fix-libegg-caja-not-register-for-root-in-MATE-deskto.patch deleted file mode 100644 index f238bf1e4491130c9f2c017fd1d434e9fcd4e6fe..0000000000000000000000000000000000000000 --- a/0003-fix-libegg-caja-not-register-for-root-in-MATE-deskto.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0b2176a539338466dda802b06fcd7589d51ceef5 Mon Sep 17 00:00:00 2001 -From: tangjie02 -Date: Thu, 7 May 2020 00:06:50 +0800 -Subject: [PATCH 3/3] fix(libegg): caja not register for root in MATE desktop - before session manager timeout -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复caja在root登录时未向mate-session-manager进行注册导致mate-session-manager长时间等待(30秒)的问题 - -Signed-off-by: tangjie02 ---- - libegg/eggsmclient.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libegg/eggsmclient.c b/libegg/eggsmclient.c -index 3113e6b..f8c35e1 100644 ---- a/libegg/eggsmclient.c -+++ b/libegg/eggsmclient.c -@@ -368,7 +368,7 @@ egg_sm_client_get (void) - as egg_sm_client_set_mode must be called prior to start of main loop - to stop caja restart but this is diffcult in GtkApplication */ - -- if (geteuid () == 0 || !(running_in_mate () || running_in_kiran ())){ -+ if (!(running_in_mate () || running_in_kiran ())){ - global_client = g_object_new (EGG_TYPE_SM_CLIENT, NULL); - } - } --- -2.33.0 - diff --git a/0004-Not-draw-icon-and-text-hight-light-color-when-icon-n.patch b/0004-Not-draw-icon-and-text-hight-light-color-when-icon-n.patch deleted file mode 100644 index ef4cbce6f218a1cff5c730144e8b1e2de15abbb3..0000000000000000000000000000000000000000 --- a/0004-Not-draw-icon-and-text-hight-light-color-when-icon-n.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 5b3b8728e06b515c9ab3cdd2d601445cabd285a8 Mon Sep 17 00:00:00 2001 -From: wangxiaoqing -Date: Fri, 29 Jul 2022 16:41:14 +0800 -Subject: [PATCH 4/4] Not draw icon and text hight light color when icon not - get force -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 当图标未获得焦点时,不高亮绘制其图标和文字 - Related #I5HRI0 - -Signed-off-by: wangxiaoqing ---- - libcaja-private/caja-icon-canvas-item.c | 25 ++++++++++++------------- - 1 file changed, 12 insertions(+), 13 deletions(-) - -diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c -index 7ab2f70..7c56de2 100644 ---- a/libcaja-private/caja-icon-canvas-item.c -+++ b/libcaja-private/caja-icon-canvas-item.c -@@ -1077,7 +1077,9 @@ prepare_pango_layout_for_draw (CajaIconCanvasItem *item, - container = CAJA_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas); - details = item->details; - -- needs_highlight = details->is_highlighted_for_selection || details->is_highlighted_for_drop; -+ needs_highlight = (details->is_highlighted_for_selection && -+ gtk_widget_has_focus (GTK_WIDGET (EEL_CANVAS_ITEM (item)->canvas))) || -+ details->is_highlighted_for_drop; - - if (IS_COMPACT_VIEW (container)) - { -@@ -1278,7 +1280,9 @@ draw_label_text (CajaIconCanvasItem *item, - - text_rect = compute_text_rectangle (item, icon_rect, TRUE, BOUNDS_USAGE_FOR_DISPLAY); - -- needs_highlight = details->is_highlighted_for_selection || details->is_highlighted_for_drop; -+ needs_highlight = (details->is_highlighted_for_selection && -+ gtk_widget_has_focus (GTK_WIDGET (EEL_CANVAS_ITEM (item)->canvas))) || -+ details->is_highlighted_for_drop; - is_rtl_label_beside = caja_icon_container_is_layout_rtl (container) && - container->details->label_position == CAJA_ICON_LABEL_POSITION_BESIDE; - -@@ -1777,22 +1781,17 @@ real_map_surface (CajaIconCanvasItem *icon_item) - } - } - -- if (icon_item->details->is_highlighted_for_selection -- || icon_item->details->is_highlighted_for_drop) -+ if ((icon_item->details->is_highlighted_for_selection && -+ gtk_widget_has_focus (GTK_WIDGET (canvas))) || -+ icon_item->details->is_highlighted_for_drop) - { - GtkStyleContext *style; - - style = gtk_widget_get_style_context (GTK_WIDGET (canvas)); - -- if (gtk_widget_has_focus (GTK_WIDGET (canvas))) { -- gtk_style_context_get (style, GTK_STATE_FLAG_SELECTED, -- GTK_STYLE_PROPERTY_BACKGROUND_COLOR, -- &c, NULL); -- } else { -- gtk_style_context_get (style, GTK_STATE_FLAG_ACTIVE, -- GTK_STYLE_PROPERTY_BACKGROUND_COLOR, -- &c, NULL); -- } -+ gtk_style_context_get (style, GTK_STATE_FLAG_SELECTED, -+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR, -+ &c, NULL); - - color = *c; - gdk_rgba_free (c); --- -2.36.1 - diff --git a/1084-fix-caja-Fix-the-open-terminal-can-not-correct-to-te-29a720a6.patch b/1084-fix-caja-Fix-the-open-terminal-can-not-correct-to-te-29a720a6.patch deleted file mode 100644 index 5dc41cd414547b13cf7255905a48e773f486e954..0000000000000000000000000000000000000000 --- a/1084-fix-caja-Fix-the-open-terminal-can-not-correct-to-te-29a720a6.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 29a720a6c6abcf2ab3afeabcc5effef425845e1c Mon Sep 17 00:00:00 2001 -From: wangxiaoqing -Date: Wed, 12 Jan 2022 08:56:02 +0600 -Subject: [PATCH 1084/1085] fix(caja): Fix the open terminal can not correct to - terminal icon -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复从文件管理器打开终端时,图标无法对应上的问题 - Related #48474 - -Signed-off-by: wangxiaoqing ---- - src/caja-main.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/caja-main.c b/src/caja-main.c -index 1fa77c2..1eab994 100644 ---- a/src/caja-main.c -+++ b/src/caja-main.c -@@ -251,6 +251,8 @@ main (int argc, char *argv[]) - mallopt (M_MMAP_THRESHOLD, 128 *1024); - #endif - -+ g_unsetenv("GIO_LAUNCHED_DESKTOP_FILE"); -+ - if (g_getenv ("CAJA_DEBUG") != NULL) { - eel_make_warnings_and_criticals_stop_in_debugger (); - } --- -2.27.0 - diff --git a/caja-1.24.1.tar.xz b/caja-1.24.1.tar.xz deleted file mode 100755 index c6021fa5fd30adb09e336bb022cd3181ed496570..0000000000000000000000000000000000000000 Binary files a/caja-1.24.1.tar.xz and /dev/null differ diff --git a/caja-1.24.1-2.isoft.src.rpm b/caja-1.28.0.tar.xz old mode 100755 new mode 100644 similarity index 41% rename from caja-1.24.1-2.isoft.src.rpm rename to caja-1.28.0.tar.xz index 42cbf9cd8aa0689af7308e97b379570fd33a0556..5263fb76f3d42b39edf23d0241ed50dc373cb981 Binary files a/caja-1.24.1-2.isoft.src.rpm and b/caja-1.28.0.tar.xz differ diff --git a/caja.spec b/caja.spec old mode 100755 new mode 100644 index 41a6d0358d0e0025e9e2e2ca136f93720c59c7bc..edc4f610ef7679f729e61ee5a44c55dc1c07bf91 --- a/caja.spec +++ b/caja.spec @@ -1,42 +1,35 @@ -# This is needed, because src-url contains branched part of versioning-scheme. -%global branch 1.24 - -# Settings used for build from snapshots. -%global commit ee0a62c8759040d84055425954de1f860bac8652 -%global commit_date 20140223 -%global shortcommit %(c=%{commit};echo ${c:0:7}) -%global git_ver git%{commit_date}-%{shortcommit} -%global git_rel .git%{commit_date}.%{shortcommit} -%global git_tar %{name}-%{version}-%{git_ver}.tar.xz +## START: Set by rpmautospec +## (rpmautospec version 0.7.3) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 4; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +%global branch 1.28 Name: caja Summary: File manager for MATE -Version: %{branch}.1 -Release: 13 +Version: %{branch}.0 +Release: %autorelease License: GPLv2+ and LGPLv2+ URL: http://mate-desktop.org - -# for downloading the tarball use 'spectool -g -R caja.spec' -# Source for release-builds. Source0: http://pub.mate-desktop.org/releases/%{branch}/%{name}-%{version}.tar.xz -Patch0: caja_add-xfce-to-desktop-file-1.25.patch -Patch1: 0001-allow-root-to-use-desktop-manager.patch -Patch2: 0002-feature-kiran-Support-kiran-desktop-environment.patch -Patch3: 0003-fix-libegg-caja-not-register-for-root-in-MATE-deskto.patch -Patch4: 0001-Support-change-desktop-background-image-in-kiran-des.patch -Patch5: 0001-Fix-the-file-rename-error-msg-too-long.patch -Patch6: 0001-Fix-the-file-can-be-rename-to-only-container-space-n.patch -Patch7: 0002-Let-the-location-bar-background-change-with-theme.patch -Patch8: 0003-Fix-the-background-image-can-not-draw-all-when-rotat.patch -Patch9: 0004-Not-draw-icon-and-text-hight-light-color-when-icon-n.patch -Patch10: 0001-fix-desktop-Add-Chinese-name-translation-to-desktop-.patch -Patch11: 1084-fix-caja-Fix-the-open-terminal-can-not-correct-to-te-29a720a6.patch +Patch1: caja_0001-caja-file-operations-fix-caption-button-in-destinati.patch +Patch2: caja_0003-wayland-background-use-mate-appearance-properties-if.patch +Patch3: caja_0004-build-remove-configure-dependency-on-perl-1789.patch +Patch4: caja_0005-wayland-ensure-windows-can-be-moved-if-compositor-is.patch +Patch5: caja_0009-caja-file-operations-fix-estimate-for-queued-copy-17.patch +Patch6: caja_0010-caja-file-operations-restart-timer-also-for-moves.patch BuildRequires: dbus-glib-devel BuildRequires: desktop-file-utils BuildRequires: exempi-devel BuildRequires: gobject-introspection-devel +BuildRequires: gtk-layer-shell-devel BuildRequires: cairo-gobject-devel BuildRequires: libexif-devel BuildRequires: libselinux-devel @@ -50,7 +43,7 @@ BuildRequires: startup-notification-devel BuildRequires: libnotify-devel Requires: filesystem -Requires: openEuler-menus +Requires: redhat-menus Requires: gvfs # the main binary links against libcaja-extension.so @@ -99,11 +92,15 @@ for developing caja extensions. sed -i s/StartupNotify=true/StartupNotify=false/g data/caja-computer.desktop.in.in sed -i s/StartupNotify=true/StartupNotify=false/g data/caja-home.desktop.in.in +#Patch2 +NOCONFIGURE=1 ./autogen.sh + %build %configure \ --disable-static \ --disable-schemas-compile \ - --disable-update-mimedb + --disable-update-mimedb \ + --enable-wayland #drop unneeded direct library deps with --as-needed # libtool doesn't make this easy, so we do it the hard way @@ -172,46 +169,49 @@ EOF %changelog -* Wed Dec 11 2024 lijian1- 1.24.1-13 -- remove no use code +## START: Generated by rpmautospec +* Fri Mar 14 2025 raveit65 - 1.28.0-4 +- add some upstream commits + +* Fri Feb 23 2024 Wolfgang Ulbrich - 1.28.0-1 +- update to 1.28.0 + +* Tue Jan 23 2024 Fedora Release Engineering - 1.26.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Fri Sep 09 2022 liuxinhao - 1.24.1-12 -- Apply the last submitted patch +* Fri Jan 19 2024 Fedora Release Engineering - 1.26.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Thu Sep 08 2022 liuxinhao - 1.24.1-11 -- Fix the open terminal can not correct to terminal icon(#I5Q5ME) +* Wed Nov 22 2023 Wolfgang Ulbrich - 1.26.3-2 +- fix build with libxml-2.12.0 -* Fri Sep 02 2022 wangxiaoqing - 1.24.1-10 -- Add Chinese name translation to desktop files +* Fri Oct 13 2023 Wolfgang Ulbrich - 1.26.3-1 +- update to 1.26.3 -* Fri Jul 29 2022 wangxiaoqing - 1.24.1-9 -- Fix the file can be rename to only container space name -- Let the location bar background change with theme -- Fix the background image can not draw all when rotating -- Not draw icon and text hight light color when icon not get force +* Wed Jul 19 2023 Fedora Release Engineering - 1.26.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild -* Fri Jul 29 2022 wangxiaoqing - 1.24.1-8 -- Fix the file rename error msg too long +* Wed Jan 18 2023 Fedora Release Engineering - 1.26.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild -* Wed Jul 27 2022 wangxiaoqing - 1.24.1-7 -- Support change desktop background image in kiran desktop +* Wed Jul 20 2022 Fedora Release Engineering - 1.26.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild -* Thu Jun 23 2022 tangjie02 - 1.24.1-6 -- Remove %{?dist} +* Sun Jul 03 2022 Wolfgang Ulbrich - 1.26.1-1 +- update to 1.26.1 -* Thu Jun 23 2022 tangjie02 - 1.24.1-5 -- Support kiran desktop environment. -- Caja not register for root in MATE desktop before session manager timeout +* Wed Jan 19 2022 Fedora Release Engineering - 1.26.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild -* Thu Mar 24 2022 zhangtao - 1.24.1-4 -- modify else release number back +* Sun Oct 10 2021 Wolfgang Ulbrich - 1.26.0-2 +- fix https://github.com/mate-desktop/caja/issues/1562 +- use https://github.com/mate-desktop/caja/pull/1563 -* Thu Mar 24 2022 xu_ping - 1.24.1-3 -- Remove %{?dist} +* Wed Aug 04 2021 Wolfgang Ulbrich - 1.26.0-1 +- update to 1.26.0 -* Tue Jan 25 2022 longcheng - 1.24.1-2 -- Modify the require redhat-menus to openEuler-menus -- Allow root to use desktop manager +* Wed Jul 21 2021 Fedora Release Engineering - 1.24.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Mar 25 2021 Wolfgang Ulbrich - 1.24.1-1 - update to 1.24.1 @@ -755,3 +755,4 @@ EOF * Sun Dec 25 2011 Wolfgang Ulbrich - 1.1.0-1 - mate-file-manager.spec based on nautilus-2.32.0-1.fc14 spec +## END: Generated by rpmautospec diff --git a/caja.yaml b/caja.yaml deleted file mode 100644 index 2a97a0aa5f4671688d160ab21eca83806cddb701..0000000000000000000000000000000000000000 --- a/caja.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version_control: github -src_repo: mate-desktop/caja -tag_prefix: "^v" -separator: "." diff --git a/caja_0001-caja-file-operations-fix-caption-button-in-destinati.patch b/caja_0001-caja-file-operations-fix-caption-button-in-destinati.patch new file mode 100644 index 0000000000000000000000000000000000000000..aaaac858bc19793c94a12555e4f10ceff2a74646 --- /dev/null +++ b/caja_0001-caja-file-operations-fix-caption-button-in-destinati.patch @@ -0,0 +1,186 @@ +From d90c625350c52b2ca10b6edda50c977075ad5fc6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20P=C3=B6schel?= +Date: Sat, 3 Feb 2024 22:43:45 +0100 +Subject: [PATCH 1/8] caja-file-operations: fix caption/button in destination + error dialogue + +For certain operations, the destination is checked. If an error occurs, +the user is asked how to proceed using a dialogue. So far this dialogue +was hard-coded to only consider the copy operation. + +This fix also considers the other affected operations and generalizes +the continue button text. +--- + libcaja-private/caja-file-operations.c | 49 ++++++++++++++++++++++---- + 1 file changed, 42 insertions(+), 7 deletions(-) + +diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c +index 8676800e..edc595b1 100644 +--- a/libcaja-private/caja-file-operations.c ++++ b/libcaja-private/caja-file-operations.c +@@ -152,6 +152,8 @@ typedef struct { + } SetPermissionsJob; + + typedef enum { ++ OP_KIND_CREATE, ++ OP_KIND_LINK, + OP_KIND_COPY, + OP_KIND_MOVE, + OP_KIND_DELETE, +@@ -188,7 +190,7 @@ typedef struct { + #define DELETE_ALL _("Delete _All") + #define REPLACE_ALL _("Replace _All") + #define MERGE_ALL _("Merge _All") +-#define COPY_FORCE _("Copy _Anyway") ++#define CONTINUE_FORCE _("Continue _Anyway") + + NotifyNotification *unmount_notify; + +@@ -2522,6 +2524,10 @@ report_count_progress (CommonJob *job, + + switch (source_info->op) { + default: ++ // OP_KIND_CREATE and OP_KIND_LINK don't have a source ++ g_assert_not_reached (); ++ s = f (""); ++ break; + case OP_KIND_COPY: + s = f (ngettext("Preparing to copy %'d file (%S)", + "Preparing to copy %'d files (%S)", +@@ -2571,6 +2577,9 @@ get_scan_primary (OpKind kind) + { + switch (kind) { + default: ++ // OP_KIND_CREATE and OP_KIND_LINK don't have a source ++ g_assert_not_reached (); ++ return f (""); + case OP_KIND_COPY: + return f (_("Error while copying.")); + case OP_KIND_MOVE: +@@ -2820,8 +2829,29 @@ scan_sources (GList *files, + report_count_progress (job, source_info); + } + ++static char * ++get_verify_primary (OpKind kind, ++ GFile *dest) ++{ ++ switch (kind) { ++ default: ++ // OP_KIND_DELETE and OP_KIND_TRASH don't have a destination ++ g_assert_not_reached (); ++ return f (""); ++ case OP_KIND_CREATE: ++ return f (_("Error while creating file/directory in \"%B\"."), dest); ++ case OP_KIND_LINK: ++ return f (_("Error while creating link in \"%B\"."), dest); ++ case OP_KIND_COPY: ++ return f (_("Error while copying to \"%B\"."), dest); ++ case OP_KIND_MOVE: ++ return f (_("Error while moving to \"%B\"."), dest); ++ } ++} ++ + static void + verify_destination (CommonJob *job, ++ OpKind kind, + GFile *dest, + char **dest_fs_id, + goffset required_size) +@@ -2853,7 +2883,7 @@ verify_destination (CommonJob *job, + return; + } + +- primary = f (_("Error while copying to \"%B\"."), dest); ++ primary = get_verify_primary (kind, dest); + details = NULL; + + if (IS_IO_ERROR (error, PERMISSION_DENIED)) { +@@ -2895,7 +2925,7 @@ verify_destination (CommonJob *job, + g_object_unref (info); + + if (file_type != G_FILE_TYPE_DIRECTORY) { +- primary = f (_("Error while copying to \"%B\"."), dest); ++ primary = get_verify_primary (kind, dest); + secondary = f (_("The destination is not a folder.")); + + response = run_error (job, +@@ -2928,7 +2958,7 @@ verify_destination (CommonJob *job, + G_FILE_ATTRIBUTE_FILESYSTEM_FREE); + + if (free_size < (guint64) required_size) { +- primary = f (_("Error while copying to \"%B\"."), dest); ++ primary = get_verify_primary (kind, dest); + secondary = f(_("There is not enough space on the destination. Try to remove files to make space.")); + + details = f (_("There is %" G_GUINT64_FORMAT " available, but %" G_GOFFSET_FORMAT " is required."), free_size, required_size); +@@ -2939,7 +2969,7 @@ verify_destination (CommonJob *job, + details, + FALSE, + CANCEL, +- COPY_FORCE, ++ CONTINUE_FORCE, + RETRY, + NULL); + +@@ -2948,7 +2978,7 @@ verify_destination (CommonJob *job, + } else if (response == 2) { + goto retry; + } else if (response == 1) { +- /* We are forced to copy - just fall through ... */ ++ /* We are forced to continue - just fall through ... */ + } else { + g_assert_not_reached (); + } +@@ -2958,7 +2988,7 @@ verify_destination (CommonJob *job, + if (!job_aborted (job) && + g_file_info_get_attribute_boolean (fsinfo, + G_FILE_ATTRIBUTE_FILESYSTEM_READONLY)) { +- primary = f (_("Error while copying to \"%B\"."), dest); ++ primary = get_verify_primary (kind, dest); + secondary = f (_("The destination is read-only.")); + + response = run_error (job, +@@ -4668,6 +4698,7 @@ copy_job (GIOSchedulerJob *io_job, + } + + verify_destination (&job->common, ++ OP_KIND_COPY, + dest, + &dest_fs_id, + source_info.num_bytes); +@@ -5196,6 +5227,7 @@ move_job (GIOSchedulerJob *io_job, + caja_progress_info_start (job->common.progress); + + verify_destination (&job->common, ++ OP_KIND_MOVE, + job->destination, + &dest_fs_id, + -1); +@@ -5225,6 +5257,7 @@ move_job (GIOSchedulerJob *io_job, + } + + verify_destination (&job->common, ++ OP_KIND_MOVE, + job->destination, + NULL, + source_info.num_bytes); +@@ -5526,6 +5559,7 @@ link_job (GIOSchedulerJob *io_job, + caja_progress_info_start (job->common.progress); + + verify_destination (&job->common, ++ OP_KIND_LINK, + job->destination, + NULL, + -1); +@@ -6009,6 +6043,7 @@ create_job (GIOSchedulerJob *io_job, + max_length = get_max_name_length (job->dest_dir); + + verify_destination (common, ++ OP_KIND_CREATE, + job->dest_dir, + NULL, -1); + if (job_aborted (common)) { +-- +2.47.0 + diff --git a/caja_0003-wayland-background-use-mate-appearance-properties-if.patch b/caja_0003-wayland-background-use-mate-appearance-properties-if.patch new file mode 100644 index 0000000000000000000000000000000000000000..d21f54e643783684a3f39fd16e5015d0cf1ff855 --- /dev/null +++ b/caja_0003-wayland-background-use-mate-appearance-properties-if.patch @@ -0,0 +1,37 @@ +From d5a66388fe5f076939136671449de057aaa3b44f Mon Sep 17 00:00:00 2001 +From: Luke from DC +Date: Tue, 30 Jul 2024 20:58:44 +0000 +Subject: [PATCH 03/10] wayland background: use mate-appearance-properties if + we can (#1771) + +*In the wayland session, we now have mate-settings-daemon with GDK_BACKEND=x11 +*We need it anyway to control theming in xwayland apps,so we can now use mate-appearance-properties to set the desktop background when it is running +--- + src/file-manager/fm-desktop-icon-view.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c +index 0d0c034a..954c26de 100644 +--- a/src/file-manager/fm-desktop-icon-view.c ++++ b/src/file-manager/fm-desktop-icon-view.c +@@ -717,7 +717,16 @@ action_change_background_callback (GtkAction *action, + /*Get the new background and switch to it in wayland*/ + if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default())) + { +- wayland_bg_dialog_new (); ++ /*We can use the appearance capplet with some versions of mate-control-center ++ *in which the appearance capplet works in wayland ++ *Try it first, and fall back to the standalone dialog if it fails ++ */ ++ GError *error = NULL; ++ ++ g_spawn_command_line_async ("mate-appearance-properties --show-page=background", ++ &error); ++ if (error != NULL) ++ wayland_bg_dialog_new (); + } + else + #endif +-- +2.48.1 + diff --git a/caja_0004-build-remove-configure-dependency-on-perl-1789.patch b/caja_0004-build-remove-configure-dependency-on-perl-1789.patch new file mode 100644 index 0000000000000000000000000000000000000000..8a1e1b0e2974e8b60bf3e54b5423ce697b89fe6b --- /dev/null +++ b/caja_0004-build-remove-configure-dependency-on-perl-1789.patch @@ -0,0 +1,33 @@ +From 421c24b979198a7a7b54f8e89d58dc1bb80c8df7 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Thu, 29 Aug 2024 13:11:40 -0400 +Subject: [PATCH 04/10] build: remove configure dependency on perl (#1789) + +It is totally unused. In 2010, nautilus removed a perl script used to +generate enums: +https://gitlab.gnome.org/GNOME/nautilus/-/commit/75a03a440ebff23ccbf8674ca4a0e9f6475ebbb8 + +Before then, perl was needed to build. After this commit, nautilus still +had messy code to check for perl availability but did nothing with it. +Across multiple forks and reinitialized git repositories that dropped +all commit history, it turns out that caja still has that messy code +too. +--- + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index fa3c4f08..70b61787 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -134,7 +134,6 @@ fi + + dnl ========================================================================== + +-AC_CHECK_PROGS(PERL, perl5 perl) + AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) + + dnl ========================================================================== +-- +2.48.1 + diff --git a/caja_0005-wayland-ensure-windows-can-be-moved-if-compositor-is.patch b/caja_0005-wayland-ensure-windows-can-be-moved-if-compositor-is.patch new file mode 100644 index 0000000000000000000000000000000000000000..773fbadc7e6c87097956130e95fbbd00c2bb79d9 --- /dev/null +++ b/caja_0005-wayland-ensure-windows-can-be-moved-if-compositor-is.patch @@ -0,0 +1,58 @@ +From d55e854dade057bb954778d12acdbdc77d8c0422 Mon Sep 17 00:00:00 2001 +From: Luke from DC +Date: Sun, 22 Sep 2024 06:07:42 +0000 +Subject: [PATCH 05/10] wayland: ensure windows can be moved if compositor is + using CSD (#1787) + +*Do not use G_OBJECT_CLASS (class)->constructed +*We don't seem to need it anymore and it breaks dragging windows with the titlebar or resizing with the mouse in wayland +--- + src/caja-window.c | 18 ++++++------------ + 1 file changed, 6 insertions(+), 12 deletions(-) + +diff --git a/src/caja-window.c b/src/caja-window.c +index a67a5ee4..2191a7ed 100644 +--- a/src/caja-window.c ++++ b/src/caja-window.c +@@ -631,17 +631,6 @@ caja_window_set_initial_window_geometry (CajaWindow *window) + max_height_for_screen)); + } + +-static void +-caja_window_constructed (GObject *self) +-{ +- CajaWindow *window; +- +- window = CAJA_WINDOW (self); +- +- caja_window_initialize_bookmarks_menu (window); +- caja_window_set_initial_window_geometry (window); +-} +- + static void + caja_window_set_property (GObject *object, + guint arg_id, +@@ -742,6 +731,12 @@ caja_window_constructor (GType type, + + slot = caja_window_open_slot (window->details->active_pane, 0); + caja_window_set_active_slot (window, slot); ++ /*We can now do this here instead of in a separate constructed function ++ *and we need to because the separate constructed function causes the ++ *window to be un-draggable/un-resizable with the mouse in wayland ++ */ ++ caja_window_initialize_bookmarks_menu (window); ++ caja_window_set_initial_window_geometry (window); + + return object; + } +@@ -2170,7 +2165,6 @@ caja_window_class_init (CajaWindowClass *class) + GtkBindingSet *binding_set; + + G_OBJECT_CLASS (class)->constructor = caja_window_constructor; +- G_OBJECT_CLASS (class)->constructed = caja_window_constructed; + G_OBJECT_CLASS (class)->get_property = caja_window_get_property; + G_OBJECT_CLASS (class)->set_property = caja_window_set_property; + G_OBJECT_CLASS (class)->finalize = caja_window_finalize; +-- +2.48.1 + diff --git a/caja_0009-caja-file-operations-fix-estimate-for-queued-copy-17.patch b/caja_0009-caja-file-operations-fix-estimate-for-queued-copy-17.patch new file mode 100644 index 0000000000000000000000000000000000000000..03a6dbdf9913432fb99a1d6c2f0e578c4bfef5ab --- /dev/null +++ b/caja_0009-caja-file-operations-fix-estimate-for-queued-copy-17.patch @@ -0,0 +1,72 @@ +From bfa6b650c732ff9edddd1537b14bdab39819fc45 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20P=C3=B6schel?= + +Date: Fri, 13 Dec 2024 05:44:28 +0100 +Subject: [PATCH 09/10] caja-file-operations: fix estimate for queued copy + (#1759) + +* caja-file-operations: fix estimate for queued copy + +Fixes the condition for showing an estimate of the remaining duration in +case a copy operation is queued, correctly considering the current +transfer rate. + +* caja-file-operations: fix division by 0 for delete + +Aligning to the copy operation case, this fixes the condition for +showing an estimate of the remaining duration for delete operations, +preventing a possible division by 0 due to a zero transfer rate. +--- + libcaja-private/caja-file-operations.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c +index edc595b1..6ab8697d 100644 +--- a/libcaja-private/caja-file-operations.c ++++ b/libcaja-private/caja-file-operations.c +@@ -1497,7 +1497,7 @@ report_delete_progress (CommonJob *job, + TransferInfo *transfer_info) + { + int files_left; +- double elapsed; ++ double elapsed, transfer_rate; + gint64 now; + char *files_left_s; + +@@ -1524,15 +1524,19 @@ report_delete_progress (CommonJob *job, + f (_("Deleting files"))); + + elapsed = g_timer_elapsed (job->time, NULL); +- if (elapsed < SECONDS_NEEDED_FOR_RELIABLE_TRANSFER_RATE) { ++ transfer_rate = 0; ++ if (elapsed > 0) { ++ transfer_rate = transfer_info->num_files / elapsed; ++ } ++ ++ if (elapsed < SECONDS_NEEDED_FOR_RELIABLE_TRANSFER_RATE || ++ transfer_rate <= 0) { + + caja_progress_info_set_details (job->progress, files_left_s); + } else { + char *details, *time_left_s; + int remaining_time; +- double transfer_rate; + +- transfer_rate = transfer_info->num_files / elapsed; + remaining_time = files_left / transfer_rate; + + /* Translators: %T will expand to a time like "2 minutes". +@@ -3109,8 +3113,8 @@ report_copy_progress (CopyMoveJob *copy_job, + transfer_rate = transfer_info->num_bytes / elapsed; + } + +- if (elapsed < SECONDS_NEEDED_FOR_RELIABLE_TRANSFER_RATE && +- transfer_rate > 0) { ++ if (elapsed < SECONDS_NEEDED_FOR_RELIABLE_TRANSFER_RATE || ++ transfer_rate <= 0) { + char *s; + /* Translators: %S will expand to a size like "2 bytes" or "3 MB", so something like "4 kb of 4 MB" */ + s = f (_("%S of %S"), transfer_info->num_bytes, total_size); +-- +2.48.1 + diff --git a/caja_0010-caja-file-operations-restart-timer-also-for-moves.patch b/caja_0010-caja-file-operations-restart-timer-also-for-moves.patch new file mode 100644 index 0000000000000000000000000000000000000000..6bad05099865ff5e13baee31a4610fed1af72530 --- /dev/null +++ b/caja_0010-caja-file-operations-restart-timer-also-for-moves.patch @@ -0,0 +1,178 @@ +From ed41589e35a534cb47ea7b6dcc685fef2e7ca578 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20P=C3=B6schel?= +Date: Sun, 31 Dec 2023 17:42:21 +0100 +Subject: [PATCH 10/10] caja-file-operations: restart timer also for moves + +As done for copy/delete jobs, restart the operation timer also for move +jobs. Thus preparations (e.g. `scan_sources`) later won't affect the +later transfer rate calculation. + +caja-file-operations: stop timer when waiting + +When a copy/move operation is created while another operation is already +active, the new operation is queued. As the (already running) operation +timer of the new operation is not stopped during the waiting period, +that period is (erroneously) included in the transfer rate calculation +and leads to initially low/slowly increasing transfer rates be shown. + +Hence stop the operation timer when the (queued) operation is waiting. + +Fixes #1420 and #1623. +--- + libcaja-private/caja-file-operations.c | 24 +++++++++++++----------- + libcaja-private/caja-progress-info.c | 4 +++- + libcaja-private/caja-progress-info.h | 2 +- + 3 files changed, 17 insertions(+), 13 deletions(-) + +diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c +index 6ab8697d..4b51c907 100644 +--- a/libcaja-private/caja-file-operations.c ++++ b/libcaja-private/caja-file-operations.c +@@ -1879,7 +1879,7 @@ trash_files (CommonJob *job, GList *files, guint *files_skipped) + for (l = files; + l != NULL && !job_aborted (job); + l = l->next) { +- caja_progress_info_get_ready (job->progress); ++ caja_progress_info_get_ready (job->progress, job->time); + + file = l->data; + +@@ -3632,7 +3632,7 @@ copy_move_directory (CopyMoveJob *copy_job, + nextinfo = g_file_enumerator_next_file (enumerator, job->cancellable, skip_error?NULL:&error); + while (!job_aborted (job) && + (info = nextinfo) != NULL) { +- caja_progress_info_get_ready (job->progress); ++ caja_progress_info_get_ready (job->progress, job->time); + + nextinfo = g_file_enumerator_next_file (enumerator, job->cancellable, skip_error?NULL:&error); + src_file = g_file_get_child (src, +@@ -4598,7 +4598,7 @@ copy_files (CopyMoveJob *job, + for (l = job->files; + l != NULL && !job_aborted (common); + l = l->next) { +- caja_progress_info_get_ready (common->progress); ++ caja_progress_info_get_ready (common->progress, common->time); + + src = l->data; + +@@ -4915,7 +4915,7 @@ move_file_prepare (CopyMoveJob *move_job, + } + + retry: +- caja_progress_info_get_ready (job->progress); ++ caja_progress_info_get_ready (job->progress, job->time); + + flags = G_FILE_COPY_NOFOLLOW_SYMLINKS | G_FILE_COPY_NO_FALLBACK_FOR_MOVE; + if (overwrite) { +@@ -5091,7 +5091,7 @@ move_files_prepare (CopyMoveJob *job, + + total = left = g_list_length (job->files); + +- caja_progress_info_get_ready (common->progress); ++ caja_progress_info_get_ready (common->progress, common->time); + report_move_progress (job, total, left); + + i = 0; +@@ -5155,7 +5155,7 @@ move_files (CopyMoveJob *job, + for (l = fallbacks; + l != NULL && !job_aborted (common); + l = l->next) { +- caja_progress_info_get_ready (common->progress); ++ caja_progress_info_get_ready (common->progress, common->time); + + fallback = l->data; + src = fallback->file; +@@ -5269,6 +5269,8 @@ move_job (GIOSchedulerJob *io_job, + goto aborted; + } + ++ g_timer_start (job->common.time); ++ + memset (&transfer_info, 0, sizeof (transfer_info)); + move_files (job, + fallbacks, +@@ -5579,7 +5581,7 @@ link_job (GIOSchedulerJob *io_job, + for (l = job->files; + l != NULL && !job_aborted (common); + l = l->next) { +- caja_progress_info_get_ready (common->progress); ++ caja_progress_info_get_ready (common->progress, common->time); + + src = l->data; + +@@ -5721,7 +5723,7 @@ set_permissions_file (SetPermissionsJob *job, + + caja_progress_info_pulse_progress (common->progress); + +- caja_progress_info_get_ready (common->progress); ++ caja_progress_info_get_ready (common->progress, common->time); + + free_info = FALSE; + if (info == NULL) { +@@ -6086,7 +6088,7 @@ create_job (GIOSchedulerJob *io_job, + count = 1; + + retry: +- caja_progress_info_get_ready (common->progress); ++ caja_progress_info_get_ready (common->progress, common->time); + + error = NULL; + if (job->make_dir) { +@@ -6416,7 +6418,7 @@ delete_trash_file (CommonJob *job, + gboolean del_file, + gboolean del_children) + { +- caja_progress_info_get_ready (job->progress); ++ caja_progress_info_get_ready (job->progress, job->time); + + if (job_aborted (job)) { + return; +@@ -6565,7 +6567,7 @@ mark_desktop_file_trusted (CommonJob *common, + GFileInfo *info; + + retry: +- caja_progress_info_get_ready (common->progress); ++ caja_progress_info_get_ready (common->progress, common->time); + + error = NULL; + if (!g_file_load_contents (file, +diff --git a/libcaja-private/caja-progress-info.c b/libcaja-private/caja-progress-info.c +index 1db11351..7ded7ae4 100644 +--- a/libcaja-private/caja-progress-info.c ++++ b/libcaja-private/caja-progress-info.c +@@ -707,7 +707,7 @@ widget_state_notify_paused_callback (ProgressWidgetData *data) + } + + void +-caja_progress_info_get_ready (CajaProgressInfo *info) ++caja_progress_info_get_ready (CajaProgressInfo *info, GTimer *time) + { + if (info->waiting) { + G_LOCK (progress_info); +@@ -717,8 +717,10 @@ caja_progress_info_get_ready (CajaProgressInfo *info) + g_source_set_callback (source, (GSourceFunc)widget_state_notify_paused_callback, info->widget, NULL); + g_source_attach (source, NULL); + ++ g_timer_stop (time); + while (info->waiting) + g_cond_wait (&info->waiting_c, &G_LOCK_NAME(progress_info)); ++ g_timer_continue (time); + } + G_UNLOCK (progress_info); + } +diff --git a/libcaja-private/caja-progress-info.h b/libcaja-private/caja-progress-info.h +index c713361b..4b3e59f4 100644 +--- a/libcaja-private/caja-progress-info.h ++++ b/libcaja-private/caja-progress-info.h +@@ -51,7 +51,7 @@ GType caja_progress_info_get_type (void) G_GNUC_CONST; + */ + + CajaProgressInfo *caja_progress_info_new (gboolean should_start, gboolean can_pause); +-void caja_progress_info_get_ready (CajaProgressInfo *info); ++void caja_progress_info_get_ready (CajaProgressInfo *info, GTimer *time); + void caja_progress_info_disable_pause (CajaProgressInfo *info); + + GList * caja_get_all_progress_info (void); +-- +2.48.1 + diff --git a/caja_add-xfce-to-desktop-file-1.25.patch b/caja_add-xfce-to-desktop-file-1.25.patch deleted file mode 100755 index 38f34c50988e7e33e74b940fcdda6bc628f78c21..0000000000000000000000000000000000000000 --- a/caja_add-xfce-to-desktop-file-1.25.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -uprN caja-1.23.3.orig/data/caja-browser.desktop.in caja-1.23.3/data/caja-browser.desktop.in ---- caja-1.23.3.orig/data/caja-browser.desktop.in 2020-01-19 19:26:14.000000000 +0100 -+++ caja-1.23.3/data/caja-browser.desktop.in 2020-01-19 19:59:55.695171961 +0100 -@@ -218,4 +218,4 @@ Keywords[sl]=datoteke;brskalnik;upravlja - Keywords[zh_CN]=文件;浏览;管理;MATE; - Keywords[zh_TW]=files;browser;manager;MATE; - Keywords=files;browser;manager;MATE; --OnlyShowIn=MATE; -+OnlyShowIn=MATE;XFCE; -diff -uprN caja-1.23.3.orig/data/caja-browser.desktop.in.in caja-1.23.3/data/caja-browser.desktop.in.in ---- caja-1.23.3.orig/data/caja-browser.desktop.in.in 2020-01-10 11:05:05.000000000 +0100 -+++ caja-1.23.3/data/caja-browser.desktop.in.in 2020-01-19 19:59:47.537786679 +0100 -@@ -12,4 +12,4 @@ Type=Application - Categories=GTK;System;Utility;Core; - # Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! - Keywords=files;browser;manager;MATE; --OnlyShowIn=MATE; -+OnlyShowIn=MATE;XFCE;