[maemo-commits] [maemo-commits] r14225 - in projects/haf/branches/hildon-control-panel/refactoring: . src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Oct 1 14:46:59 EEST 2007
- Previous message: [maemo-commits] r14224 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r14226 - in projects/haf/branches/hildon-control-panel/refactoring: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: lucasr Date: 2007-10-01 14:46:58 +0300 (Mon, 01 Oct 2007) New Revision: 14225 Modified: projects/haf/branches/hildon-control-panel/refactoring/ChangeLog projects/haf/branches/hildon-control-panel/refactoring/src/hcp-window.c Log: 2007-10-01 Lucas Rocha <lucas.rocha at nokia.com> * src/hcp-window.c (hcp_window_init, hcp_window_size_allocate): enforce state on window size allocate to ensure all internal widgets have their size already allocate for initial scrolling. Modified: projects/haf/branches/hildon-control-panel/refactoring/ChangeLog =================================================================== --- projects/haf/branches/hildon-control-panel/refactoring/ChangeLog 2007-10-01 11:32:49 UTC (rev 14224) +++ projects/haf/branches/hildon-control-panel/refactoring/ChangeLog 2007-10-01 11:46:58 UTC (rev 14225) @@ -1,3 +1,9 @@ +2007-10-01 Lucas Rocha <lucas.rocha at nokia.com> + + * src/hcp-window.c (hcp_window_init, hcp_window_size_allocate): + enforce state on window size allocate to ensure all internal widgets + have their size already allocate for initial scrolling. + 2007-09-27 Lucas Rocha <lucas.rocha at nokia.com> * src/hcp-rfs.c (hcp_rfs_display_warning): set label size request in Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-window.c =================================================================== --- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-window.c 2007-10-01 11:32:49 UTC (rev 14224) +++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-window.c 2007-10-01 11:46:58 UTC (rev 14225) @@ -933,13 +933,6 @@ hcp_window_construct_ui (window); hcp_app_view_populate (HCP_APP_VIEW (priv->view), priv->al); - - hcp_window_enforce_state (window); - - if (program->execute == 1 && priv->focused_item) { - program->execute = 0; - hcp_app_launch (priv->focused_item, FALSE); - } } static void @@ -974,12 +967,39 @@ } static void +hcp_window_size_allocate (GtkWidget *widget, GtkAllocation *allocation) +{ + static gboolean enforce_state = TRUE; + + GTK_WIDGET_CLASS (hcp_window_parent_class)->size_allocate (widget, allocation); + + if (enforce_state) + { + HCPProgram *program = hcp_program_get_instance (); + HCPWindow *window = HCP_WINDOW (widget); + + hcp_window_enforce_state (HCP_WINDOW (widget)); + + if (program->execute == 1 && window->priv->focused_item) + { + program->execute = 0; + hcp_app_launch (window->priv->focused_item, FALSE); + } + + enforce_state = FALSE; + } +} + +static void hcp_window_class_init (HCPWindowClass *class) { GObjectClass *g_object_class = (GObjectClass *) class; + GtkWidgetClass *widget_class = (GtkWidgetClass *) class; g_object_class->finalize = hcp_window_finalize; + widget_class->size_allocate = hcp_window_size_allocate; + g_type_class_add_private (g_object_class, sizeof (HCPWindowPrivate)); }
- Previous message: [maemo-commits] r14224 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r14226 - in projects/haf/branches/hildon-control-panel/refactoring: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]