[maemo-commits] [maemo-commits] r9286 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildondesktop
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Jan 24 14:32:35 EET 2007
- Previous message: [maemo-commits] r9285 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9287 - projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart
Date: 2007-01-24 14:32:33 +0200 (Wed, 24 Jan 2007)
New Revision: 9286
Added:
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.h
Modified:
projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/Makefile.am
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel.h
Log:
* libhildondesktop/hildon-desktop-panel.[ch]:
- add_button method turned into virtual method
* libhildondesktop/hildon-desktop-panel-expandable.[ch]:
- New panel for expandable panels as old statusbar panel for example.
* libhildondesktop/Makefile.am:
- Added hildon-desktop-panel-expandable.*
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2007-01-24 11:43:02 UTC (rev 9285)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2007-01-24 12:32:33 UTC (rev 9286)
@@ -1,3 +1,12 @@
+2007-01-24 Moises Martinez <moises.martinez at nokia.com>
+
+ * libhildondesktop/hildon-desktop-panel.[ch]:
+ - add_button method turned into virtual method
+ * libhildondesktop/hildon-desktop-panel-expandable.[ch]:
+ - New panel for expandable panels as old statusbar panel for example.
+ * libhildondesktop/Makefile.am:
+ - Added hildon-desktop-panel-expandable.*
+
2007-01-24 Johan Bilien <johan.bilien at nokia.com>
* libhildondesktop/hildon-home-window.c: added saving of the home
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/Makefile.am
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/Makefile.am 2007-01-24 11:43:02 UTC (rev 9285)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/Makefile.am 2007-01-24 12:32:33 UTC (rev 9286)
@@ -14,6 +14,7 @@
hildon-desktop-panel-window.h \
hildon-desktop-panel.h \
hildon-desktop-multiscreen.h \
+ hildon-desktop-panel-expandable.h \
statusbar-item.h \
statusbar-item-socket.h \
tasknavigator-item.h \
@@ -78,6 +79,8 @@
hildon-desktop-panel.c \
hildon-desktop-panel-window.h \
hildon-desktop-panel-window.c \
+ hildon-desktop-panel-expandable.h \
+ hildon-desktop-panel-expandable.c \
hildon-desktop-multiscreen.h \
hildon-desktop-multiscreen.c \
statusbar-item.h \
Added: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c 2007-01-24 11:43:02 UTC (rev 9285)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c 2007-01-24 12:32:33 UTC (rev 9286)
@@ -0,0 +1,390 @@
+/*
+ * This file is part of maemo-af-desktop
+ *
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Author: Moises Martinez <moises.martinez at nokia.com>
+ * Contact: Karoliina Salminen <karoliina.t.salminen at nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include "hildon-desktop-panel-expandable.h"
+#include "statusbar-item.h"
+#include <gtk/gtkwindow.h>
+#include <gtk/gtktable.h>
+
+#define HILDON_DESKTOP_PANEL_EXPANDABLE_GET_PRIVATE(object) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((object), HILDON_DESKTOP_TYPE_PANEL_EXPANDABLE, HildonDesktopPanelExpandablePrivate))
+
+#define HSB_ARROW_ICON_NAME "qgn_stat_more"
+#define HSB_ARROW_ICON_SIZE 40
+
+G_DEFINE_TYPE (HildonDesktopPanelExpandable, hildon_desktop_panel_expandable, HILDON_DESKTOP_TYPE_PANEL);
+
+struct _HildonDesktopPanelExpandablePrivate
+{
+ guint items_p_row;
+ guint n_items;
+
+ GList *items;
+
+ GtkWindow *extension_window;
+ GtkTable *extension_table;
+
+ gboolean extension_opened;
+};
+
+enum
+{
+ PROP_0,
+ PROP_ITEMS_P_ROW
+};
+
+static void hildon_desktop_panel_expandable_class_init (HildonDesktopPanelExpandableClass *panel_class);
+
+static void hildon_desktop_panel_expandable_init (HildonDesktopPanelExpandable *panel);
+
+static void hildon_desktop_panel_expandable_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void hildon_desktop_panel_expandable_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+
+static void hildon_desktop_panel_expandable_cadd (GtkContainer *container, GtkWidget *widget);
+
+static void hildon_desktop_panel_expandable_add_button (HildonDesktopPanel *panel, GtkWidget *widget);
+
+GObject *hildon_desktop_panel_expandable_constructor (GType gtype,guint n_params,GObjectConstructParam *params);
+
+static void hildon_desktop_panel_expandable_finalize (GObject *object);
+
+static void hildon_desktop_panel_expandable_arrange_items (HildonDesktopPanelExpandable *panel);
+
+static void hildon_desktop_panel_expandable_add_in_extension (HildonDesktopPanelExpandable *panel, HildonDesktopPanelItem *item);
+
+static void hildon_desktop_panel_expandable_add_arrow (HildonDesktopPanelExpandable *panel);
+
+static void hildon_desktop_panel_expandable_arrow_toggled (GtkToggleButton *button, gpointer _panel);
+
+static void
+hildon_desktop_panel_expandable_class_init (HildonDesktopPanelExpandableClass *panel_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (panel_class);
+ GtkContainerClass *container_class = GTK_CONTAINER_CLASS (panel_class);
+
+ HildonDesktopPanelClass *hildon_panel_class = HILDON_DESKTOP_PANEL_CLASS (panel_class);
+
+ g_type_class_add_private (panel_class, sizeof (HildonDesktopPanelExpandablePrivate));
+
+ hildon_panel_class->add_button = hildon_desktop_panel_expandable_add_button;
+
+ container_class->add = hildon_desktop_panel_expandable_cadd;
+
+ object_class->constructor = hildon_desktop_panel_expandable_constructor;
+ object_class->finalize = hildon_desktop_panel_expandable_finalize;
+
+ object_class->get_property = hildon_desktop_panel_expandable_get_property;
+ object_class->set_property = hildon_desktop_panel_expandable_set_property;
+
+ g_object_class_install_property (object_class,
+ PROP_ITEMS_P_ROW,
+ g_param_spec_uint ("items_row",
+ "itemsrow",
+ "Number of items per row",
+ 1,
+ G_MAXUINT,
+ 7,
+ G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
+
+}
+
+static void
+hildon_desktop_panel_expandable_init (HildonDesktopPanelExpandable *panel)
+{
+ panel->priv = HILDON_DESKTOP_PANEL_EXPANDABLE_GET_PRIVATE (panel);
+
+ panel->priv->n_items = 0;
+
+ panel->priv->items = NULL;
+
+ panel->priv->extension_opened = FALSE;
+}
+
+GObject *
+hildon_desktop_panel_expandable_constructor (GType gtype,
+ guint n_params,
+ GObjectConstructParam *params)
+{
+ GObject *object;
+ HildonDesktopPanelExpandable *panel;
+
+ object =
+ G_OBJECT_CLASS (hildon_desktop_panel_expandable_parent_class)->constructor (gtype,
+ n_params,
+ params);
+
+
+ panel->priv->extension_window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+
+ gtk_window_set_type_hint (panel->priv->extension_window,
+ GDK_WINDOW_TYPE_HINT_DIALOG);
+
+ gtk_window_set_decorated (panel->priv->extension_window, FALSE);
+
+ panel->priv->extension_table = GTK_TABLE (gtk_table_new (1,panel->priv->items_p_row,FALSE));
+
+ gtk_container_add (GTK_CONTAINER (panel->priv->extension_window),
+ GTK_WIDGET (panel->priv->extension_table));
+
+ gtk_widget_show (GTK_WIDGET (panel->priv->extension_table));
+
+ return object;
+}
+
+static void
+hildon_desktop_panel_expandable_finalize (GObject *object)
+{
+ HildonDesktopPanelExpandable *panel = HILDON_DESKTOP_PANEL_EXPANDABLE (object);
+
+ gtk_widget_destroy (GTK_WIDGET (panel->priv->extension_window));
+
+ G_OBJECT_CLASS (hildon_desktop_panel_expandable_parent_class)->finalize (object);
+}
+
+static void
+hildon_desktop_panel_expandable_cadd (GtkContainer *container, GtkWidget *widget)
+{
+ g_return_if_fail (HILDON_DESKTOP_IS_PANEL_EXPANDABLE (container));
+
+ hildon_desktop_panel_expandable_add_button (HILDON_DESKTOP_PANEL (container), widget);
+}
+
+static void
+hildon_desktop_panel_expandable_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ HildonDesktopPanelExpandable *panel;
+
+ g_assert (object && HILDON_DESKTOP_IS_PANEL_EXPANDABLE (object));
+
+ panel = HILDON_DESKTOP_PANEL_EXPANDABLE (object);
+
+ switch (prop_id)
+ {
+ case PROP_ITEMS_P_ROW:
+ g_value_set_int (value, panel->priv->items_p_row);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+hildon_desktop_panel_expandable_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ HildonDesktopPanelExpandable *panel;
+
+ g_assert (object && HILDON_DESKTOP_IS_PANEL_EXPANDABLE (object));
+
+ panel = HILDON_DESKTOP_PANEL_EXPANDABLE (object);
+
+ switch (prop_id)
+ {
+ case PROP_ITEMS_P_ROW:
+ panel->priv->items_p_row = g_value_get_int (value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+hildon_desktop_panel_expandable_add_button (HildonDesktopPanel *panel, GtkWidget *button)
+{
+ HildonDesktopPanelItem *item = HILDON_DESKTOP_PANEL_ITEM (button);
+ HildonDesktopPanelExpandable *ex_panel = HILDON_DESKTOP_PANEL_EXPANDABLE (panel);
+
+ if (STATUSBAR_IS_ITEM (button))
+ {
+ g_signal_connect (STATUSBAR_ITEM (item),
+ "statusbar_condition",
+ G_CALLBACK (hildon_desktop_panel_expandable_arrange_items),
+ (gpointer)ex_panel);
+ }
+
+ if (ex_panel->priv->items_p_row >= (ex_panel->priv->n_items+1))
+ {
+ hildon_desktop_panel_expandable_add_arrow (ex_panel);
+ hildon_desktop_panel_expandable_add_in_extension (ex_panel, item);
+ }
+ else
+ {
+ ex_panel->priv->n_items++;
+ HILDON_DESKTOP_PANEL_CLASS (hildon_desktop_panel_expandable_parent_class)->add_button (panel,button);
+ }
+
+ ex_panel->priv->items = g_list_append (ex_panel->priv->items, item);
+}
+
+static void
+hildon_desktop_panel_expandable_add_in_extension (HildonDesktopPanelExpandable *panel, HildonDesktopPanelItem *item)
+{
+ guint n_rows,
+ table_rows,
+ left_attach,
+ right_attach,
+ top_attach,
+ bottom_attach;
+
+ n_rows = ((panel->priv->n_items+1)/panel->priv->items_p_row) +
+ ((((panel->priv->n_items+1) % panel->priv->items_p_row) > 0) ? 1 : 0);
+
+ g_object_get (panel->priv->extension_table, "n-rows", &table_rows, NULL);
+
+ if (n_rows > table_rows)
+ {
+ gtk_table_resize (panel->priv->extension_table,
+ n_rows,
+ panel->priv->items_p_row);
+ }
+
+ top_attach = n_rows-1;
+ bottom_attach = n_rows;
+
+ left_attach = ((panel->priv->n_items+1) % panel->priv->items_p_row) - 1;
+ right_attach = left_attach + 2;
+
+ gtk_table_attach_defaults (panel->priv->extension_table,
+ GTK_WIDGET (item),
+ left_attach, right_attach,
+ top_attach, bottom_attach);
+
+ panel->priv->n_items++;
+}
+
+static void
+hildon_desktop_panel_expandable_arrange_items (HildonDesktopPanelExpandable *panel)
+{
+ /*TODO: Improve this!! This horribly slow!!!!! */
+
+ GList *children_panel, *children_table, *l;
+
+ children_panel = children_table = NULL;
+
+ children_panel = gtk_container_get_children (GTK_CONTAINER (panel));
+ children_table = gtk_container_get_children (GTK_CONTAINER (panel->priv->extension_table));
+
+ for (l = children_panel ; l ; l = g_list_next (l))
+ {
+ if (HILDON_DESKTOP_IS_PANEL_ITEM (l->data)) /* For arrow */
+ g_object_ref (G_OBJECT (l->data));
+ gtk_container_remove (GTK_CONTAINER (panel), GTK_WIDGET (l->data));
+ }
+
+ for (l = children_table ; l ; l = g_list_next (l))
+ {
+ g_object_ref (G_OBJECT (l->data));
+ gtk_container_remove (GTK_CONTAINER (panel->priv->extension_table),
+ GTK_WIDGET (l->data));
+ }
+
+ for (l = panel->priv->items; l ; l = g_list_next (l))
+ {
+ if (GTK_WIDGET_VISIBLE (l->data))
+ {
+ hildon_desktop_panel_expandable_add_button (HILDON_DESKTOP_PANEL (panel),
+ GTK_WIDGET (l->data));
+ g_object_unref (G_OBJECT (l->data));
+ }
+ }
+
+ g_list_free (children_panel);
+ g_list_free (children_table);
+}
+
+
+static void
+hildon_desktop_panel_expandable_add_arrow (HildonDesktopPanelExpandable *panel)
+{
+ GtkWidget *arrow_button, *arrow_image;
+ GError *error = NULL;
+ GdkPixbuf *arrow_pixbuf;
+ GtkIconTheme *icon_theme;
+
+ arrow_button = gtk_toggle_button_new ();
+
+ arrow_image = gtk_image_new();
+ icon_theme = gtk_icon_theme_get_default();
+ arrow_pixbuf = gtk_icon_theme_load_icon (icon_theme,
+ HSB_ARROW_ICON_NAME,
+ HSB_ARROW_ICON_SIZE,
+ GTK_ICON_LOOKUP_NO_SVG,
+ &error);
+ if (arrow_pixbuf)
+ {
+ gtk_image_set_from_pixbuf (GTK_IMAGE(arrow_image), arrow_pixbuf);
+ gdk_pixbuf_unref (arrow_pixbuf);
+ }
+ else
+ if (error)
+ {
+ g_warning ("Could not load statusbar extension icon: %s", error->message);
+ g_error_free (error);
+ }
+
+ gtk_button_set_image (GTK_BUTTON (arrow_button), arrow_image);
+
+ g_signal_connect (arrow_button,
+ "toggled",
+ G_CALLBACK (hildon_desktop_panel_expandable_arrow_toggled),
+ (gpointer)panel);
+}
+
+static void
+hildon_desktop_panel_expandable_arrow_toggled (GtkToggleButton *button, gpointer _panel)
+{
+ /*gint p_width, p_height;*/
+ HildonDesktopPanelExpandable *panel = HILDON_DESKTOP_PANEL_EXPANDABLE (_panel);
+
+ panel->priv->extension_opened = !panel->priv->extension_opened;
+
+ if (panel->priv->extension_opened)
+ {
+ gtk_widget_show (GTK_WIDGET (panel->priv->extension_window));
+
+ /*TODO: Positioning and sizing of the window */
+ }
+ else
+ {
+ gtk_widget_hide (GTK_WIDGET (panel->priv->extension_window));
+ }
+}
+
Added: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.h 2007-01-24 11:43:02 UTC (rev 9285)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.h 2007-01-24 12:32:33 UTC (rev 9286)
@@ -0,0 +1,60 @@
+/*
+ * This file is part of maemo-af-desktop
+ *
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Author: Moises Martinez <moises.martinez at nokia.com>
+ * Contact: Karoliina Salminen <karoliina.t.salminen at nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_DESKTOP_PANEL_EXPANDABLE_H__
+#define __HILDON_DESKTOP_PANEL_EXPANDABLE_H__
+
+#include <libhildondesktop/hildon-desktop-panel.h>
+
+G_BEGIN_DECLS
+
+typedef struct _HildonDesktopPanelExpandable HildonDesktopPanelExpandable;
+typedef struct _HildonDesktopPanelExpandableClass HildonDesktopPanelExpandableClass;
+typedef struct _HildonDesktopPanelExpandablePrivate HildonDesktopPanelExpandablePrivate;
+
+#define HILDON_DESKTOP_TYPE_PANEL_EXPANDABLE (hildon_desktop_panel_expandable_get_type())
+#define HILDON_DESKTOP_PANEL_EXPANDABLE(obj) (GTK_CHECK_CAST (obj, HILDON_DESKTOP_TYPE_PANEL_EXPANDABLE, HildonDesktopPanelExpandable))
+#define HILDON_DESKTOP_PANEL_EXPANDABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), HILDON_DESKTOP_TYPE_PANEL_EXPANDABLE, HildonDesktopPanelExpandableClass))
+#define HILDON_DESKTOP_IS_PANEL_EXPANDABLE(obj) (GTK_CHECK_TYPE (obj, HILDON_DESKTOP_TYPE_PANEL_EXPANDABLE))
+#define HILDON_DESKTOP_IS_PANEL_EXPANDABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), HILDON_DESKTOP_TYPE_PANEL_EXPANDABLE))
+
+struct _HildonDesktopPanelExpandable
+{
+ HildonDesktopPanel parent;
+
+ HildonDesktopPanelExpandablePrivate *priv;
+};
+
+struct _HildonDesktopPanelExpandableClass
+{
+ HildonDesktopPanelClass parent_class;
+
+};
+
+GType hildon_desktop_panel_expandable_get_type (void);
+
+G_END_DECLS
+
+#endif /* __HILDON_DESKTOP_PANEL_EXPANDABLE_H__ */
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel.c 2007-01-24 11:43:02 UTC (rev 9285)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel.c 2007-01-24 12:32:33 UTC (rev 9286)
@@ -42,6 +42,7 @@
enum
{
SIGNAL_FLIP,
+ SIGNAL_ADD_BUTTON,
N_SIGNALS
};
@@ -83,6 +84,10 @@
static void hildon_desktop_panel_cadd (GtkContainer *container,
GtkWidget *widget);
+void hildon_desktop_panel_real_add_button (HildonDesktopPanel *panel,
+ GtkWidget *widget);
+
+
static void
hildon_desktop_panel_class_init (HildonDesktopPanelClass *panel_class)
{
@@ -96,7 +101,7 @@
panel_class->get_orientation = hildon_desktop_panel_get_orientation;
panel_class->set_orientation = hildon_desktop_panel_set_orientation;
panel_class->flip = hildon_desktop_panel_flip;
- panel_class->add_button = hildon_desktop_panel_add_button;
+ panel_class->add_button = hildon_desktop_panel_real_add_button;
panel_class->panel_flipped = NULL;
container_class->add = hildon_desktop_panel_cadd;
@@ -113,6 +118,16 @@
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ signals[SIGNAL_ADD_BUTTON] =
+ g_signal_new("add-button",
+ G_OBJECT_CLASS_TYPE(object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (HildonDesktopPanelClass,add_button),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 0);
+
+
g_object_class_install_property (object_class,
PROP_ORI,
g_param_spec_int ("orientation",
@@ -156,7 +171,7 @@
{
g_return_if_fail (HILDON_DESKTOP_IS_PANEL (container));
- hildon_desktop_panel_add_button (HILDON_DESKTOP_PANEL (container), widget);
+ hildon_desktop_panel_real_add_button (HILDON_DESKTOP_PANEL (container), widget);
}
static void
@@ -751,10 +766,8 @@
gtk_widget_show (GTK_WIDGET (item));
}
-/* Public declarations */
-
void
-hildon_desktop_panel_add_button (HildonDesktopPanel *panel, GtkWidget *widget)
+hildon_desktop_panel_real_add_button (HildonDesktopPanel *panel, GtkWidget *widget)
{
GtkWidget *panel_widget;
GtkRequisition req;
@@ -811,8 +824,15 @@
gtk_box_pack_start (GTK_BOX (panel), widget, FALSE, FALSE, 0);
}
}
+/* Public declarations */
void
+hildon_desktop_panel_add_button (HildonDesktopPanel *panel, GtkWidget *widget)
+{
+ g_signal_emit_by_name (panel,"add-button",widget);
+}
+
+void
hildon_desktop_panel_set_orientation (HildonDesktopPanel *panel, GtkOrientation orientation)
{
g_return_if_fail (panel && HILDON_DESKTOP_IS_PANEL (panel));
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel.h 2007-01-24 11:43:02 UTC (rev 9285)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel.h 2007-01-24 12:32:33 UTC (rev 9286)
@@ -27,6 +27,7 @@
#define __HILDON_DESKTOP_PANEL_H__
#include <gtk/gtkbox.h>
+#include <libhildondesktop/hildon-desktop-panel-item.h>
G_BEGIN_DECLS
- Previous message: [maemo-commits] r9285 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9287 - projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
