!12 add autoreconf when build for build kiran theme and remove pie in kiran theme

From: @yuan__xing 
Reviewed-by: @tangjie02 
Signed-off-by: @tangjie02
This commit is contained in:
openeuler-ci-bot 2023-01-11 06:57:30 +00:00 committed by Gitee
commit bdc258121c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 153 additions and 1 deletions

View File

@ -0,0 +1,144 @@
From eca0ea6e009c6f4f1edca2baa70004b217a533a2 Mon Sep 17 00:00:00 2001
From: yuanxing <yuanxing@kylinos.com.cn>
Date: Wed, 7 Dec 2022 11:08:08 +0800
Subject: [PATCH] fix(kiran):remove pie draw in kiran
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在kiran主题中去除饼图倒计时功能
---
src/themes/kiran/kiran.c | 91 ----------------------------------------
1 file changed, 91 deletions(-)
diff --git a/src/themes/kiran/kiran.c b/src/themes/kiran/kiran.c
index 7f6b9b1..b7ba1cd 100644
--- a/src/themes/kiran/kiran.c
+++ b/src/themes/kiran/kiran.c
@@ -200,27 +200,6 @@ fill_background_when_pointer_enter(GtkWidget *widget, WindowData *windata, cairo
cairo_fill(cr);
}
-static void
-draw_pie(GtkWidget *pie, WindowData *windata, cairo_t *cr)
-{
- if (windata->timeout == 0)
- return;
-
- gdouble arc_angle = 1.0 - (gdouble)windata->remaining / (gdouble)windata->timeout;
- cairo_set_source_rgba(cr,
- 92 / 255.0,
- 92 / 255.0,
- 92 / 255.0, 1);
- cairo_move_to(cr, PIE_RADIUS, PIE_RADIUS);
- cairo_arc_negative(cr,
- PIE_RADIUS, PIE_RADIUS,
- PIE_RADIUS,
- -G_PI / 2, (-0.25 + arc_angle) * 2 * G_PI);
- cairo_line_to(cr, PIE_RADIUS, PIE_RADIUS);
-
- cairo_fill(cr);
-}
-
static void
update_shape_region(cairo_surface_t *surface,
WindowData *windata)
@@ -354,52 +333,6 @@ on_draw(GtkWidget *widget, cairo_t *cr, WindowData *windata)
return FALSE;
}
-static gboolean
-countdown_expose_cb(GtkWidget *pie,
- cairo_t *cr,
- WindowData *windata)
-{
- cairo_t *cr2;
- cairo_surface_t *surface;
- GtkAllocation alloc;
-
- cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
-
- gtk_widget_get_allocation(pie, &alloc);
-
- surface = cairo_surface_create_similar(cairo_get_target(cr),
- CAIRO_CONTENT_COLOR_ALPHA,
- alloc.width,
- alloc.height);
-
- cr2 = cairo_create(surface);
-
- cairo_translate(cr2, -alloc.x, -alloc.y);
-
- GtkStateFlags flags = gtk_widget_get_state_flags(windata->win);
- if (flags & GTK_STATE_FLAG_PRELIGHT)
- {
- fill_background_when_pointer_enter(pie, windata, cr2);
- }
- else
- {
- fill_background(pie, windata, cr2);
- }
- cairo_translate(cr2, alloc.x, alloc.y);
- draw_pie(pie, windata, cr2);
- cairo_fill(cr2);
-
- cairo_destroy(cr2);
-
- cairo_save(cr);
- cairo_set_source_surface(cr, surface, 0, 0);
- cairo_paint(cr);
- cairo_restore(cr);
-
- cairo_surface_destroy(surface);
- return TRUE;
-}
-
static gboolean
on_configure_event(GtkWidget *widget, GdkEventConfigure *event, WindowData *windata)
{
@@ -766,19 +699,6 @@ void add_notification_action(GtkWindow *nw,
if (gtk_widget_get_visible(windata->actions_box))
{
gtk_widget_show(windata->actions_box);
- /* Don't try to re-add a pie_countdown */
- if (!windata->pie_countdown)
- {
- windata->pie_countdown = gtk_drawing_area_new();
- gtk_widget_set_halign(windata->pie_countdown, GTK_ALIGN_END);
- gtk_widget_set_valign(windata->pie_countdown, GTK_ALIGN_END);
- gtk_widget_show(windata->pie_countdown);
-
- gtk_box_pack_end(GTK_BOX(windata->actions_box), windata->pie_countdown, FALSE, FALSE, 0);
- gtk_widget_set_size_request(windata->pie_countdown, PIE_WIDTH, PIE_HEIGHT);
- g_signal_connect(G_OBJECT(windata->pie_countdown), "draw",
- G_CALLBACK(countdown_expose_cb), windata);
- }
}
if (windata->action_icons)
@@ -846,8 +766,6 @@ void clear_notification_actions(GtkWindow *nw)
{
WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
- windata->pie_countdown = NULL;
-
gtk_widget_hide(windata->actions_box);
gtk_container_foreach(GTK_CONTAINER(windata->actions_box),
(GtkCallback)gtk_widget_destroy, NULL);
@@ -916,13 +834,4 @@ void notification_tick(GtkWindow *nw, glong remaining)
{
WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
windata->remaining = remaining;
-
- if (windata->pie_countdown != NULL)
- {
- gtk_widget_queue_draw_area(windata->pie_countdown,
- 0,
- 0,
- PIE_WIDTH,
- PIE_HEIGHT);
- }
}
--
2.36.1

View File

@ -15,7 +15,7 @@
Name: mate-notification-daemon
Version: %{branch}.1
%if 0%{?rel_build}
Release: 2
Release: 4
%else
Release: 0.13%{?git_rel}
%endif
@ -46,6 +46,7 @@ Patch1014: 0001-fix-kiran-theme-Remove-the-blue-border-when-the-mous-e49594
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
Patch1018: 0001-fix-kiran-remove-pie-draw-in-kiran.patch
BuildRequires: desktop-file-utils
BuildRequires: libcanberra-devel
@ -74,6 +75,7 @@ NOCONFIGURE=1 ./autogen.sh
%endif # 0%{?rel_build}
%build
autoreconf -i -f
%configure --disable-schemas-compile
make %{?_smp_mflags} V=1
@ -109,6 +111,12 @@ rm -f %{buildroot}%{_datadir}/applications/mate-notification-daemon.desktop
%changelog
* Tue Jun 10 2023 yuanxing <yuanxing@kylinsec.com.cn> - 1.22.1-4
- KYOS-F: remove pie in kiran theme
* Wed Aug 24 2022 liuxinhao <liuxinhao@kylinsec.com.cn> - 1.22.1-3
- KYOS-F: autoreconf before the build phase
* 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)