!6 Add some patches

From: @longcheng01 
Reviewed-by: @yueyaoqiang 
Signed-off-by: @yueyaoqiang
This commit is contained in:
openeuler-ci-bot 2022-07-15 02:32:59 +00:00 committed by Gitee
commit 872460ec5f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
18 changed files with 3393 additions and 2 deletions

View File

@ -0,0 +1,24 @@
From 8a44e6f8f73784553d6171ff6f7cb20340089ba5 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Thu, 9 Jul 2020 19:49:08 +0800
Subject: [PATCH] add X-System-Server in categories
---
src/capplet/mate-notification-properties.desktop.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/capplet/mate-notification-properties.desktop.in b/src/capplet/mate-notification-properties.desktop.in
index acdec6b..b601603 100644
--- a/src/capplet/mate-notification-properties.desktop.in
+++ b/src/capplet/mate-notification-properties.desktop.in
@@ -6,6 +6,6 @@ Icon=mate-notification-properties
Terminal=false
Type=Application
StartupNotify=true
-Categories=GTK;Settings;DesktopSettings;X-System-Server;
+Categories=GTK;Settings;DesktopSettings;X-System-Server;X-System-Server;
OnlyShowIn=MATE;
Keywords=MATE;Notification;Theme;
--
2.18.1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
From e495941ce3f0f68490cbee0c66c0bbfd23fb4a77 Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Tue, 25 May 2021 15:24:35 +0800
Subject: [PATCH] fix(kiran theme):Remove the blue border when the mouse enters
the message box
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 当鼠标进入消息框时去掉蓝色边框效果
---
src/themes/kiran/kiran.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/themes/kiran/kiran.c b/src/themes/kiran/kiran.c
index 732cb2e..7f6b9b1 100644
--- a/src/themes/kiran/kiran.c
+++ b/src/themes/kiran/kiran.c
@@ -321,15 +321,6 @@ paint_window_when_pointer_enter(GtkWidget *widget,
fill_background_when_pointer_enter(widget, windata, cr2);
cairo_fill(cr2);
- rounded_rectangle(cr2, 0, 0, windata->width, windata->height, 8);
- cairo_set_source_rgba(cr2,
- 40 / 255.0,
- 144 / 255.0,
- 216 / 255.0,
- 1.0);
- cairo_set_line_width(cr2, 4.0);
- cairo_stroke(cr2);
-
cairo_destroy(cr2);
cairo_save(cr);
--
2.27.0

View File

@ -0,0 +1,27 @@
From e20b79092905b16a46643d7a649ab500a05dc541 Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Mon, 20 Jul 2020 17:16:21 +0800
Subject: [PATCH] fix: move mate-notification-properties from menus
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将mate-notification-properties从开始菜单中移除
Fixes #28100
---
src/capplet/mate-notification-properties.desktop.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/capplet/mate-notification-properties.desktop.in b/src/capplet/mate-notification-properties.desktop.in
index b601603..42a3a84 100644
--- a/src/capplet/mate-notification-properties.desktop.in
+++ b/src/capplet/mate-notification-properties.desktop.in
@@ -9,3 +9,4 @@ StartupNotify=true
Categories=GTK;Settings;DesktopSettings;X-System-Server;X-System-Server;
OnlyShowIn=MATE;
Keywords=MATE;Notification;Theme;
+X-KIRAN-NoDisplay=true
--
2.18.1

View File

@ -0,0 +1,25 @@
From 5d4603c894e260e9f98553c5ede7f5e197efa195 Mon Sep 17 00:00:00 2001
From: mazhiguo <mazhiguo@kylinos.com.cn>
Date: Wed, 4 Sep 2019 23:44:46 -0400
Subject: [PATCH] mate notification daemon change bottom_right
---
data/org.mate.NotificationDaemon.gschema.xml.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/org.mate.NotificationDaemon.gschema.xml.in b/data/org.mate.NotificationDaemon.gschema.xml.in
index c3c615b..fdac60a 100644
--- a/data/org.mate.NotificationDaemon.gschema.xml.in
+++ b/data/org.mate.NotificationDaemon.gschema.xml.in
@@ -1,7 +1,7 @@
<schemalist gettext-domain="@GETTEXT_PACKAGE@">
<schema id="org.mate.NotificationDaemon" path="/org/mate/notification-daemon/">
<key name="popup-location" type="s">
- <default>'top_right'</default>
+ <default>'bottom_right'</default>
<summary>Popup location</summary>
<description>Default popup location on the workspace for stack notifications. Allowed values: "top_left","top_right","bottom_left" and "bottom_right"</description>
</key>
--
2.18.1

View File

@ -0,0 +1,24 @@
From f4a306b98e0cf730ab60cc3ec198676f328aa2d2 Mon Sep 17 00:00:00 2001
From: zhudongbo <zhudongbo@kylinos.com.cn>
Date: Thu, 19 Sep 2019 10:44:26 +0800
Subject: [PATCH] notification modify categories
---
src/capplet/mate-notification-properties.desktop.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/capplet/mate-notification-properties.desktop.in b/src/capplet/mate-notification-properties.desktop.in
index 5a90f57..acdec6b 100644
--- a/src/capplet/mate-notification-properties.desktop.in
+++ b/src/capplet/mate-notification-properties.desktop.in
@@ -6,6 +6,6 @@ Icon=mate-notification-properties
Terminal=false
Type=Application
StartupNotify=true
-Categories=GTK;Settings;DesktopSettings;
+Categories=GTK;Settings;DesktopSettings;X-System-Server;
OnlyShowIn=MATE;
Keywords=MATE;Notification;Theme;
--
1.8.3.1

View File

@ -0,0 +1,120 @@
From 725faa6b7345e364dd46b80b8dd1ffdc96ae3870 Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Fri, 22 Jan 2021 17:12:46 +0800
Subject: [PATCH 2/9] fix(UI):improve css style of notification window
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 完善消息框界面
---
src/themes/kiran/data/kiran.css | 23 ++++++++++++++++++-----
src/themes/kiran/kiran.c | 9 +++++----
2 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/src/themes/kiran/data/kiran.css b/src/themes/kiran/data/kiran.css
index 2f9123e..0e00f1c 100644
--- a/src/themes/kiran/data/kiran.css
+++ b/src/themes/kiran/data/kiran.css
@@ -18,11 +18,12 @@
#actions_label
{
color: #3197de;
- font-size: 12px;
- font-family: "PingFang SC Medium";
+ font-size: 11px;
+ font-family: "Noto Sans CJK SC regular";
+ padding: 0px;
+ text-shadow: none;
}
-
/*********************Button****************************/
#actions_button,#actions_hbox
@@ -30,6 +31,7 @@
padding:0px;
box-shadow:none;
margin:0px;
+ border: none;
}
#actions_button:hover
@@ -73,7 +75,6 @@
#main_hbox
{
- /* background-color: yellow; */
margin-right: 14px;
margin-bottom: 12px;
}
@@ -87,5 +88,17 @@
#text_vbox ,#action_vbox
{
- margin-top: 16px;
+ margin-top: 12px;
+}
+
+
+#action_vbox
+{
+ border: none;
+}
+
+
+#actions_box
+{
+ margin-right: 2px;
}
diff --git a/src/themes/kiran/kiran.c b/src/themes/kiran/kiran.c
index 9181e20..a99af72 100644
--- a/src/themes/kiran/kiran.c
+++ b/src/themes/kiran/kiran.c
@@ -93,7 +93,7 @@ void set_notification_hints(GtkWindow *nw, GVariant *hints);
void notification_tick(GtkWindow *nw, glong remaining);
#define STRIPE_WIDTH 32
-#define WIDTH 270
+#define WIDTH 380
#define IMAGE_SIZE 32
#define IMAGE_PADDING 10
#define SPACER_LEFT 30
@@ -160,7 +160,7 @@ fill_background(GtkWidget *widget, WindowData *windata, cairo_t *cr)
cairo_pattern_destroy (pattern);
nodoka_rounded_rectangle (cr, 0, 0, windata->width,
- windata->height, 6);
+ windata->height, 8);
cairo_fill (cr);
}
@@ -555,6 +555,7 @@ create_notification(UrlClickedCb url_clicked)
set_css(windata->win);
gtk_widget_set_name(windata->win , "notification_window");
+ gtk_widget_set_size_request(windata->win , WIDTH,70);
windata->rtl = gtk_widget_get_default_direction();
windata->composited = FALSE;
screen = gtk_window_get_screen(GTK_WINDOW(win));
@@ -598,7 +599,7 @@ create_notification(UrlClickedCb url_clicked)
gtk_widget_set_halign (windata->main_hbox, GTK_ALIGN_START);
gtk_widget_set_valign (windata->main_hbox, GTK_ALIGN_START);
gtk_widget_show (windata->main_hbox);
- gtk_box_pack_start (GTK_BOX(main_vbox), windata->main_hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX(main_vbox), windata->main_hbox, FALSE, TRUE, 0);
/* The icon goes at the left */
windata->iconbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
@@ -726,7 +727,7 @@ set_notification_text(GtkWindow *nw, const char *summary, const char *body)
gtk_widget_set_size_request(
((body != NULL && *body != '\0')
? windata->body_label : windata->summary_label),
- WIDTH - (IMAGE_SIZE + IMAGE_PADDING) - 10,
+ WIDTH - (IMAGE_SIZE + IMAGE_PADDING) - 60,
-1);
}
--
2.27.0

