[Galago-commits] r2981 - in trunk/notification-daemon: .
src/themes/standard
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Sun Apr 29 02:39:34 PDT 2007
Author: chipx86
Date: 2007-04-29 02:39:32 -0700 (Sun, 29 Apr 2007)
New Revision: 2981
Modified:
trunk/notification-daemon/AUTHORS
trunk/notification-daemon/ChangeLog
trunk/notification-daemon/src/themes/standard/theme.c
Log:
Fix the close button size so that it's not stretched. This fixes (at least partially) bug #127. Patch by Luca Cavelli.
Modified: trunk/notification-daemon/AUTHORS
===================================================================
--- trunk/notification-daemon/AUTHORS 2007-04-29 08:04:54 UTC (rev 2980)
+++ trunk/notification-daemon/AUTHORS 2007-04-29 09:39:32 UTC (rev 2981)
@@ -9,6 +9,7 @@
Pawel Worach <pawel.worach at gmail.com>
Rodney Dawes <dobey at novell.com>
driehuis at playbeing.org
+ Luca Cavelli <luca.cavelli at gmail.com>
Translators:
Dutch - Wouter Bolsterlee <uws+gnome at xs4all.nl>
Modified: trunk/notification-daemon/ChangeLog
===================================================================
--- trunk/notification-daemon/ChangeLog 2007-04-29 08:04:54 UTC (rev 2980)
+++ trunk/notification-daemon/ChangeLog 2007-04-29 09:39:32 UTC (rev 2981)
@@ -1,3 +1,9 @@
+Sun Apr 29 02:38:12 PDT 2007 Christian Hammond <chipx86 at chipx86.com>
+
+ * src/themes/standard/theme.c:
+ - Fix the close button size so that it's not stretched. This fixes (at
+ least partially) bug #127. Patch by Luca Cavelli.
+
Sun Apr 29 01:02:12 PDT 2007 Christian Hammond <chipx86 at chipx86.com>
* src/daemon/engines.c:
Modified: trunk/notification-daemon/src/themes/standard/theme.c
===================================================================
--- trunk/notification-daemon/src/themes/standard/theme.c 2007-04-29 08:04:54 UTC (rev 2980)
+++ trunk/notification-daemon/src/themes/standard/theme.c 2007-04-29 09:39:32 UTC (rev 2981)
@@ -666,6 +666,7 @@
GtkWidget *image;
GtkWidget *alignment;
AtkObject *atkobj;
+ GtkRcStyle *rcstyle;
WindowData *windata;
#ifdef USE_COMPOSITE
GdkColormap *colormap;
@@ -762,15 +763,24 @@
atk_object_set_description(atkobj, "Notification summary text.");
/* Add the close button */
+ alignment = gtk_alignment_new(1, 0, 0, 0);
+ gtk_widget_show(alignment);
+ gtk_box_pack_start(GTK_BOX(hbox), alignment, FALSE, FALSE, 0);
+
close_button = gtk_button_new();
gtk_widget_show(close_button);
- gtk_box_pack_start(GTK_BOX(hbox), close_button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(alignment), close_button);
gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE);
gtk_container_set_border_width(GTK_CONTAINER(close_button), 0);
- gtk_widget_set_size_request(close_button, 20, 20);
+ //gtk_widget_set_size_request(close_button, 20, 20);
g_signal_connect_swapped(G_OBJECT(close_button), "clicked",
G_CALLBACK(gtk_widget_destroy), win);
+ rcstyle = gtk_rc_style_new();
+ rcstyle->xthickness = rcstyle->ythickness = 0;
+ gtk_widget_modify_style(close_button, rcstyle);
+ gtk_rc_style_unref(rcstyle);
+
atkobj = gtk_widget_get_accessible(close_button);
atk_action_set_description(ATK_ACTION(atkobj), 0,
"Closes the notification.");
More information about the galago-commits
mailing list