Adding an example test program to check icon-lookup functionality. Doc updates.
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Wed, 14 Feb 2007 09:04:26 +0000 (09:04 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Wed, 14 Feb 2007 09:04:26 +0000 (09:04 +0000)
27 files changed:
ChangeLog.2
examples/Makefile.am
examples/hildon-lookup-example.c [new file with mode: 0644]
src/hildon-caption.c
src/hildon-color-button.c
src/hildon-color-chooser-dialog.c
src/hildon-color-chooser.c
src/hildon-controlbar.c
src/hildon-date-editor.c
src/hildon-find-toolbar.c
src/hildon-font-selection-dialog.c
src/hildon-get-password-dialog.c
src/hildon-hvolumebar.c
src/hildon-login-dialog.c
src/hildon-note.c
src/hildon-number-editor.c
src/hildon-range-editor.c
src/hildon-seekbar.c
src/hildon-set-password-dialog.c
src/hildon-sort-dialog.c
src/hildon-sound.c
src/hildon-time-editor.c
src/hildon-time-picker.c
src/hildon-volumebar.c
src/hildon-vvolumebar.c
src/hildon-weekday-picker.c
src/hildon-wizard-dialog.c

index b271839..280fc81 100644 (file)
@@ -1,3 +1,34 @@
+2007-02-14  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
+       * examples/Makefile.am:
+       * examples/hildon-lookup-example.c: Adding an example test program to
+       check icon-lookup functionality.
+
+       * src/hildon-caption.c:
+       * src/hildon-color-button.c:
+       * src/hildon-color-chooser-dialog.c:
+       * src/hildon-color-chooser.c:
+       * src/hildon-controlbar.c:
+       * src/hildon-date-editor.c:
+       * src/hildon-find-toolbar.c:
+       * src/hildon-font-selection-dialog.c:
+       * src/hildon-get-password-dialog.c:
+       * src/hildon-hvolumebar.c:
+       * src/hildon-login-dialog.c:
+       * src/hildon-note.c:
+       * src/hildon-number-editor.c:
+       * src/hildon-range-editor.c:
+       * src/hildon-seekbar.c:
+       * src/hildon-set-password-dialog.c:
+       * src/hildon-sort-dialog.c:
+       * src/hildon-sound.c:
+       * src/hildon-time-editor.c:
+       * src/hildon-time-picker.c:
+       * src/hildon-volumebar.c:
+       * src/hildon-vvolumebar.c:
+       * src/hildon-weekday-picker.c:
+       * src/hildon-wizard-dialog.c: Doc update.
+
 2007-02-13  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
        * examples/Makefile.am:
index f17cee5..40f6606 100644 (file)
@@ -22,7 +22,8 @@ noinst_PROGRAMS                               = hildon-window-example                 \
                                          hildon-vvolumebar-example             \
                                          hildon-toolbar-example                \
                                          hildon-code-dialog-example            \
-                                         hildon-hvolumebar-example
+                                         hildon-hvolumebar-example             \
+                                         hildon-lookup-example
 
 # HIldon window
 hildon_window_example_LDADD            = $(HILDON_OBJ_LIBS)
@@ -134,4 +135,9 @@ hildon_code_dialog_example_LDADD    = $(HILDON_OBJ_LIBS)
 hildon_code_dialog_example_CFLAGS      = $(HILDON_OBJ_CFLAGS)
 hildon_code_dialog_example_SOURCES     = hildon-code-dialog-example.c
 
+# Hildon lookup example
+hildon_lookup_example_LDADD            = $(HILDON_OBJ_LIBS)
+hildon_lookup_example_CFLAGS           = $(HILDON_OBJ_CFLAGS)
+hildon_lookup_example_SOURCES          = hildon-lookup-example.c
+
 endif
diff --git a/examples/hildon-lookup-example.c b/examples/hildon-lookup-example.c
new file mode 100644 (file)
index 0000000..0f72773
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is a part of hildon examples
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
+ *
+ * Author: Michael Dominic Kostrzewa <michael.kostrzewa@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.
+ *
+ * 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"
+
+static GtkWidget*
+create_button_with_icon                         (const gchar *icon);
+
+static GtkWidget*
+create_button_with_icon                         (const gchar *icon)
+{
+    GtkImage *image = GTK_IMAGE (gtk_image_new_from_icon_name (icon, GTK_ICON_SIZE_BUTTON));
+    if (image == NULL) {
+        g_warning ("Failed to create a GtkImage from icon name: %s", icon);
+        return NULL;
+    }
+
+    gtk_misc_set_padding (GTK_MISC (image), 12, 12);
+
+    GtkButton *button = GTK_BUTTON (gtk_button_new ());
+
+    gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (image));
+
+    return (GtkWidget *) button;
+}
+
+int
+main                                            (int argc, 
+                                                 char **args)
+{
+    gtk_init (&argc, &args);
+   
+    GtkDialog *dialog = GTK_DIALOG (gtk_dialog_new ());
+    gtk_window_set_title (GTK_WINDOW (dialog), "icons");
+
+    gtk_dialog_set_has_separator (dialog, FALSE);
+    GtkTable *table = GTK_TABLE (gtk_table_new (3, 3, TRUE));
+    gtk_table_attach (table, create_button_with_icon (GTK_STOCK_OK), 0, 1, 0, 1, 0, 0, 0, 0);
+    gtk_table_attach (table, create_button_with_icon (GTK_STOCK_CANCEL), 1, 2, 0, 1, 0, 0, 0, 0);
+    gtk_table_attach (table, create_button_with_icon (GTK_STOCK_QUIT), 2, 3, 0, 1, 0, 0, 0, 0);
+    
+    gtk_table_attach (table, create_button_with_icon (GTK_STOCK_MEDIA_PLAY), 0, 1, 1, 2, 0, 0, 0, 0);
+    gtk_table_attach (table, create_button_with_icon (GTK_STOCK_MEDIA_PAUSE), 1, 2, 1, 2, 0, 0, 0, 0);
+    gtk_table_attach (table, create_button_with_icon ("qgn_note_info"), 2, 3, 1, 2, 0, 0, 0, 0);
+    
+    gtk_table_attach (table, create_button_with_icon ("qgn_note_infoprint"), 0, 1, 2, 3, 0, 0, 0, 0);
+    gtk_table_attach (table, create_button_with_icon ("qgn_indi_pball_a"), 1, 2, 2, 3, 0, 0, 0, 0);
+    gtk_table_attach (table, create_button_with_icon ("qgn_note_confirm"), 2, 3, 2, 3, 0, 0, 0, 0);
+
+    gtk_table_set_col_spacings (table, 6);
+    gtk_table_set_row_spacings (table, 6);
+
+    gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (table), 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;
+}
+
+
index 4e6744a..44574ae 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * SECTION:hildon-caption
  * @short_description: A single-child container widget that precedes the 