View File

@ -0,0 +1,110 @@
From 19276cbc3d1b205354390e75b209a521c098e8d0 Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Fri, 22 Jan 2021 18:33:56 +0800
Subject: [PATCH 3/9] fix(UI):set the text box fill the extra space in window
when text is short
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 当文字很短时,将中间文字控件占满窗口额外的空间
Realated #33420
---
src/themes/kiran/data/kiran.css | 7 +++++++
src/themes/kiran/kiran.c | 20 +++++++++++---------
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/themes/kiran/data/kiran.css b/src/themes/kiran/data/kiran.css
index 0e00f1c..b85dc2f 100644
--- a/src/themes/kiran/data/kiran.css
+++ b/src/themes/kiran/data/kiran.css
@@ -95,10 +95,17 @@
#action_vbox
{
border: none;
+ background-color: red;
}
#actions_box
{
margin-right: 2px;
+ background-color: purple;
}
+
+#text_vbox
+{
+ background-color: seagreen;
+}
\ No newline at end of file
diff --git a/src/themes/kiran/kiran.c b/src/themes/kiran/kiran.c
index a99af72..ac8d471 100644
--- a/src/themes/kiran/kiran.c
+++ b/src/themes/kiran/kiran.c
@@ -94,13 +94,13 @@ void notification_tick(GtkWindow *nw, glong remaining);
#define STRIPE_WIDTH 32
#define WIDTH 380
-#define IMAGE_SIZE 32
-#define IMAGE_PADDING 10
+#define IMAGE_SIZE 48
+#define IMAGE_PADDING 12
#define SPACER_LEFT 30
#define PIE_RADIUS 7
#define PIE_WIDTH (2 * PIE_RADIUS)
#define PIE_HEIGHT (2 * PIE_RADIUS)
-#define BODY_X_OFFSET (IMAGE_SIZE + 8)
+#define BODY_X_OFFSET (IMAGE_SIZE + 24)
#define DEFAULT_ARROW_OFFSET (SPACER_LEFT + 12)
#define DEFAULT_ARROW_HEIGHT 14
#define DEFAULT_ARROW_WIDTH 22
@@ -596,10 +596,10 @@ create_notification(UrlClickedCb url_clicked)
windata->main_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_name(windata->main_hbox , "main_hbox");
- gtk_widget_set_halign (windata->main_hbox, GTK_ALIGN_START);
+ gtk_widget_set_halign (windata->main_hbox, GTK_ALIGN_FILL);
gtk_widget_set_valign (windata->main_hbox, GTK_ALIGN_START);
gtk_widget_show (windata->main_hbox);
- gtk_box_pack_start (GTK_BOX(main_vbox), windata->main_hbox, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX(main_vbox), windata->main_hbox, TRUE, TRUE, 0);
/* The icon goes at the left */
windata->iconbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
@@ -616,9 +616,10 @@ create_notification(UrlClickedCb url_clicked)
/* The title and the text at the right */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_name(vbox , "text_vbox");
- gtk_widget_set_halign (vbox, GTK_ALIGN_START);
+ gtk_widget_set_halign (vbox, GTK_ALIGN_FILL);
gtk_widget_show (vbox);
- gtk_box_pack_start (GTK_BOX (windata->main_hbox), vbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (windata->main_hbox), vbox, TRUE, TRUE, 0);
+ gtk_widget_set_hexpand (vbox, TRUE);
/* Add action_vbox*/
@@ -681,7 +682,7 @@ create_notification(UrlClickedCb url_clicked)
gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR);
gtk_label_set_max_width_chars (GTK_LABEL (windata->body_label), 50);
- gtk_widget_set_vexpand (windata->body_label, FALSE);
+ gtk_widget_set_vexpand (windata->body_label, TRUE);
g_signal_connect(G_OBJECT(windata->body_label), "activate-link",
G_CALLBACK(activate_link), windata);
@@ -727,8 +728,9 @@ set_notification_text(GtkWindow *nw, const char *summary, const char *body)
gtk_widget_set_size_request(
((body != NULL && *body != '\0')
? windata->body_label : windata->summary_label),
- WIDTH - (IMAGE_SIZE + IMAGE_PADDING) - 60,
+ WIDTH - (IMAGE_SIZE + IMAGE_PADDING*2) -40,
-1);
+
}
/* Set notification icon */
--
2.27.0

