gnome-panel r11518 - in trunk: . applets/clock applets/notification_area



Author: vuntz
Date: Tue Feb 17 09:24:48 2009
New Revision: 11518
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11518&view=rev

Log:
2009-02-17  Vincent Untz  <vuntz gnome org>

	* configure.in: require GTK+ 2.15.1 for orientable GtkBox.

2009-02-17  Vincent Untz  <vuntz gnome org>

	Kill OBox since GtkBox now supports changing the orientation.
	Patch by Christian Persch <chpe gnome org>.
	Fix bug #571042.

	* Makefile.am: remove obox.[ch]
	* obox.[ch]: killed
	* clock.c: (clock_box_init), (clock_box_class_init): add an
	instantiable GtkBox type
	(create_clock_widget), (applet_change_orient): use GtkBox methods.

2009-02-17  Vincent Untz  <vuntz gnome org>

	Kill OBox since GtkBox now supports changing the orientation.
	Patch by Christian Persch <chpe gnome org>.
	Fix bug #571042.

	* Makefile.am: remove obox.[ch]
	* obox.[ch]: killed
	* main.c: remove useless include
	* na-tray.c: (na_box_init), (na_box_class_init): add an
	instantiable GtkBox type
	(update_size_and_orientation), (na_tray_init): use GtkBox methods.


Removed:
   trunk/applets/clock/obox.c
   trunk/applets/clock/obox.h
   trunk/applets/notification_area/obox.c
   trunk/applets/notification_area/obox.h
Modified:
   trunk/ChangeLog
   trunk/applets/clock/ChangeLog
   trunk/applets/clock/Makefile.am
   trunk/applets/clock/clock.c
   trunk/applets/notification_area/ChangeLog
   trunk/applets/notification_area/Makefile.am
   trunk/applets/notification_area/main.c
   trunk/applets/notification_area/na-tray.c
   trunk/configure.in

Modified: trunk/applets/clock/Makefile.am
==============================================================================
--- trunk/applets/clock/Makefile.am	(original)
+++ trunk/applets/clock/Makefile.am	Tue Feb 17 09:24:48 2009
@@ -42,8 +42,6 @@
 CLOCK_SOURCES = 		\
 	calendar-window.c	\
 	calendar-window.h	\
-	obox.c			\
-	obox.h			\
 	clock.c			\
 	clock.h			\
 	clock-face.c		\

Modified: trunk/applets/clock/clock.c
==============================================================================
--- trunk/applets/clock/clock.c	(original)
+++ trunk/applets/clock/clock.c	Tue Feb 17 09:24:48 2009
@@ -68,7 +68,6 @@
 #include "clock-location-tile.h"
 #include "clock-map.h"
 #include "clock-utils.h"
-#include "obox.h"
 #include "set-timezone.h"
 #include "system-timezone.h"
 
@@ -249,6 +248,27 @@
 static gboolean edit_delete (GtkWidget *unused, GdkEvent *event, ClockData *cd);
 static void save_cities_store (ClockData *cd);
 
+/* ClockBox, an instantiable GtkBox */
+
+typedef GtkBox      ClockBox;
+typedef GtkBoxClass ClockBoxClass;
+
+static GType clock_box_get_type (void);
+
+G_DEFINE_TYPE (ClockBox, clock_box, GTK_TYPE_BOX)
+
+static void
+clock_box_init (ClockBox *box)
+{
+}
+
+static void
+clock_box_class_init (ClockBoxClass *klass)
+{
+}
+
+/* Clock */
+
 static void
 unfix_size (ClockData *cd)
 {
@@ -1376,13 +1396,13 @@
         gtk_widget_show (cd->panel_button);
 
         /* Main orientable box */
-        cd->main_obox = clock_obox_new ();
+        cd->main_obox = g_object_new (clock_box_get_type (), NULL);
         gtk_box_set_spacing (GTK_BOX (cd->main_obox), 12); /* spacing between weather and time */
         gtk_container_add (GTK_CONTAINER (cd->panel_button), cd->main_obox);
         gtk_widget_show (cd->main_obox);
 
         /* Weather orientable box */
-        cd->weather_obox = clock_obox_new ();
+        cd->weather_obox = g_object_new (clock_box_get_type (), NULL);
         gtk_box_set_spacing (GTK_BOX (cd->weather_obox), 2); /* spacing between weather icon and temperature */
         gtk_box_pack_start (GTK_BOX (cd->main_obox), cd->weather_obox, FALSE, FALSE, 0);
         gtk_widget_set_has_tooltip (cd->weather_obox, TRUE);
@@ -1481,8 +1501,8 @@
                 return;
 	}
 