- * contained widget with a field label and an optional icon
+ * contained widget with a field label and an optional icon.
  *
  * #HildonCaption is a single-child container widget that precedes the 
  * contained widget with a field label and an optional icon. It allows 
index a45c678..2c1b2a5 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-color-button
- * @short_description: A widget to open HildonColorChooserDialog
+ * @short_description: A widget to open HildonColorChooserDialog.
  * @see_also: #HildonColorChooserDialog, #HildonColorPopup
  *
  * HildonColorButton is a widget to open a HildonColorChooserDialog.
index 140d920..39618b8 100644 (file)
@@ -25,7 +25,7 @@
 
 /**
  * SECTION:hildon-color-chooser-dialog
- * @short_description: A dialog used to select a color from HSV colorspace
+ * @short_description: A dialog used to select a color from HSV colorspace.
  * @see_also: #HildonColorButton
  *
  * HildonColorChooserDialog enables the user to 
index dbdc285..bb54cf1 100644 (file)
@@ -25,7 +25,7 @@
 
 /**
  * SECTION:hildon-color-chooser
- * @short_description: A widget used to select a color from an HSV colorspace
+ * @short_description: A widget used to select a color from an HSV colorspace.
  * @see_also: #HildonColorChooserDialog
  *
  * HildonColorChooser is a widget that displays an HSV colorspace. 
index 1584cc0..44cddc4 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * SECTION:hildon-controlbar
  * @short_description: A widget that allows increasing or decreasing
- * a value within a pre-defined range
+ * a value within a pre-defined range.
  *
  * #HildonControlbar is a horizontally positioned range widget that is
  * visually divided into blocks and supports setting a minimum and
index ca86542..667c8b7 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * SECTION:hildon-date-editor
  * @short_description: A widget which queries a date from user or opens
- * a HildonCalendarPopup
+ * a HildonCalendarPopup.
  * @see_also: #HildonCalendarPopup, #HildonTimeEditor
  * 
  * HildonDateEditor is a widget with three entry fields (day, month,
index c8fde82..8a869e0 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-find-toolbar
- * @short_description: A toolbar with a search field
+ * @short_description: A toolbar with a search field.
  * @see_also: #HildonWindow
  *
  * HildonFindToolbar is a toolbar that contains a search entry and a dropdown
index edd6375..b61c6ae 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * SECTION:hildon-font-selection-dialog
  * @short_description: A widget used to allow users to select a font 
- * with certain properties
+ * with certain properties.
  *
  * Font selection can be made using this widget. Users can select font name, 
  * size, style, etc. Users can also preview text in the selected font.
index 2601258..c5bcc91 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-get-password-dialog
- * @short_description: A widget used to get a password
+ * @short_description: A widget used to get a password.
  * @see_also: #HildonSetPasswordDialog
  * 
  * HildonGetPasswordDialog prompts the user for a password.  It allows
index d148f99..8dfd306 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-hvolumebar
- * @short_description: A widget that displays a horizontal volume bar
+ * @short_description: A widget that displays a horizontal volume bar.
  * @see_also: #HildonVVolumebar, #HildonVolumebar
  * 
  * The #HildonHVolumebar widget displays a horizontal volume bar that allows
index a53a9a2..9fa5b5f 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * SECTION:hildon-login-dialog
  * @short_description: A widget which allows a user to enter an username
- * and a password
+ * and a password.
  * @see_also: #HildonGetPasswordDialog, #HildonSetPasswordDialog
  *
  * #HildonLoginDialog is used to enter a username and password
index 4aebb67..ae59d11 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-note
- * @short_description: A widget to ask confirmation from the user
+ * @short_description: A widget to ask confirmation from the user.
  *
  * Notes are used to for confirmation (OK/Cancel/etc.) from the user.
  * A simple note contains an information text and an OK button to be
index ae96d40..da30e7f 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-number-editor
- * @short_description: A widget used to enter a number within a pre-defined range
+ * @short_description: A widget used to enter a number within a pre-defined range.
  *
  * HildonNumberEditor is used to enter a number from a specific range. 
  * There are two buttons to scroll the value in number field. 
index ca993b6..f74b437 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-range-editor
- * @short_description: A widget is used to ask bounds of a range
+ * @short_description: A widget is used to ask bounds of a range.
  *
  * HidlonRangeEditor allows entering a pair of integers, e.g. the lower
  * and higher bounds of a range. A minimum and maximum can also be set
index 6ea83c6..0acff7e 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-seekbar
- * @short_description: A widget used to identify a place from a content
+ * @short_description: A widget used to identify a place from a content.
  *
  * HildonSeekbar allows seeking in media with a range widget.  It
  * supports for setting or getting the length (total time) of the media,
index 5a4ec4c..60e3390 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-set-password-dialog
- * @short_description: A dialog used to set, change or remove a password
+ * @short_description: A dialog used to set, change or remove a password.
  * @see_also: #HildonGetPasswordDialog
  *
  * HildonSetPasswordDialog allows setting and changing a password. 
index a489dbd..0a38ae6 100644 (file)
@@ -24,7 +24,7 @@
 
 /** 
  * SECTION:hildon-sort-dialog
- * @short_description: A widget for defining the sorting order of items
+ * @short_description: A widget for defining the sorting order of items.
  * 
  * HildonSortDialog is used to define an order (ascending/descending)
  * and a field by which items are sorted in a list. The combo boxes
index 7c1a78c..c29fad7 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-sound
- * @short_description: An esd-based utility function for playing a sound
+ * @short_description: An esd-based utility function for playing a sound.
  * 
  */
 
