[maemo-commits] [maemo-commits] r12876 - in projects/haf/trunk/hildon-desktop: . libhildondesktop
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Jul 27 15:19:29 EEST 2007
- Previous message: [maemo-commits] r12875 - in projects/haf/trunk/hildon-fm: . debian hildon-fm
- Next message: [maemo-commits] r12877 - in projects/haf/trunk/gtk+: . gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart Date: 2007-07-27 15:19:27 +0300 (Fri, 27 Jul 2007) New Revision: 12876 Modified: projects/haf/trunk/hildon-desktop/ChangeLog projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c Log: 2007-07-27 Moises Martinez <moises.martinez at nokia.com> * libhildondesktop/hildon-desktop-panel-expandable.c: (hildon_desktop_panel_expandable_add_in_extension), (hildon_desktop_panel_expandable_arrange_items): - Fixed positioning on extension panel - If not positioned don't unref the object. Fixes: NB#63894 * ChangeLog updated. Modified: projects/haf/trunk/hildon-desktop/ChangeLog =================================================================== --- projects/haf/trunk/hildon-desktop/ChangeLog 2007-07-27 12:14:12 UTC (rev 12875) +++ projects/haf/trunk/hildon-desktop/ChangeLog 2007-07-27 12:19:27 UTC (rev 12876) @@ -1,3 +1,12 @@ +2007-07-27 Moises Martinez <moises.martinez at nokia.com> + + * libhildondesktop/hildon-desktop-panel-expandable.c: + (hildon_desktop_panel_expandable_add_in_extension), + (hildon_desktop_panel_expandable_arrange_items): + - Fixed positioning on extension panel + - If not positioned don't unref the object. + Fixes: NB#63894 + 2007-07-27 Johan Bilien <johan.bilien at nokia.com> * background-manager/hbm-background.c: treat storage full Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c =================================================================== --- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c 2007-07-27 12:14:12 UTC (rev 12875) +++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c 2007-07-27 12:19:27 UTC (rev 12876) @@ -40,7 +40,7 @@ #define SYSTEM_TRAY_CANCEL_MESSAGE 2 #endif -#define STATUSBAR_DEBUG 0 +#define STATUSBAR_DEBUG 1 #if (STATUSBAR_DEBUG) #define sb_debug(o,a...) g_debug("sb: " o,##a) #else @@ -637,6 +637,7 @@ division = ((guint)((n_items+1) / panel->priv->items_p_row)); +g_debug ("fivision is %d and n_items is %d", division, n_items); n_rows = division + (((n_items+1) % panel->priv->items_p_row) != 0) ? 1 : 0; g_object_get (panel->priv->extension_table, "n-rows", &table_rows, NULL); @@ -654,11 +655,21 @@ } if (1)/*HILDON_DESKTOP_PANEL (panel)->orient == GTK_ORIENTATION_HORIZONTAL)*/ - { + { + gint mod = ((guint)((n_items+1) % panel->priv->items_p_row)); + top_attach = division - 1; bottom_attach = division; + + if (mod == 0) + { + top_attach--; + bottom_attach--; - left_attach = (((n_items+1) % panel->priv->items_p_row)) - 1; + left_attach = panel->priv->items_p_row - 1; + } + else + left_attach = (((n_items+1) % panel->priv->items_p_row)) - 1; right_attach = left_attach + 1; @@ -738,8 +749,8 @@ if (!STATUSBAR_IS_ITEM_SOCKET (l->data)) { g_object_ref (G_OBJECT (l->data)); - gtk_container_parent_remove (GTK_CONTAINER (panel->priv->extension_table), - GTK_WIDGET (l->data)); + gtk_container_remove (GTK_CONTAINER (panel->priv->extension_table), + GTK_WIDGET (l->data)); } } @@ -763,7 +774,12 @@ else if (STATUSBAR_IS_ITEM (l->data) && HILDON_DESKTOP_ITEM (l->data)->mandatory) sb_debug ("not unreffing"); else - g_object_unref (G_OBJECT (l->data)); + { + if (gtk_widget_get_parent (GTK_WIDGET (l->data))) + g_object_unref (G_OBJECT (l->data)); + else + g_warning ("The plugin couldn't be attached to parent MEMORY LEAK!!!!!!"); + } } g_list_free (panel->priv->queued_items);
- Previous message: [maemo-commits] r12875 - in projects/haf/trunk/hildon-fm: . debian hildon-fm
- Next message: [maemo-commits] r12877 - in projects/haf/trunk/gtk+: . gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]