-        clock_obox_set_orientation (CLOCK_OBOX (cd->main_obox), o);
-        clock_obox_set_orientation (CLOCK_OBOX (cd->weather_obox), o);
+        gtk_orientable_set_orientation (GTK_ORIENTABLE (cd->main_obox), o);
+        gtk_orientable_set_orientation (GTK_ORIENTABLE (cd->weather_obox), o);
 
         unfix_size (cd);
         update_clock (cd);

Modified: trunk/applets/notification_area/Makefile.am
==============================================================================
--- trunk/applets/notification_area/Makefile.am	(original)
+++ trunk/applets/notification_area/Makefile.am	Tue Feb 17 09:24:48 2009
@@ -18,8 +18,6 @@
 	fixedtip.h				\
 	fixedtip.c				\
 	main.c					\
-	obox.c					\
-	obox.h					\
 	na-tray.c				\
 	na-tray.h				\
 	na-tray-child.c				\
@@ -101,8 +99,6 @@
 	na-tray-child.h		\
 	na-tray-manager.c	\
 	na-tray-manager.h	\
-	obox.c			\
-	obox.h			\
 	testtray.c
 
 testtray_LDADD = \

Modified: trunk/applets/notification_area/main.c
==============================================================================
--- trunk/applets/notification_area/main.c	(original)
+++ trunk/applets/notification_area/main.c	Tue Feb 17 09:24:48 2009
@@ -32,7 +32,6 @@
 #include "na-tray-manager.h"
 #include "na-tray.h"
 #include "fixedtip.h"
-#include "obox.h"
 
 #define NOTIFICATION_AREA_ICON "gnome-panel-notification-area"
 

Modified: trunk/applets/notification_area/na-tray.c
==============================================================================
--- trunk/applets/notification_area/na-tray.c	(original)
+++ trunk/applets/notification_area/na-tray.c	Tue Feb 17 09:24:48 2009
@@ -29,7 +29,6 @@
 
 #include "na-tray-manager.h"
 #include "fixedtip.h"
-#include "obox.h"
 
 #include "na-tray.h"
 
@@ -86,6 +85,27 @@
 
 static void icon_tip_show_next (IconTip *icontip);
 
+/* NaBox, an instantiable GtkBox */
+
+typedef GtkBox      NaBox;
+typedef GtkBoxClass NaBoxClass;
+
+static GType na_box_get_type (void);
+
+G_DEFINE_TYPE (NaBox, na_box, GTK_TYPE_BOX)
+
+static void
+na_box_init (NaBox *box)
+{
+}
+
+static void
+na_box_class_init (NaBoxClass *klass)
+{
+}
+
+/* NaTray */
+
 G_DEFINE_TYPE (NaTray, na_tray, GTK_TYPE_BIN)
 
 static NaTray *
@@ -375,7 +395,7 @@
 {
   NaTrayPrivate *priv = tray->priv;
 
-  na_obox_set_orientation (NA_OBOX (priv->box), priv->orientation);
+  gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->box), priv->orientation);
 
   /* This only happens when setting the property during object construction */
   if (!priv->trays_screen)
@@ -447,7 +467,7 @@
   gtk_container_add (GTK_CONTAINER (tray), priv->frame);
   gtk_widget_show (priv->frame);
 
-  priv->box = na_obox_new ();
+  priv->box = g_object_new (na_box_get_type (), NULL);
   g_signal_connect (priv->box, "expose-event",
 		    G_CALLBACK (na_tray_expose_box), tray);
   gtk_box_set_spacing (GTK_BOX (priv->box), ICON_SPACING);

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Feb 17 09:24:48 2009
@@ -52,7 +52,7 @@
 GDK_PIXBUF_REQUIRED=2.7.1
 PANGO_REQUIRED=1.15.4
 GLIB_REQUIRED=2.18.0
-GTK_REQUIRED=2.13.1
+GTK_REQUIRED=2.15.1
 LIBGLADE_REQUIRED=2.5.0
 LIBGNOME_REQUIRED=2.13.0
 LIBGNOMEUI_REQUIRED=2.5.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]