Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
fa8b8e42b9
!61 add yaml
From: @xzyangha 
Reviewed-by: @xu-think-about-it 
Signed-off-by: @xu-think-about-it
2023-04-25 03:23:58 +00:00
yangxianzhao
c8b790f329 add yaml 2023-04-18 13:46:35 +08:00
openeuler-ci-bot
24e0897b64
!58 应用上次提交的补丁,修复打开终端图标对应不上的问题
From: @liubuguiii 
Reviewed-by: @tangjie02 
Signed-off-by: @tangjie02
2022-09-13 03:14:09 +00:00
liuxinhao
c4c62fd8d0 Apply the last submitted patch 2022-09-09 17:38:31 +08:00
openeuler-ci-bot
cc055ded9d
!56 修复打开终端,终端图标显示为文件管理器的问题
From: @liubuguiii 
Reviewed-by: @tangjie02 
Signed-off-by: @tangjie02
2022-09-08 09:46:53 +00:00
liuxinhao
2ecba51249 Fix the open terminal can not correct to terminal icon
- 修复打开终端插件,打开后图标显示文件管理器的图标问题
2022-09-08 16:19:33 +08:00
openeuler-ci-bot
eedd3214b5
!54 修改鼠标移至文件资源管理器图标上方,提示语未汉化
From: @wangxiaoqing987 
Reviewed-by: @tangjie02 
Signed-off-by: @tangjie02
2022-09-02 05:29:47 +00:00
wangxiaoqing
7166cec29b Add Chinese name translation to desktop files
Signed-off-by: wangxiaoqing <wangxiaoqing@kylinsec.com.cn>
2022-09-02 09:50:44 +08:00
openeuler-ci-bot
196e068a7f
!51 修复切换为浅色主题后文件管理器位置栏仍为黑色等问题
From: @wangxiaoqing987 
Reviewed-by: @tangjie02 
Signed-off-by: @tangjie02
2022-08-01 02:14:41 +00:00
wangxiaoqing
ea961c8d98 - 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

Signed-off-by: wangxiaoqing <wangxiaoqing@kylinsec.com.cn>
2022-07-29 17:32:56 +08:00
openeuler-ci-bot
579fc4e1fa
!49 修复重命名全是字符的文件和文件夹,名称过长无法命名成功的提示框显示超出桌面
From: @wangxiaoqing987 
Reviewed-by: @tangjie02 
Signed-off-by: @tangjie02
2022-07-29 09:02:39 +00:00
8 changed files with 325 additions and 1 deletions

View File

@ -0,0 +1,52 @@
From b36d0047bc7012b387abf775d25078b4195b83e5 Mon Sep 17 00:00:00 2001
From: wangxiaoqing <wangxiaoqing@kylinsec.com.cn>
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 <wangxiaoqing@kylinsec.com.cn>
---
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

View File

@ -0,0 +1,29 @@
From 2e401e51b4a4755bd77932b4a13e82c834905fc8 Mon Sep 17 00:00:00 2001
From: wangxiaoqing <wangxiaoqing@kylinsec.com.cn>
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 <wangxiaoqing@kylinsec.com.cn>
---
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

View File

@ -0,0 +1,33 @@
From f8df64351263ced3b369a03b93ac2a1644f56678 Mon Sep 17 00:00:00 2001
From: wangxiaoqing <wangxiaoqing@kylinsec.com.cn>
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 <wangxiaoqing@kylinsec.com.cn>
---
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

View File

@ -0,0 +1,77 @@
From 84bd5f2ea9d84094b5a2b0cba2eab9b8c3116c53 Mon Sep 17 00:00:00 2001
From: wangxiaoqing <wangxiaoqing@kylinsec.com.cn>
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 <wangxiaoqing@kylinsec.com.cn>
---
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

View File

@ -0,0 +1,75 @@
From 5b3b8728e06b515c9ab3cdd2d601445cabd285a8 Mon Sep 17 00:00:00 2001
From: wangxiaoqing <wangxiaoqing@kylinsec.com.cn>
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 <wangxiaoqing@kylinsec.com.cn>
---
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

View File

@ -0,0 +1,33 @@
From 29a720a6c6abcf2ab3afeabcc5effef425845e1c Mon Sep 17 00:00:00 2001
From: wangxiaoqing <wangxiaoqing@kylinos.com.cn>
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 <wangxiaoqing@kylinos.com.cn>
---
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

View File

@ -16,7 +16,7 @@ Name: caja
Summary: File manager for MATE
Version: %{branch}.1
%if 0%{?rel_build}
Release: 8
Release: 12
%else
Release: 0.15%{?git_rel}
%endif
@ -35,6 +35,12 @@ 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
BuildRequires: dbus-glib-devel
BuildRequires: desktop-file-utils
@ -186,6 +192,21 @@ EOF
%changelog
* Fri Sep 09 2022 liuxinhao <liuxinhao@kylinsec.com.cn> - 1.24.1-12
- Apply the last submitted patch
* Thu Sep 08 2022 liuxinhao <liuxinhao@kylinsec.com.cn> - 1.24.1-11
- Fix the open terminal can not correct to terminal icon(#I5Q5ME)
* Fri Sep 02 2022 wangxiaoqing <wangxiaoqing@kylinsec.com.cn> - 1.24.1-10
- Add Chinese name translation to desktop files
* Fri Jul 29 2022 wangxiaoqing <wangxiaoqing@kylinsec.com.cn> - 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 <wangxiaoqing@kylinsec.com.cn> - 1.24.1-8
- Fix the file rename error msg too long

4
caja.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: mate-desktop/caja
tag_prefix: "^v"
separator: "."