[gnome-panel/gtk3] na-tray: Remove unneeded type NaBox
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/gtk3] na-tray: Remove unneeded type NaBox
- Date: Sun, 23 Jan 2011 10:35:06 +0000 (UTC)
commit 9313543ecf3f8de10cb14977cd2eccd17e654968
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Jan 23 11:33:50 2011 +0100
na-tray: Remove unneeded type NaBox
GtkBox is not abstract anymore.
applets/notification_area/na-tray.c | 32 ++++++--------------------------
1 files changed, 6 insertions(+), 26 deletions(-)
---
diff --git a/applets/notification_area/na-tray.c b/applets/notification_area/na-tray.c
index 867f1a6..416f524 100644
--- a/applets/notification_area/na-tray.c
+++ b/applets/notification_area/na-tray.c
@@ -85,25 +85,6 @@ static TraysScreen *trays_screens = NULL;
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)
@@ -571,13 +552,6 @@ na_tray_init (NaTray *tray)
priv->frame = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
gtk_container_add (GTK_CONTAINER (tray), priv->frame);
gtk_widget_show (priv->frame);
-
- priv->box = g_object_new (na_box_get_type (), NULL);
- g_signal_connect (priv->box, "draw",
- G_CALLBACK (na_tray_draw_box), NULL);
- gtk_box_set_spacing (GTK_BOX (priv->box), ICON_SPACING);
- gtk_container_add (GTK_CONTAINER (priv->frame), priv->box);
- gtk_widget_show (priv->box);
}
static GObject *
@@ -598,6 +572,12 @@ na_tray_constructor (GType type,
g_assert (priv->screen != NULL);
+ priv->box = gtk_box_new (priv->orientation, ICON_SPACING);
+ g_signal_connect (priv->box, "draw",
+ G_CALLBACK (na_tray_draw_box), NULL);
+ gtk_container_add (GTK_CONTAINER (priv->frame), priv->box);
+ gtk_widget_show (priv->box);
+
if (!initialized)
{
GdkDisplay *display;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]