!13 Optimize search tools Optimize startup window position and add some Chinese files

From: @xzyangha
Reviewed-by: @isoftljj
Signed-off-by: @isoftljj
This commit is contained in:
openeuler-ci-bot 2021-05-27 14:57:47 +08:00 committed by Gitee
commit 492855532e
5 changed files with 156 additions and 3 deletions

View File

@ -0,0 +1,85 @@
From 44ba536ad0b22b3f89799e99edcecbf9f84820d4 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Tue, 17 Mar 2020 14:38:42 +0800
Subject: [PATCH] add open terminal when clicking right key in desktop
---
po/zh_CN.po | 5 ++++
.../caja-desktop-icon-view-ui.xml | 1 +
src/file-manager/fm-desktop-icon-view.c | 25 +++++++++++++++++++
3 files changed, 31 insertions(+)
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 38cd51a..7f20991 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -3696,6 +3696,11 @@ msgstr "创建新启动器"
msgid "Change Desktop _Background"
msgstr "更改桌面背景(_B)"
+#. label, accelerator
+#: ../src/file-manager/fm-desktop-icon-view.c:778
+msgid "Open Terminal..."
+msgstr "打开终端"
+
#. tooltip
#: ../src/file-manager/fm-desktop-icon-view.c:774
msgid ""
diff --git a/src/file-manager/caja-desktop-icon-view-ui.xml b/src/file-manager/caja-desktop-icon-view-ui.xml
index d437801..5654e4c 100644
--- a/src/file-manager/caja-desktop-icon-view-ui.xml
+++ b/src/file-manager/caja-desktop-icon-view-ui.xml
@@ -9,6 +9,7 @@
</placeholder>
<placeholder name="After Zoom Items">
<placeholder name="Background Items">
+ <menuitem name="Open Terminal" action="Open Terminal"/>
<menuitem name="Change Background" action="Change Background"/>
</placeholder>
</placeholder>
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c
index 9205edc..fba954d 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -652,6 +652,22 @@ action_new_launcher_callback (GtkAction *action, gpointer data)
}
+action_open_terminal_callback (GtkAction *action, gpointer data)
+{
+ char *desktop_directory;
+
+ g_assert (FM_DIRECTORY_VIEW (data));
+
+ desktop_directory = caja_get_desktop_directory ();
+
+ caja_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (data)),
+ "Mate Terminal",
+ "mate-terminal",
+ FALSE,
+ NULL, desktop_directory, NULL);
+ g_free (desktop_directory);
+
+}
static void
action_change_background_callback (GtkAction *action,
gpointer data)
@@ -756,6 +772,15 @@ static const GtkActionEntry desktop_view_entries[] =
G_CALLBACK (action_new_launcher_callback)
},
/* name, stock id */
+ {
+ "Open Terminal", NULL,
+ /* label, accelerator */
+ N_("Open Terminal..."), NULL,
+ /* tooltip */
+ N_("Mate Terminal"),
+ G_CALLBACK (action_open_terminal_callback)
+ },
+ /* name, stock id */
{
"Change Background", NULL,
/* label, accelerator */
--
2.23.0

BIN
caja-1.22.2-6.isoft.src.rpm Normal file

Binary file not shown.

View File

@ -0,0 +1,30 @@
diff -Nuar caja-1.22.2/src/caja-navigation-window-menus.c caja-1.22.2-bak/src/caja-navigation-window-menus.c
--- caja-1.22.2/src/caja-navigation-window-menus.c 2019-09-18 00:09:37.000000000 +0800
+++ caja-1.22.2-bak/src/caja-navigation-window-menus.c 2021-04-07 10:43:38.712353814 +0800
@@ -28,7 +28,7 @@
#include <config.h>
#include <locale.h>
-
+#include <stdlib.h>
#include "caja-actions.h"
#include "caja-notebook.h"
#include "caja-navigation-action.h"
@@ -663,7 +663,7 @@
{
GtkAction *search_action;
CajaNavigationWindow *window;
-
+ system("mate-search-tool");
window = CAJA_NAVIGATION_WINDOW (user_data);
search_action =
@@ -688,7 +688,7 @@
gpointer user_data)
{
CajaNavigationWindow *window;
-
+ system("mate-search-tool");
/* This is used when toggling the action for updating the UI
state only, not actually activating the action */
if (g_object_get_data (G_OBJECT (action), "blocked") != NULL)

View File

@ -0,0 +1,26 @@
diff -Nuar caja-1.22.2/po/zh_CN.po caja-1.22.2-bak/po/zh_CN.po
--- caja-1.22.2/po/zh_CN.po 2021-04-07 10:59:11.408483382 +0800
+++ caja-1.22.2-bak/po/zh_CN.po 2021-04-07 11:08:40.512221984 +0800
@@ -5455,11 +5455,11 @@
#: ../src/file-manager/fm-properties-window.c:3309
msgid "Accessed:"
-msgstr "访问:"
+msgstr "访问日期:"
#: ../src/file-manager/fm-properties-window.c:3313
msgid "Modified:"
-msgstr "修改于:"
+msgstr "修改日期:"
#: ../src/file-manager/fm-properties-window.c:3322
msgid "Free space:"
@@ -5627,7 +5627,7 @@
#: ../src/file-manager/fm-properties-window.c:4795
msgid "Last changed:"
-msgstr "最后修改:"
+msgstr "删除日期:"
#: ../src/file-manager/fm-properties-window.c:4806
msgid "Apply Permissions to Enclosed Files"

View File

@ -16,7 +16,7 @@ Name: caja
Summary: File manager for MATE
Version: %{branch}.2
%if 0%{?rel_build}
Release: 3%{?dist}
Release: 6
%else
Release: 0.11%{?git_rel}%{?dist}
%endif
@ -35,6 +35,12 @@ Patch2: caja_0001-canvas-item-Don-t-hyphenate-filenames-1.22.patch
Patch3: 0001-caja-po-translation.patch
Patch4: 0001-add-open-terminal-when-clicking-right-key-in-desktop.patch
Patch5: caja-1.22.2-mate-search-tool.patch
Patch6: caja-1.22.2-trash-translate.patch
BuildRequires: dbus-glib-devel
BuildRequires: desktop-file-utils
BuildRequires: exempi-devel
@ -52,12 +58,12 @@ BuildRequires: libnotify-devel
Requires: gamin
Requires: filesystem
#Requires: isoft-menus
Requires: isoft-menus
Requires: gvfs
# the main binary links against libcaja-extension.so
# don't depend on soname, rather on exact version
#Requires: %{name}-extensions-common
Requires: %{name}-extensions-common
# needed for using mate-text-editor as stanalone in another DE
Requires: %{name}-schemas%{?_isa} = %{version}-%{release}
@ -190,6 +196,12 @@ EOF
%changelog
* Thu May 27 2021 xianzhao Yang <xianzhao.yang@i-soft.com.cn> - 1.22.6
- Optimize search tools Optimize startup window position and add some Chinese files
* Mon Fri 15 2021 xianzhao Yang <xianzhao.yang@i-soft.com.cn> - 1.22.3
- Sinicization file
* Fri Nov 22 2019 Wolfgang Ulbrich <fedora@raveit.de> - 1.22.2-2
- https://github.com/mate-desktop/caja/commit/ea81a5
- Don't hyphenate filenames with pango-1.44