avatar
Rosa has added 1185a585ca
initial: add from SRPM
... ... --- /dev/null
... ... +++ b/.abf.yml
... ... @@ -0,0 +1,2 @@
1
sources:
2
  "notification-daemon-engine-nodoka-0.1.0.tar.gz": 57030a6b85c16bebdb319593923b8dd4b747e84b
view file @ 1185a585ca
... ... --- /dev/null
... ... +++ b/notification-daemon-engine-nodoka-0.1.0-version-check.patch
... ... @@ -0,0 +1,13 @@
1
diff -up notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.version-check notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c
2
--- notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.version-check	2008-11-23 13:20:45.000000000 +0100
3
+++ notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c	2008-11-23 13:21:50.000000000 +0100
4
@@ -614,8 +614,7 @@ theme_check_init(unsigned int major_ver,
5
 				 unsigned int micro_ver)
6
 {
7
 	return major_ver == 0 &&
8
-	       minor_ver == 3 &&
9
-	       micro_ver >= 2;
10
+	       (minor_ver > 3 || (minor_ver == 3 && micro_ver >= 2));
11
 }
12
 
13
 /* Sending theme info to the notification daemon */
view file @ 1185a585ca
... ... --- /dev/null
... ... +++ b/notification-daemon-engine-nodoka-base-color.patch
... ... @@ -0,0 +1,56 @@
1
diff -up notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.base-color notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c
2
--- notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.base-color	2009-06-20 08:51:58.000000000 +0200
3
+++ notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c	2009-06-20 09:00:55.000000000 +0200
4
@@ -346,11 +346,26 @@ fill_background(GtkWidget *widget, Windo
5
 	else
6
 		alpha = 1.0;
7
 
8
+	GtkStyle *style = gtk_widget_get_style(widget);
9
+	GdkColor *background_color = &style->base[GTK_STATE_NORMAL];
10
 	cairo_pattern_t *pattern;
11
 	pattern = cairo_pattern_create_linear (0, 0, 0, windata->height);
12
-	cairo_pattern_add_color_stop_rgba (pattern, 0, 0.996, 0.996, 0.89, alpha);
13
-	cairo_pattern_add_color_stop_rgba (pattern, GRADIENT_CENTER, 0.988, 0.988, 0.714, alpha);
14
-	cairo_pattern_add_color_stop_rgba (pattern, 1, 0.984, 0.984, 0.663, alpha);
15
+	cairo_pattern_add_color_stop_rgba (pattern, 0, 
16
+					   background_color->red / 65535.0, 
17
+					   background_color->green / 65535.0, 
18
+					   background_color->blue / 65535.0, 
19
+					   alpha);
20
+	cairo_pattern_add_color_stop_rgba (pattern, GRADIENT_CENTER, 
21
+					   background_color->red / 65535.0 * 0.80, 
22
+					   background_color->green / 65535.0 * 0.80, 
23
+					   background_color->blue / 65535.0 * 0.80, 
24
+					   alpha);
25
+
26
+	cairo_pattern_add_color_stop_rgba (pattern, 1, 
27
+					   background_color->red / 65535.0 * 0.74, 
28
+					   background_color->green / 65535.0 * 0.74, 
29
+					   background_color->blue / 65535.0 * 0.74, 
30
+					   alpha);
31
 	cairo_set_source (cr, pattern);
32
 	cairo_pattern_destroy (pattern);
33
 	
34
@@ -453,10 +468,20 @@ draw_border(GtkWidget *widget, WindowDat
35
 	else
36
 		alpha = 1.0;
37
 
38
+	GtkStyle *style = gtk_widget_get_style(widget);
39
+	GdkColor *background_color = &style->base[GTK_STATE_NORMAL];
40
 	cairo_pattern_t *pattern;
41
 	pattern = cairo_pattern_create_linear (0, 0, 0, windata->height);
42
-	cairo_pattern_add_color_stop_rgba (pattern, 0, 0.62, 0.584, 0.341, alpha);
43
-	cairo_pattern_add_color_stop_rgba (pattern, 1, 0.776, 0.757, 0.596, alpha);
44
+	cairo_pattern_add_color_stop_rgba (pattern, 0,
45
+					   background_color->red / 65535.0 * 0.38, 
46
+					   background_color->green / 65535.0 * 0.38, 
47
+					   background_color->blue / 65535.0 * 0.38, 
48
+					   alpha);
49
+	cairo_pattern_add_color_stop_rgba (pattern, 1,
50
+					   background_color->red / 65535.0 * 0.67, 
51
+					   background_color->green / 65535.0 * 0.67, 
52
+					   background_color->blue / 65535.0 * 0.67, 
53
+					   alpha);
54
 	cairo_set_source (cr, pattern);
55
 	cairo_pattern_destroy (pattern);
56
 	
view file @ 1185a585ca
... ... --- /dev/null
... ... +++ b/notification-daemon-engine-nodoka-clipping.patch
... ... @@ -0,0 +1,21 @@
1
diff -up notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.clipping notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c
2
--- notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.clipping	2008-04-20 11:50:24.000000000 +0200
3
+++ notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c	2008-07-16 22:07:24.000000000 +0200
4
@@ -672,7 +672,7 @@ create_notification(UrlClickedCb url_cli
5
 	gtk_window_set_title(GTK_WINDOW(win), "Notification");
6
 	gtk_widget_add_events(win, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
7
 	gtk_widget_realize(win);
8
-	gtk_widget_set_size_request(win, WIDTH, -1);
9
+//	gtk_widget_set_size_request(win, WIDTH, -1);
10
 
11
 	g_object_set_data_full(G_OBJECT(win), "windata", windata,
12
 						   (GDestroyNotify)destroy_windata);
13
@@ -819,7 +819,7 @@ set_notification_text(GtkWindow *nw, con
14
 	update_content_hbox_visibility(windata);
15
 
16
 	gtk_widget_set_size_request(
17
-		((body != NULL && *body == '\0')
18
+		((body != NULL && *body != '\0')
19
 		 ? windata->body_label : windata->summary_label),
20
 		WIDTH - (IMAGE_SIZE + IMAGE_PADDING) - 10,
21
 		-1);
view file @ 1185a585ca
... ... --- /dev/null
... ... +++ b/notification-daemon-engine-nodoka-rtl.patch
... ... @@ -0,0 +1,30 @@
1
diff -up notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.rtl notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c
2
--- notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.rtl	2008-12-27 13:00:10.000000000 +0100
3
+++ notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c	2008-12-27 13:06:27.000000000 +0100
4
@@ -73,6 +73,7 @@ typedef struct
5
 
6
 	UrlClickedCb url_clicked;
7
 
8
+	GtkTextDirection rtl;
9
 } WindowData;
10
 
11
 
12
@@ -367,7 +368,9 @@ static void
13
 draw_stripe(GtkWidget *widget, WindowData *windata, cairo_t *cr)
14
 {
15
 	cairo_save (cr);
16
-	cairo_rectangle (cr, 0, 0, STRIPE_WIDTH, windata->height);
17
+	cairo_rectangle (cr, (windata->rtl == GTK_TEXT_DIR_RTL) ? 
18
+	                     windata->width-STRIPE_WIDTH : 0, 0, 
19
+	                 STRIPE_WIDTH, windata->height);
20
 	cairo_clip (cr);
21
 
22
 	GdkColor top_color;
23
@@ -657,6 +660,7 @@ create_notification(UrlClickedCb url_cli
24
 	win = gtk_window_new(GTK_WINDOW_POPUP);
25
 	windata->win = win;
26
 
27
+	windata->rtl = gtk_widget_get_direction(win);
28
 	windata->enable_transparency = FALSE;
29
 	screen = gtk_window_get_screen(GTK_WINDOW(win));
30
 	colormap = gdk_screen_get_rgba_colormap(screen);
view file @ 1185a585ca
... ... --- /dev/null
... ... +++ b/notification-daemon-engine-nodoka-window-type.patch
... ... @@ -0,0 +1,13 @@
1
diff -up notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.window-type notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c
2
--- notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.window-type	2009-09-18 17:43:08.399713271 -0400
3
+++ notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c	2009-09-18 17:45:47.364444776 -0400
4
@@ -705,6 +705,9 @@ create_notification(UrlClickedCb url_cli
5
 	}
6
 
7
 	gtk_window_set_title(GTK_WINDOW(win), "Notification");
8
+	gtk_window_set_type_hint(GTK_WINDOW(win),
9
+				 GDK_WINDOW_TYPE_HINT_NOTIFICATION);
10
+
11
 	gtk_widget_add_events(win, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
12
 	gtk_widget_realize(win);
13
 //	gtk_widget_set_size_request(win, WIDTH, -1);
view file @ 1185a585ca
... ... --- /dev/null
... ... +++ b/notification-daemon-engine-nodoka.spec
... ... @@ -0,0 +1,79 @@
1
Name:           notification-daemon-engine-nodoka
2
Version:        0.1.0
3
Release:        %mkrel 4
4
Summary:        The Nodoka theme engine for the notification daemon
5
6
Group:          System/X11
7
License:        GPLv3+
8
URL:            https://nodoka.fedorahosted.org/
9
Source0:        https://fedorahosted.org/releases/n/o/nodoka/notification-daemon-engine-nodoka-%{version}.tar.gz
10
Patch0:         notification-daemon-engine-nodoka-clipping.patch
11
Patch1:         notification-daemon-engine-nodoka-0.1.0-version-check.patch
12
Patch2:         notification-daemon-engine-nodoka-rtl.patch
13
Patch3:         notification-daemon-engine-nodoka-base-color.patch
14
# drop libsexy dep
15
Patch4:		sexy.patch
16
Patch5:		notification-daemon-engine-nodoka-window-type.patch
17
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
18
19
BuildRequires:  gtk2-devel >= 2.17.1
20
BuildRequires:  libxml2-devel
21
BuildRequires:  autoconf automake libtool
22
Requires:       notification-daemon
23
24
%description
25
The Nodoka theme engine for the notification daemon.
26
27
28
%prep
29
%setup -q
30
%patch0 -p1 -b .clipping
31
%patch1 -p1 -b .version-check
32
%patch2 -p1 -b .rtl
33
%patch3 -p1 -b .base-color
34
%patch4 -p1 -b .sexy
35
%patch5 -p1 -b .window-type
36
37
autoreconf -i -f
38
39
%build
40
%configure2_5x
41
%make 
42
43
44
%install
45
rm -rf $RPM_BUILD_ROOT
46
%makeinstall_std
47
48
#remove .la files
49
find $RPM_BUILD_ROOT -name *.la | xargs rm -f || true
50
51
52
%clean
53
rm -rf $RPM_BUILD_ROOT
54
55
56
%files
57
%defattr(-,root,root,-)
58
%doc AUTHORS ChangeLog COPYING Credits NEWS README
59
%{_libdir}/notification-daemon-1.0/engines/libnodoka.so
60
61
62
63
%changelog
64
* Wed May 04 2011 Oden Eriksson <oeriksson@mandriva.com> 0.1.0-4mdv2011.0
65
+ Revision: 666621
66
- mass rebuild
67
68
* Fri Dec 03 2010 Oden Eriksson <oeriksson@mandriva.com> 0.1.0-3mdv2011.0
69
+ Revision: 606825
70
- rebuild
71
72
* Wed Mar 17 2010 Oden Eriksson <oeriksson@mandriva.com> 0.1.0-2mdv2010.1
73
+ Revision: 523442
74
- rebuilt for 2010.1
75
76
* Fri Sep 25 2009 Frederic Crozat <fcrozat@mandriva.com> 0.1.0-1mdv2010.0
77
+ Revision: 448825
78
- import notification-daemon-engine-nodoka
79
... ... --- /dev/null
... ... +++ b/sexy.patch
... ... @@ -0,0 +1,67 @@
1
diff -up notification-daemon-engine-nodoka-0.1.0/configure.ac.sexy notification-daemon-engine-nodoka-0.1.0/configure.ac
2
--- notification-daemon-engine-nodoka-0.1.0/configure.ac.sexy	2008-04-20 05:46:42.000000000 -0400
3
+++ notification-daemon-engine-nodoka-0.1.0/configure.ac	2009-07-02 00:45:44.654266038 -0400
4
@@ -40,12 +40,6 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.10.
5
 AC_SUBST(GTK_CFLAGS)
6
 AC_SUBST(GTK_LIBS)
7
 
8
-PKG_CHECK_MODULES(LIBSEXY, libsexy,,
9
-                   AC_MSG_ERROR([libsexy is required to compile nodoka]))
10
-
11
-AC_SUBST(LIBSEXY_CFLAGS)
12
-AC_SUBST(LIBSEXY_LIBS)
13
-
14
 AC_CONFIG_HEADERS([src/config.h])
15
 AC_CONFIG_FILES([Makefile src/Makefile])
16
 
17
diff -up notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.sexy notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c
18
--- notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c.sexy	2009-07-02 00:45:44.647264442 -0400
19
+++ notification-daemon-engine-nodoka-0.1.0/src/nodoka-theme.c	2009-07-21 10:55:05.596047665 -0400
20
@@ -25,7 +25,6 @@
21
 #include "config.h"
22
 
23
 #include <gtk/gtk.h>
24
-#include <libsexy/sexy-url-label.h>
25
 
26
 /* Define basic nodoka types */
27
 typedef void (*ActionInvokedCb)(GtkWindow *nw, const char *key);
28
@@ -660,6 +659,14 @@ get_theme_info(char **theme_name,
29
 	*homepage = g_strdup("https://nodoka.fedorahosted.org/");
30
 }
31
 
32
+static gboolean
33
+activate_link (GtkLabel *label, const char *url, WindowData *windata)
34
+{
35
+  windata->url_clicked (windata->win, url);
36
+
37
+  return TRUE;
38
+
39
+}
40
 /* Create new notification */
41
 GtkWindow *
42
 create_notification(UrlClickedCb url_clicked)
43
@@ -805,12 +812,12 @@ create_notification(UrlClickedCb url_cli
44
 	gtk_widget_show(vbox);
45
 	gtk_box_pack_start(GTK_BOX(windata->content_hbox), vbox, TRUE, TRUE, 0);
46
 
47
-	windata->body_label = sexy_url_label_new();
48
+	windata->body_label = gtk_label_new(NULL);
49
 	gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0);
50
 	gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0, 0);
51
 	gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE);
52
-	g_signal_connect_swapped(G_OBJECT(windata->body_label), "url_activated",
53
-							 G_CALLBACK(windata->url_clicked), win);
54
+	g_signal_connect(G_OBJECT(windata->body_label), "activate-link",
55
+                         G_CALLBACK(activate_link), windata);
56
 
57
 	atkobj = gtk_widget_get_accessible(windata->body_label);
58
 	atk_object_set_description(atkobj, "Notification body text.");
59
@@ -837,7 +844,7 @@ set_notification_text(GtkWindow *nw, con
60
 	gtk_label_set_markup(GTK_LABEL(windata->summary_label), str);
61
 	g_free(str);
62
 
63
-	sexy_url_label_set_markup(SEXY_URL_LABEL(windata->body_label), body);
64
+	gtk_label_set_markup (GTK_LABEL (windata->body_label), body);
65
 
66
 	if (body == NULL || *body == '\0')
67
 		gtk_widget_hide(windata->body_label);

Comments