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 new file mode 100644 index 0000000..06bbc0f --- /dev/null +++ b/0001-Fix-the-file-can-be-rename-to-only-container-space-n.patch @@ -0,0 +1,52 @@ +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/0002-Let-the-location-bar-background-change-with-theme.patch b/0002-Let-the-location-bar-background-change-with-theme.patch new file mode 100644 index 0000000..e2964e8 --- /dev/null +++ b/0002-Let-the-location-bar-background-change-with-theme.patch @@ -0,0 +1,33 @@ +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/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 new file mode 100644 index 0000000..6f856b6 --- /dev/null +++ b/0003-Fix-the-background-image-can-not-draw-all-when-rotat.patch @@ -0,0 +1,77 @@ +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/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 new file mode 100644 index 0000000..ef4cbce --- /dev/null +++ b/0004-Not-draw-icon-and-text-hight-light-color-when-icon-n.patch @@ -0,0 +1,75 @@ +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/caja.spec b/caja.spec index 290bc10..7316db7 100755 --- a/caja.spec +++ b/caja.spec @@ -16,7 +16,7 @@ Name: caja Summary: File manager for MATE Version: %{branch}.1 %if 0%{?rel_build} -Release: 8 +Release: 9 %else Release: 0.15%{?git_rel} %endif @@ -35,6 +35,10 @@ 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 BuildRequires: dbus-glib-devel BuildRequires: desktop-file-utils @@ -186,6 +190,12 @@ EOF %changelog +* 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 + * Fri Jul 29 2022 wangxiaoqing - 1.24.1-8 - Fix the file rename error msg too long