[maemo-commits] [maemo-commits] r10444 - in projects/haf/branches/hildon-libs/hildon-1: . examples src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Mar 7 10:23:38 EET 2007
- Previous message: [maemo-commits] r10443 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r10445 - in projects/haf/branches/hildon-libs/hildon-1: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: mdk Date: 2007-03-07 10:23:37 +0200 (Wed, 07 Mar 2007) New Revision: 10444 Modified: projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2 projects/haf/branches/hildon-libs/hildon-1/examples/hildon-hvolumebar-example.c projects/haf/branches/hildon-libs/hildon-1/examples/hildon-vvolumebar-example.c projects/haf/branches/hildon-libs/hildon-1/src/hildon-time-picker-private.h projects/haf/branches/hildon-libs/hildon-1/src/hildon-time-picker.c Log: HildonTimePicker - Do not pull the timeout settings in the init function. Do it when needed. Modified: projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2 =================================================================== --- projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2 2007-03-07 08:19:44 UTC (rev 10443) +++ projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2 2007-03-07 08:23:37 UTC (rev 10444) @@ -1,3 +1,13 @@ +2007-03-07 Michael Dominic Kostrzewa <michael.kostrzewa at nokia.com> + + * examples/hildon-hvolumebar-example.c: + * examples/hildon-vvolumebar-example.c: Making the bars in examples + larger to see if theeming is correct. + + * src/hildon-time-picker-private.h: + * src/hildon-time-picker.c: Do not pull the timeout settings in the + init function. Do it when needed. + 2007-03-02 Michael Dominic Kostrzewa <michael.kostrzewa at nokia.com> * examples/Makefile.am: Modified: projects/haf/branches/hildon-libs/hildon-1/examples/hildon-hvolumebar-example.c =================================================================== --- projects/haf/branches/hildon-libs/hildon-1/examples/hildon-hvolumebar-example.c 2007-03-07 08:19:44 UTC (rev 10443) +++ projects/haf/branches/hildon-libs/hildon-1/examples/hildon-hvolumebar-example.c 2007-03-07 08:23:37 UTC (rev 10444) @@ -37,6 +37,7 @@ GtkDialog *dialog = GTK_DIALOG (gtk_dialog_new ()); HildonHVolumebar *bar = HILDON_HVOLUMEBAR (hildon_hvolumebar_new ()); + gtk_widget_set_size_request (GTK_WIDGET (bar), 400, -1); gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (bar), FALSE, FALSE, 0); gtk_dialog_add_button (dialog, "Close", GTK_RESPONSE_CLOSE); Modified: projects/haf/branches/hildon-libs/hildon-1/examples/hildon-vvolumebar-example.c =================================================================== --- projects/haf/branches/hildon-libs/hildon-1/examples/hildon-vvolumebar-example.c 2007-03-07 08:19:44 UTC (rev 10443) +++ projects/haf/branches/hildon-libs/hildon-1/examples/hildon-vvolumebar-example.c 2007-03-07 08:23:37 UTC (rev 10444) @@ -37,6 +37,7 @@ GtkDialog *dialog = GTK_DIALOG (gtk_dialog_new ()); HildonVVolumebar *bar = HILDON_VVOLUMEBAR (hildon_vvolumebar_new ()); + gtk_widget_set_size_request (GTK_WIDGET (bar), -1, 200); gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (bar), FALSE, FALSE, 0); gtk_dialog_add_button (dialog, "Close", GTK_RESPONSE_CLOSE); Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-time-picker-private.h =================================================================== --- projects/haf/branches/hildon-libs/hildon-1/src/hildon-time-picker-private.h 2007-03-07 08:19:44 UTC (rev 10443) +++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-time-picker-private.h 2007-03-07 08:23:37 UTC (rev 10444) @@ -69,7 +69,6 @@ gchar *am_symbol; gchar *pm_symbol; - guint key_repeat; guint minutes; /* time in minutes since midnight */ gint mul; /* for key repeat handling */ guint timer_id; Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-time-picker.c =================================================================== --- projects/haf/branches/hildon-libs/hildon-1/src/hildon-time-picker.c 2007-03-07 08:19:44 UTC (rev 10443) +++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-time-picker.c 2007-03-07 08:23:37 UTC (rev 10444) @@ -284,7 +284,6 @@ { HildonTimePickerPrivate *priv = HILDON_TIME_PICKER_GET_PRIVATE (picker); gint widget_group_table_column_pos[WIDGET_GROUP_COUNT]; - GtkSettings *settings = NULL; GtkDialog *dialog = GTK_DIALOG (picker); GtkTable *table = NULL; GtkWidget *maintocenter, *colon_label; @@ -426,7 +425,6 @@ priv->minutes = 0; priv->mul = 0; - priv->key_repeat = 0; priv->start_key_repeat = FALSE; priv->timer_id = 0; priv->button_press = FALSE; @@ -457,12 +455,8 @@ gtk_widget_pop_composite_child (); - /* Get button press repeater timeout from settings (in milliseconds) */ - settings = gtk_settings_get_default (); - g_object_get (settings, "gtk-timeout-update", &priv->key_repeat, NULL); - /* This dialog isn't modal */ - gtk_window_set_modal (GTK_WINDOW(dialog), FALSE); + gtk_window_set_modal (GTK_WINDOW (dialog), FALSE); /* And final dialog packing */ gtk_dialog_set_has_separator (dialog, FALSE); gtk_dialog_add_button (dialog, _("ecdg_bd_time_picker_close"), @@ -608,6 +602,7 @@ HildonTimePickerPrivate *priv = HILDON_TIME_PICKER_GET_PRIVATE (picker); gint i, button; gint newval = 0; + gint key_repeat = 0; /* Make sure we don't add repeat timer twice. Normally it shouldn't happen but WM can cause button release to be lost. */ @@ -640,9 +635,14 @@ hildon_time_picker_change_time (picker, newval); + /* Get button press repeater timeout from settings (in milliseconds) */ + g_object_get (gtk_widget_get_settings (widget), + "gtk-timeout-update", &key_repeat, NULL); + /* Keep changing the time as long as button is being pressed. The first repeat takes 3 times longer to start than the rest. */ - priv->timer_id = g_timeout_add (priv->key_repeat * 3, + + priv->timer_id = g_timeout_add (key_repeat * 3, hildon_time_picker_key_repeat_timeout, picker); @@ -834,6 +834,7 @@ HildonTimePicker *picker; HildonTimePickerPrivate *priv = NULL; gint newval = 0; + gint key_repeat = 0; picker = HILDON_TIME_PICKER(tpicker); g_assert(picker != NULL); @@ -852,9 +853,13 @@ if (priv->start_key_repeat) { + /* Get button press repeater timeout from settings (in milliseconds) */ + g_object_get (gtk_widget_get_settings ((GtkWidget *) tpicker), + "gtk-timeout-update", &key_repeat, NULL); + /* This is the first repeat. Shorten the timeout to key_repeat (instead of the first time's 3*key_repeat) */ - priv->timer_id = g_timeout_add (priv->key_repeat, + priv->timer_id = g_timeout_add (key_repeat, hildon_time_picker_key_repeat_timeout, picker); priv->start_key_repeat = FALSE;
- Previous message: [maemo-commits] r10443 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r10445 - in projects/haf/branches/hildon-libs/hildon-1: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]