View File

@ -0,0 +1,43 @@
From 7e52eef1c3f19da057a93b1b2268c16c16e9a5df Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Fri, 22 Jan 2021 18:39:20 +0800
Subject: [PATCH 4/9] fix(ui):delete some unuseful code
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 删除一些没用的文字
---
src/themes/kiran/data/kiran.css | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/themes/kiran/data/kiran.css b/src/themes/kiran/data/kiran.css
index b85dc2f..c1017d2 100644
--- a/src/themes/kiran/data/kiran.css
+++ b/src/themes/kiran/data/kiran.css
@@ -91,21 +91,12 @@
margin-top: 12px;
}
-
#action_vbox
{
border: none;
- background-color: red;
}
-
#actions_box
{
margin-right: 2px;
- background-color: purple;
-}
-
-#text_vbox
-{
- background-color: seagreen;
}
\ No newline at end of file
--
2.27.0

View File

@ -0,0 +1,57 @@
From 017d2922f54cbc5b7caa05ae002d83ffdcffa9b4 Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Tue, 26 Jan 2021 23:55:56 +0800
Subject: [PATCH 5/9] fix:generate resource.mk file to ensure generate
gresource.h file
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 生成resource.mk文件确保能够编译生成gresource.h文件
---
src/themes/kiran/Makefile.am | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/themes/kiran/Makefile.am b/src/themes/kiran/Makefile.am
index fcb1626..c3f0494 100644
--- a/src/themes/kiran/Makefile.am
+++ b/src/themes/kiran/Makefile.am
@@ -8,21 +8,28 @@ GLIB_COMPILE_RESOURCE=glib-compile-resources
AM_CPPFLAGS = $(THEME_CFLAGS)
-gresource.c: $(RESOURCE_XML)
- $(GLIB_COMPILE_RESOURCE) --target $@ $< --generate --c-name kiran
+$(RESOURCE_XML): data/kiran.css data/icons/close_hover.svg data/icons/close_normal.svg data/icons/close_press.svg
+ @touch $@
gresource.h: $(RESOURCE_XML)
$(GLIB_COMPILE_RESOURCE) --target $@ $< --generate --c-name kiran
-libkiran_la_SOURCES = kiran.c gresource.c gresource.h
+gresource.c: $(RESOURCE_XML) gresource.h
+ $(GLIB_COMPILE_RESOURCE) --target $@ $< --generate --c-name kiran
+
+kiran.c: gresource.h
+
+libkiran_la_SOURCES = kiran.c
+nodist_libkiran_la_SOURCES=gresource.c
libkiran_la_LDFLAGS = -module -avoid-version -no-undefined
libkiran_la_LIBADD = \
$(THEME_LIBS) \
$(NULL)
+EXTRA_DIST = data/kiran.css data/icons/close_hover.svg data/icons/close_normal.svg data/icons/close_press.svg $(RESOURCE_XML)
+
-include $(top_srcdir)/git.mk
-.PHONY :clean
-clean:
- rm -f gresource.c gresource.h
\ No newline at end of file
+clean-local:
+ rm -f gresource.h gresource.c
--
2.27.0

