[Goodies-commits] r2336 - in notification-daemon-xfce/trunk: . src/themes/standard

Nick Schermer nick at xfce.org
Thu Jan 11 19:45:21 CET 2007


Author: nick
Date: 2007-01-11 18:45:21 +0000 (Thu, 11 Jan 2007)
New Revision: 2336

Modified:
   notification-daemon-xfce/trunk/ChangeLog
   notification-daemon-xfce/trunk/src/themes/standard/theme.c
Log:
Sync changes from the notification-trunk up to revision 2959.


Modified: notification-daemon-xfce/trunk/ChangeLog
===================================================================
--- notification-daemon-xfce/trunk/ChangeLog	2007-01-11 12:53:38 UTC (rev 2335)
+++ notification-daemon-xfce/trunk/ChangeLog	2007-01-11 18:45:21 UTC (rev 2336)
@@ -1,27 +1,31 @@
-2006-10-22 17:42 nick
+2007-01-11 Nick Schermer <nick at xfce.org>
+	* Sync changes from the notification-trunk up to
+	  revision 2959.
+
+2006-10-22 Nick Schermer <nick at xfce.org>
 	* Reorganize the directory structure, all code is now
 	  located in src/.
 	* Fix typo in Makefile.am, reported by James Westby
 	* Moved make setting to configure.in.in
 	* Regenerated po files
 
-2006-09-10 12:48 nick
+2006-09-10 Nick Schermer <nick at xfce.org>
 
 	* Add build option to disable the close button inside
 	  the default theme (--disable-close-button).
 
-2006-09-07 19:00 nick
+2006-09-07 Nick Schermer <nick at xfce.org>
 
 	* Better way to "re-display" the preview notification
 
-2006-09-07 13:00 nick
+2006-09-07 Nick Schermer <nick at xfce.org>
 
 	* Created icons directory with icon-cache hook, moved
 	  the 48px icon into this dir and add a 22px icon for
 	  the preview button.
 	* Fix typos in .desktop file.
 
-2006-09-07 11:40 nick
+2006-09-07 Nick Schermer <nick at xfce.org>
 
 	* Added new dbus method to reload the daemon settings.
 	* Removed hacky code from preview dialog, but trigger the
@@ -29,13 +33,13 @@
 	* Improved the preview notification: only 1 preview is
 	  possible, but it moves when the position is changed.
 
-2006-09-06 23:12 nick
+2006-09-06  Nick Schermer <nick at xfce.org>
 
 	* Add preview support to the settings dialog.
 	* Hacky way to kill the deamon when settings has been
 	  changed.
 
-2006-09-06 18:10 nick
+2006-09-06 Nick Schermer <nick at xfce.org>
 
 	* Imported all changes from the trunk version of
 	  the origional daemon (0.3.6).
@@ -50,7 +54,7 @@
 	* Added .pot file.
 	* Bumped version to 0.3.6.
 
-2006-09-06 13:36 nick
+2006-09-06 Nick Schermer <nick at xfce.org>
 
 	* Initial import of notification-daemon-xfce. It's
 	  based on version 0.3.5 of the notification-daemon.

Modified: notification-daemon-xfce/trunk/src/themes/standard/theme.c
===================================================================
--- notification-daemon-xfce/trunk/src/themes/standard/theme.c	2007-01-11 12:53:38 UTC (rev 2335)
+++ notification-daemon-xfce/trunk/src/themes/standard/theme.c	2007-01-11 18:45:21 UTC (rev 2336)
@@ -149,7 +149,7 @@
 	} G_STMT_END
 
 static void
-create_border_with_arrow(GtkWidget *widget, WindowData *windata)
+create_border_with_arrow(GtkWidget *nw, WindowData *windata)
 {
 	int width;
 	int height;
@@ -167,13 +167,13 @@
 	width  = windata->width;
 	height = windata->height;
 
-	screen        = gdk_drawable_get_screen(GDK_DRAWABLE(widget->window));
+	screen        = gdk_drawable_get_screen(GDK_DRAWABLE(nw->window));
 	screen_width  = gdk_screen_get_width(screen);
 	screen_height = gdk_screen_get_height(screen);
 
 	windata->num_border_points = 5;
 
-	arrow_type = get_notification_arrow_type(widget);
+	arrow_type = get_notification_arrow_type(windata->win);
 
 	/* Handle the offset and such */
 	switch (arrow_type)
@@ -314,7 +314,7 @@
 			g_assert(i == windata->num_border_points);
 			g_assert(windata->point_x - arrow_offset - arrow_side1_width >= 0);
 #endif
-			gtk_window_move(GTK_WINDOW(widget),
+			gtk_window_move(GTK_WINDOW(windata->win),
 							windata->point_x - arrow_offset -
 							arrow_side1_width,
 							y);
@@ -334,6 +334,9 @@
 				arrow_offset = windata->point_y - arrow_side1_width;
 			}
 			break;
+
+		default:
+			g_assert_not_reached();
 	}
 
 	g_assert(shape_points != NULL);
@@ -359,11 +362,12 @@
 
 	if (windata->has_arrow)
 	{
-		create_border_with_arrow(widget, windata);
+		create_border_with_arrow(windata->win, windata);
 
 		gdk_draw_polygon(widget->window, windata->gc, FALSE,
 						 windata->border_points, windata->num_border_points);
-		gdk_window_shape_combine_region(widget->window, windata->window_region,
+		gdk_window_shape_combine_region(windata->win->window,
+										windata->window_region,
 										0, 0);
 		g_free(windata->border_points);
 		windata->border_points = NULL;
@@ -381,6 +385,11 @@
 			 GdkEventExpose *event,
 			 WindowData *windata)
 {
+	if (windata->width == 0) {
+		/* We haven't seen configure_event yet. Bail for now. */
+		return FALSE;
+	}
+
 	fill_background(widget, windata);
 	draw_border(widget, windata);
 	draw_stripe(widget, windata);
@@ -458,6 +467,7 @@
 	windata->height = event->height;
 
 	update_spacers(nw);
+	gtk_widget_queue_draw(nw);
 
 	return FALSE;
 }




More information about the Goodies-commits mailing list