index 53d93a3..ec5edcb 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * SECTION:hildon-time-editor
  * @short_description: A widget used to enter time or duration in hours, minutes,
- * and optional seconds
+ * and optional seconds.
  * @see_also: #HildonTimePicker
  * 
  * HildonTimeEditor is used to edit time or duration. Time mode is
index 11a97b2..433ae3d 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-time-picker
- * @short_description: A dialog popup widget which lets the user set the time
+ * @short_description: A dialog popup widget which lets the user set the time.
  * @see_also: #HildonTimeEditor
  * 
  * #HildonTimePicker is a dialog popup widget which lets the user set the time,
index e72fe00..688649a 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-volumebar
- * @short_description: Base class for widgets that display a volume bar
+ * @short_description: Base class for widgets that display a volume bar.
  * @see_also: #HildonHVolumebar, #HildonVVolumebar
  *
  * #HildonVolumebar is a base class for widgets that display a volume bar that
index 3cc8b56..f5bb86a 100644 (file)
@@ -24,7 +24,7 @@
 
 /**
  * SECTION:hildon-vvolumebar
- * @short_description: A widget that displays a vertical volume bar
+ * @short_description: A widget that displays a vertical volume bar.
  * @see_also: #HildonVolumebar, #HildonHVolumebar
  *
  * #HildonVVolumebar is a subclass of #HildonVolumebar.  It displays a
index 0fa5f8a..b56135e 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * SECTION:hildon-weekday-picker
  * @short_description: A widget for picking days on which a certain event 
- * should take place
+ * should take place.
  * @see_also: #HildonWeekdayPicker 
  *
  * #HildonWeekdayPicker supports non-mutually exclusive selection of days of 
index 9bc8bb2..b9780df 100644 (file)
@@ -26,7 +26,7 @@
 /**
  * SECTION:hildon-wizard-dialog
  * @short_description: A widget to create a guided installation
- * process wizard
+ * process wizard.
  *
  * #HildonWizardDialog is a widget to create a guided installation
  * process. The dialog has four standard buttons, previous, next,