View File

@ -0,0 +1,72 @@
From 89a7d9a149cf2902723df154479fb184eea26e4d Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Wed, 27 Jan 2021 14:16:12 +0800
Subject: [PATCH 6/9] fix(themes):change the default theme to kiran
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将默认的消息主题修改为kiran
---
data/org.mate.NotificationDaemon.gschema.xml.in | 2 +-
src/capplet/mate-notification-properties.c | 10 +++++-----
src/themes/kiran/kiran.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/data/org.mate.NotificationDaemon.gschema.xml.in b/data/org.mate.NotificationDaemon.gschema.xml.in
index fdac60a..c5c4009 100644
--- a/data/org.mate.NotificationDaemon.gschema.xml.in
+++ b/data/org.mate.NotificationDaemon.gschema.xml.in
@@ -16,7 +16,7 @@
<description>Monitor to display the notification. Allowed values: -1 (display on active monitor) and 0 to n - 1 where n is the number of monitors.</description>
</key>
<key name="theme" type="s">
- <default>'nodoka'</default>
+ <default>'kiran'</default>
<summary>Current theme</summary>
<description>The theme used when displaying notifications.</description>
</key>
diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c
index 09b6643..42066b0 100644
--- a/src/capplet/mate-notification-properties.c
+++ b/src/capplet/mate-notification-properties.c
@@ -324,7 +324,11 @@ static void notification_properties_dialog_setup_themes(NotificationAppletDialog
theme_name = get_theme_name(filename);
/* FIXME: other solution than hardcode? */
- if (g_str_equal(theme_name, "coco"))
+ if(g_str_equal(theme_name, "kiran"))
+ {
+ theme_label = g_strdup(_("Kiran"));
+ }
+ else if (g_str_equal(theme_name, "coco"))
{
theme_label = g_strdup(_("Coco"));
}
@@ -340,10 +344,6 @@ static void notification_properties_dialog_setup_themes(NotificationAppletDialog
{
theme_label = g_strdup(_("Standard theme"));
}
- else if (g_str_equal(theme_name, "kiran"))
- {
- theme_label = g_strdup(_("Kiran"));
- }
else
{
theme_label = g_strdup(theme_name);
diff --git a/src/themes/kiran/kiran.c b/src/themes/kiran/kiran.c
index ac8d471..165b03c 100644
--- a/src/themes/kiran/kiran.c
+++ b/src/themes/kiran/kiran.c
@@ -728,7 +728,7 @@ set_notification_text(GtkWindow *nw, const char *summary, const char *body)
gtk_widget_set_size_request(
((body != NULL && *body != '\0')
? windata->body_label : windata->summary_label),
- WIDTH - (IMAGE_SIZE + IMAGE_PADDING*2) -40,
+ WIDTH - (IMAGE_SIZE + IMAGE_PADDING*2) -80,
-1);
}
--
2.27.0

View File

@ -0,0 +1,26 @@
From 0fa4d5baaad75c311dc3d69ebe68ad529e23c7e3 Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Wed, 27 Jan 2021 14:36:28 +0800
Subject: [PATCH 7/9] fix(themes):change the first option to kiran in
mate-notification-properties
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在mate-notification-properties中修改第一个主题选项为kiran
---
src/themes/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/themes/Makefile.am b/src/themes/Makefile.am
index 99df82a..645c3ff 100644
--- a/src/themes/Makefile.am
+++ b/src/themes/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = coco nodoka slider standard kiran
+SUBDIRS = kiran coco nodoka slider standard
-include $(top_srcdir)/git.mk
--
2.27.0

View File

@ -0,0 +1,220 @@
From 3f451b70099b93ff46d7b91dc4ddfa4541ac8646 Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Thu, 28 Jan 2021 10:49:44 +0800
Subject: [PATCH 8/9] fix(theme):adjust the code indent and remove the useless
code
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 调整代码缩进,并且去掉无用的代码
---
src/themes/kiran/kiran.c | 101 ++++++++++++++++-----------------------
1 file changed, 42 insertions(+), 59 deletions(-)
diff --git a/src/themes/kiran/kiran.c b/src/themes/kiran/kiran.c
index 165b03c..7858d52 100644
--- a/src/themes/kiran/kiran.c
+++ b/src/themes/kiran/kiran.c
@@ -127,7 +127,7 @@ destroy_windata(WindowData *windata)
/* Draw fuctions */
/* Standard rounded rectangle */
static void
-nodoka_rounded_rectangle (cairo_t * cr,
+rounded_rectangle (cairo_t * cr,
double x, double y, double w, double h,
int radius)
{
@@ -159,7 +159,7 @@ fill_background(GtkWidget *widget, WindowData *windata, cairo_t *cr)
cairo_set_source (cr, pattern);
cairo_pattern_destroy (pattern);
- nodoka_rounded_rectangle (cr, 0, 0, windata->width,
+ rounded_rectangle (cr, 0, 0, windata->width,
windata->height, 8);
cairo_fill (cr);
@@ -189,7 +189,7 @@ fill_background_when_pointer_enter(GtkWidget *widget, WindowData *windata, cairo
cairo_set_source (cr, pattern);
cairo_pattern_destroy (pattern);
- nodoka_rounded_rectangle (cr, 0, 0, windata->width,
+ rounded_rectangle (cr, 0, 0, windata->width,
windata->height, 8);
cairo_fill (cr);
@@ -311,8 +311,8 @@ paint_window_when_pointer_enter(GtkWidget *widget,
fill_background_when_pointer_enter(widget, windata, cr2);
cairo_fill (cr2);
-
- nodoka_rounded_rectangle (cr2, 0, 0, windata->width , windata->height, 8);
+
+ rounded_rectangle (cr2, 0, 0, windata->width , windata->height, 8);
cairo_set_source_rgba (cr2, 40/255.0, 144/255.0, 216/255.0, 1.0);
cairo_set_line_width (cr2, 4.0);
cairo_stroke (cr2);
@@ -340,7 +340,7 @@ static gboolean
on_draw (GtkWidget *widget, cairo_t *cr, WindowData *windata)
{
GtkStateFlags flags = gtk_widget_get_state_flags(windata->win);
- if (flags & GTK_STATE_FLAG_PRELIGHT)
+ if (flags & GTK_STATE_FLAG_PRELIGHT)
{
paint_window_when_pointer_enter(widget , cr , windata);
}
@@ -351,19 +351,6 @@ on_draw (GtkWidget *widget, cairo_t *cr, WindowData *windata)
return FALSE;
}
-static gboolean
-configure_event_cb(GtkWidget *nw,
- GdkEventConfigure *event,
- WindowData *windata)
-{
- windata->width = event->width;
- windata->height = event->height;
-
- gtk_widget_queue_draw(nw);
-
- return FALSE;
-}
-
static gboolean
countdown_expose_cb(GtkWidget *pie,
cairo_t *cr,
@@ -387,7 +374,7 @@ countdown_expose_cb(GtkWidget *pie,
cairo_translate (cr2, -alloc.x, -alloc.y);
GtkStateFlags flags = gtk_widget_get_state_flags(windata->win);
- if (flags & GTK_STATE_FLAG_PRELIGHT)
+ if (flags & GTK_STATE_FLAG_PRELIGHT)
{
fill_background_when_pointer_enter(pie, windata ,cr2);
}
@@ -433,44 +420,43 @@ static void on_composited_changed (GtkWidget* window, WindowData* windata)
*/
GdkFilterReturn event_filter(GdkXEvent *xevent, GdkEvent *event, gpointer userdata)
{
- XEvent *x_event = (XEvent*)xevent;
+ XEvent *x_event = (XEvent*)xevent;
XGenericEvent *general_event = (XGenericEvent*)x_event;
GtkWidget *window = GTK_WIDGET(userdata);
-
- switch(x_event->type) {
- case EnterNotify:
- gtk_widget_set_state_flags(window, GTK_STATE_FLAG_PRELIGHT, FALSE);
- gtk_widget_queue_draw(window);
- break;
- case LeaveNotify:
- gtk_widget_set_state_flags(window, gtk_widget_get_state_flags(window) & ~GTK_STATE_FLAG_PRELIGHT, TRUE);
- gtk_widget_queue_draw(window);
- break;
- case GenericEvent:
- do
- {
- if (general_event->evtype == EnterNotify) {
- gtk_widget_set_state_flags(window, GTK_STATE_FLAG_PRELIGHT, FALSE);
- gtk_widget_queue_draw(window);
- }
-
- if (general_event->evtype == LeaveNotify) {
- gtk_widget_set_state_flags(window, gtk_widget_get_state_flags(window) & ~GTK_STATE_FLAG_PRELIGHT, TRUE);
- gtk_widget_queue_draw(window);
- }
- }while(0);
- break;
- default:
- break;
- }
- return GDK_FILTER_CONTINUE;
+ switch(x_event->type) {
+ case EnterNotify:
+ gtk_widget_set_state_flags(window, GTK_STATE_FLAG_PRELIGHT, FALSE);
+ gtk_widget_queue_draw(window);
+ break;
+ case LeaveNotify:
+ gtk_widget_set_state_flags(window, gtk_widget_get_state_flags(window) & ~GTK_STATE_FLAG_PRELIGHT, TRUE);
+ gtk_widget_queue_draw(window);
+ break;
+ case GenericEvent:
+ do
+ {
+ if (general_event->evtype == EnterNotify) {
+ gtk_widget_set_state_flags(window, GTK_STATE_FLAG_PRELIGHT, FALSE);
+ gtk_widget_queue_draw(window);
+ }
+
+ if (general_event->evtype == LeaveNotify) {
+ gtk_widget_set_state_flags(window, gtk_widget_get_state_flags(window) & ~GTK_STATE_FLAG_PRELIGHT, TRUE);
+ gtk_widget_queue_draw(window);
+ }
+ }while(0);
+ break;
+ default:
+ break;
+ }
+ return GDK_FILTER_CONTINUE;
}
static void
on_realize(GtkWidget *widget , gpointer userdata )
{
- GdkWindow *window = gtk_widget_get_window(widget);
- gdk_window_add_filter(window, event_filter, widget);
+ GdkWindow *window = gtk_widget_get_window(widget);
+ gdk_window_add_filter(window, event_filter, widget);
}
@@ -513,7 +499,7 @@ get_theme_info(char **theme_name,
static void
set_css(GtkWidget* widget)
{
- GtkCssProvider *provider = gtk_css_provider_new ();
+ GtkCssProvider *provider = gtk_css_provider_new ();
gtk_css_provider_load_from_resource (provider, "/kiran/themes/kiran.css");
gtk_style_context_add_provider_for_screen (gtk_widget_get_screen(widget),
@@ -579,9 +565,6 @@ create_notification(UrlClickedCb url_clicked)
(GDestroyNotify)destroy_windata);
atk_object_set_role(gtk_widget_get_accessible(win), ATK_ROLE_ALERT);
- g_signal_connect(G_OBJECT(win), "configure_event",
- G_CALLBACK(configure_event_cb), windata);
-
main_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_name(main_vbox , "main_vbox");
gtk_widget_show(main_vbox);
@@ -681,7 +664,7 @@ create_notification(UrlClickedCb url_clicked)
gtk_label_set_yalign (GTK_LABEL (windata->body_label), 0.0);
gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR);
- gtk_label_set_max_width_chars (GTK_LABEL (windata->body_label), 50);
+ gtk_label_set_max_width_chars (GTK_LABEL (windata->body_label), 50);
gtk_widget_set_vexpand (windata->body_label, TRUE);
g_signal_connect(G_OBJECT(windata->body_label), "activate-link",
@@ -776,7 +759,7 @@ add_notification_action(GtkWindow *nw, const char *text, const char *key,
char *buf;
g_assert(windata != NULL);
-
+
if (gtk_widget_get_visible(windata->actions_box))
{
gtk_widget_show(windata->actions_box);
@@ -870,8 +853,8 @@ move_notification(GtkWidget *nw, int x, int y)
{
WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
g_assert(windata != NULL);
-
- gtk_window_move(GTK_WINDOW(nw), x, y);
+
+ gtk_window_move(GTK_WINDOW(nw), x, y);
}
--
2.27.0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
From 0ee639d8b071696adab45454713e7e3d497f5e7d Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Wed, 1 Dec 2021 11:40:57 +0800
Subject: [PATCH] fix(css):modify css error and improve style of kiran
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修改css文件的错误完善kiran主题样式
Related #46120
---
src/themes/kiran/data/kiran.css | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/themes/kiran/data/kiran.css b/src/themes/kiran/data/kiran.css
index c1017d2..f733834 100644
--- a/src/themes/kiran/data/kiran.css
+++ b/src/themes/kiran/data/kiran.css
@@ -12,7 +12,6 @@
color: #919191;
font-size: 12px;
font-family: "Noto Sans CJK SC regular";
- line-height12px;
}
#actions_label
@@ -32,11 +31,12 @@
box-shadow:none;
margin:0px;
border: none;
+ border-radius: 0px;
}
-
#actions_button:hover
{
border-bottom:1px solid #3197DE;
+ background-color: transparent;
}
#close_button
@@ -48,7 +48,7 @@
padding: 0px;
border: none;
margin: 0px;
- box-shadow: 0px;
+ border-radius: 0px;
}
#close_button:hover
@@ -70,13 +70,12 @@
{
margin: 0px;
padding: 0px;
- box-shadow: 0px;
}
#main_hbox
{
- margin-right: 14px;
- margin-bottom: 12px;
+ margin-right: 14px;
+ margin-bottom: 12px;
}
#icon_box
--
2.27.0

View File

@ -0,0 +1,24 @@
From 5dc16c4150373c7e2614bf336d88d08a0a33f3a3 Mon Sep 17 00:00:00 2001
From: longcheng <longcheng@kylinos.com.cn>
Date: Fri, 14 Jan 2022 16:27:56 +0800
Subject: [PATCH] fix(control center): fix mate notification properties is not
displayed in the control panel (#48482)
---
src/capplet/mate-notification-properties.desktop.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/capplet/mate-notification-properties.desktop.in b/src/capplet/mate-notification-properties.desktop.in
index 42a3a84..ec49a9b 100644
--- a/src/capplet/mate-notification-properties.desktop.in
+++ b/src/capplet/mate-notification-properties.desktop.in
@@ -7,6 +7,5 @@ Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;Settings;DesktopSettings;X-System-Server;X-System-Server;
-OnlyShowIn=MATE;
Keywords=MATE;Notification;Theme;
X-KIRAN-NoDisplay=true
--
2.27.0

View File

@ -0,0 +1,30 @@
From f31d22fe7b500f9cb1f2eeed474056e3f86514dd Mon Sep 17 00:00:00 2001
From: XiaoWen <xiaowen@kylinos.com.cn>
Date: Wed, 29 Jun 2022 16:42:19 +0800
Subject: [PATCH] fix(daemon):return false while dbus proxy init failed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 当dbus接口初始化失败后返回错误
Signed-off-by: XiaoWen <xiaowen@kylinos.com.cn>
---
src/daemon/daemon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index 44572e3..18bd02e 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -1114,6 +1114,7 @@ static gboolean screensaver_active(GtkWidget* nw)
if (proxy == NULL) {
g_warning("Failed to get dbus connection: %s", error->message);
g_error_free (error);
+ return False;
}
variant = g_dbus_proxy_call_sync (proxy,
--
2.27.0

View File

@ -15,9 +15,9 @@
Name: mate-notification-daemon
Version: %{branch}.1
%if 0%{?rel_build}
Release: 1%{?dist}
Release: 2
%else
Release: 0.13%{?git_rel}%{?dist}
Release: 0.13%{?git_rel}
%endif
Summary: Notification daemon for MATE Desktop
License: GPLv2+
@ -29,6 +29,24 @@ URL: http://mate-desktop.org
# Source for snapshot-builds.
%{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}}
Patch1001: 0001-mate-notification-daemon-change-bottom_right.patch
Patch1002: 0001-notification-modify-categories-KY3.4.patch
Patch1003: 0001-add-X-System-Server-in-categories.patch
Patch1004: 0001-fix-move-mate-notification-properties-from-menus.patch
Patch1005: 0001-features-add-new-kiran-themes-in-mate-notification-p-507a6bf0.patch
Patch1006: 0002-fix-UI-improve-css-style-of-notification-window-725faa6b.patch
Patch1007: 0003-fix-UI-set-the-text-box-fill-the-extra-space-in-wind-19276cbc.patch
Patch1008: 0004-fix-ui-delete-some-unuseful-code-7e52eef1.patch
Patch1009: 0005-fix-generate-resource.mk-file-to-ensure-generate-gre-017d2922.patch
Patch1010: 0006-fix-themes-change-the-default-theme-to-kiran-89a7d9a1.patch
Patch1011: 0007-fix-themes-change-the-first-option-to-kiran-in-mate--0fa4d5ba.patch
Patch1012: 0008-fix-theme-adjust-the-code-indent-and-remove-the-usel-3f451b70.patch
Patch1013: 0009-fix-theme-change-the-indent-of-kiran.c-and-add-notes-c35de938.patch
Patch1014: 0001-fix-kiran-theme-Remove-the-blue-border-when-the-mous-e495941c.patch
Patch1015: 1015-fix-css-modify-css-error-and-improve-style-of-kiran-0ee639d8.patch
Patch1016: 1016-fix-control-center-fix-mate-notification-properties--5dc16c41.patch
Patch1017: 1017-fix-daemon-return-false-while-dbus-proxy-init-failed.patch
BuildRequires: desktop-file-utils
BuildRequires: libcanberra-devel
BuildRequires: libnotify-devel
@ -91,6 +109,17 @@ rm -f %{buildroot}%{_datadir}/applications/mate-notification-daemon.desktop
%changelog
* Fri Jul 08 2022 longcheng <longcheng@kylinos.com.cn> - 1.22.1-2
- KYOS-B: changed top_right to bottom_right
- KYOS-B: notification-modify-categories-KY3.4 (#20564)
- KYOS-F: add X-System-Server in Categories in mate-notification-properties.desktop file
- KYOS-F: fix-move-mate-notification-properties-from-menus (#28100)
- KYOS-F: add new kiran theme of notification (#33420)
- KYOS-F: Remove the blue border when the mouse enters the message box
- KYOS-F: modify css error and improve style of kiran (#46120)
- KYOS-F: fix mate notification properties is not displayed in the control panel (#48482)
- KYOS-F: Fix error while init DBus interface (#57298)
* Sat Sep 21 2019 Wolfgang Ulbrich <fedora@raveit.de> - 1.22.1-1
- update to 1.22.1