[maemo-commits] [maemo-commits] r12790 - in projects/haf/trunk/hildon-1: . examples src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Jul 23 17:21:28 EEST 2007
- Previous message: [maemo-commits] r12789 - in projects/haf/trunk/hildon-desktop: . src
- Next message: [maemo-commits] r12791 - projects/haf/trunk/hildon-1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: mdk Date: 2007-07-23 17:21:22 +0300 (Mon, 23 Jul 2007) New Revision: 12790 Added: projects/haf/trunk/hildon-1/examples/hildon-seekbar-example.c Modified: projects/haf/trunk/hildon-1/ChangeLog projects/haf/trunk/hildon-1/examples/Makefile.am projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c Log: Adding the seekbar example to check theming easily. Fixing the default focus for dialog when font size > 32 and we pack a focusable widget inside. Actually using the default response would work too, but since we don't show default response state in any way (no theming) it would not be visible to the user. Fixes NB#60575. Modified: projects/haf/trunk/hildon-1/ChangeLog =================================================================== --- projects/haf/trunk/hildon-1/ChangeLog 2007-07-23 13:38:32 UTC (rev 12789) +++ projects/haf/trunk/hildon-1/ChangeLog 2007-07-23 14:21:22 UTC (rev 12790) @@ -1,5 +1,17 @@ 2007-07-23 Michael Dominic Kostrzewa <michael.kostrzewa at nokia.com> + * examples/Makefile.am: + * examples/hildon-seekbar-example.c: Adding the seekbar example to check + theming easily. + + * src/hildon-font-selection-dialog.c: Fixing the default focus for dialog + when font size > 32 and we pack a focusable widget inside. Actually using + the default response would work too, but since we don't show default + response state in any way (no theming) it would not be visible to the + user. Fixes NB#60575. + +2007-07-23 Michael Dominic Kostrzewa <michael.kostrzewa at nokia.com> + * src/hildon-date-editor.c: Adding the missing variable setter in the set_property handler. Fixes NB#54182. Modified: projects/haf/trunk/hildon-1/examples/Makefile.am =================================================================== --- projects/haf/trunk/hildon-1/examples/Makefile.am 2007-07-23 13:38:32 UTC (rev 12789) +++ projects/haf/trunk/hildon-1/examples/Makefile.am 2007-07-23 14:21:22 UTC (rev 12790) @@ -32,13 +32,19 @@ hildon-thumb-scrollbar-example \ hildon-date-editor-example \ hildon-bread-crumb-trail-example \ - hildon-finger-example + hildon-finger-example \ + hildon-seekbar-example # Hildon window hildon_window_example_LDADD = $(HILDON_OBJ_LIBS) hildon_window_example_CFLAGS = $(HILDON_OBJ_CFLAGS) hildon_window_example_SOURCES = hildon-window-example.c +# Hildon seekbar +hildon_seekbar_example_LDADD = $(HILDON_OBJ_LIBS) +hildon_seekbar_example_CFLAGS = $(HILDON_OBJ_CFLAGS) +hildon_seekbar_example_SOURCES = hildon-seekbar-example.c + # Hildon finger hildon_finger_example_LDADD = $(HILDON_OBJ_LIBS) hildon_finger_example_CFLAGS = $(HILDON_OBJ_CFLAGS) Added: projects/haf/trunk/hildon-1/examples/hildon-seekbar-example.c =================================================================== --- projects/haf/trunk/hildon-1/examples/hildon-seekbar-example.c 2007-07-23 13:38:32 UTC (rev 12789) +++ projects/haf/trunk/hildon-1/examples/hildon-seekbar-example.c 2007-07-23 14:21:22 UTC (rev 12790) @@ -0,0 +1,54 @@ +/* + * This file is a part of hildon examples + * + * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved. + * + * Author: Michael Dominic Kostrzewa <michael.kostrzewa 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; 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 <stdio.h> +#include <stdlib.h> +#include <glib.h> +#include <gtk/gtk.h> +#include "hildon.h" + +int +main (int argc, + char **args) +{ + gtk_init (&argc, &args); + + GtkDialog *dialog = GTK_DIALOG (gtk_dialog_new ()); + + HildonSeekbar *bar = HILDON_SEEKBAR (hildon_seekbar_new ()); + gtk_widget_set_size_request (GTK_WIDGET (bar), 400, -1); + + hildon_seekbar_set_total_time (bar, 100); + hildon_seekbar_set_position (bar, 50); + + gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (bar), FALSE, FALSE, 0); + gtk_dialog_add_button (dialog, "Close", GTK_RESPONSE_CLOSE); + + gtk_widget_show_all (GTK_WIDGET (dialog)); + gtk_dialog_run (dialog); + + return 0; +} + + Modified: projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c =================================================================== --- projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c 2007-07-23 13:38:32 UTC (rev 12789) +++ projects/haf/trunk/hildon-1/src/hildon-font-selection-dialog.c 2007-07-23 14:21:22 UTC (rev 12790) @@ -1213,6 +1213,12 @@ GTK_WINDOW (fontsel)); gtk_widget_show_all (preview_dialog); + gtk_dialog_set_default_response (GTK_DIALOG (preview_dialog), GTK_RESPONSE_OK); + + GtkBox *action_area = (GtkBox *) GTK_DIALOG (preview_dialog)->action_area; + GtkWidget *button = ((GtkBoxChild *) ((GSList *) action_area->children)->data)->widget; + gtk_widget_grab_focus (button); + gtk_dialog_run (GTK_DIALOG (preview_dialog)); gtk_widget_destroy (preview_dialog); }
- Previous message: [maemo-commits] r12789 - in projects/haf/trunk/hildon-desktop: . src
- Next message: [maemo-commits] r12791 - projects/haf/trunk/hildon-1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]