[maemo-commits] [maemo-commits] r10467 - in projects/haf/branches/hildon-libs/hildon-1: . examples src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Mar 8 16:21:48 EET 2007
Author: mdk
Date: 2007-03-08 16:21:48 +0200 (Thu, 08 Mar 2007)
New Revision: 10467

Modified:
   projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2
   projects/haf/branches/hildon-libs/hildon-1/examples/hildon-color-pop-example.c
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-color-button.c
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-color-button.h
Log:
Correcting the color button popup API as suggested by Tommi to follow the GtkComboBox popup API. 
The property name is now 'popup-shown' and the force-function is _popdown.


Modified: projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2	2007-03-08 14:13:27 UTC (rev 10466)
+++ projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2	2007-03-08 14:21:48 UTC (rev 10467)
@@ -1,5 +1,13 @@
 2007-03-08  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
 
+	* examples/hildon-color-pop-example.c:
+	* src/hildon-color-button.c:
+	* src/hildon-color-button.h: Correcting the color button popup API as
+	suggested by Tommi to follow the GtkComboBox popup API. The propery
+	name is now 'popup-shown' and the force-function is _popdown. 
+
+2007-03-08  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
+
 	* Makefile.am:
 	* configure.ac:
 	* doc/Makefile.am:

Modified: projects/haf/branches/hildon-libs/hildon-1/examples/hildon-color-pop-example.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/examples/hildon-color-pop-example.c	2007-03-08 14:13:27 UTC (rev 10466)
+++ projects/haf/branches/hildon-libs/hildon-1/examples/hildon-color-pop-example.c	2007-03-08 14:21:48 UTC (rev 10467)
@@ -40,9 +40,9 @@
         sleep (3);
 
 
-        if (hildon_color_button_get_is_popped (button)) {
+        if (hildon_color_button_get_popup_shown (button)) {
                 g_debug ("Dialog popped, trying to close it!");
-                hildon_color_button_pop_up (button);
+                hildon_color_button_popdown (button);
         } else {
                 g_debug ("Dialog not popped, doing nothing");
         }

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-color-button.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-color-button.c	2007-03-08 14:13:27 UTC (rev 10466)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-color-button.c	2007-03-08 14:21:48 UTC (rev 10467)
@@ -87,7 +87,7 @@
 {
     PROP_0,
     PROP_COLOR,
-    PROP_IS_POPPED
+    PROP_POPUP_SHOWN
 };
 
 static void
@@ -212,14 +212,14 @@
                 G_PARAM_READWRITE));
 
     /**
-     * HildonColorButton:is-popped:
+     * HildonColorButton:popup-shown:
      *
-     * If the color selection dialog is currently popped-down (visible)
+     * If the color selection dialog is currently popped-up (visible)
      */
-    g_object_class_install_property (gobject_class, PROP_IS_POPPED,
-            g_param_spec_boolean ("is-popped",
+    g_object_class_install_property (gobject_class, PROP_POPUP_SHOWN,
+            g_param_spec_boolean ("popup-shown",
                 "IsPopped",
-                "If the color selection dialog is popped down",
+                "If the color selection dialog is popped up",
                 FALSE,
                 G_PARAM_READABLE));
 
@@ -504,7 +504,7 @@
             g_value_set_boxed (value, &priv->color);
             break;
 
-        case PROP_IS_POPPED:
+        case PROP_POPUP_SHOWN:
             g_value_set_boolean (value, priv->popped);
 
         default:
@@ -561,17 +561,17 @@
 }
 
 /**
- * hildon_color_button_get_is_popped
+ * hildon_color_button_get_popup_shown
  * @button: a #HildonColorButton
  *
  * This function checks if the color button has the color 
- * selection dialog currently popped-down. 
+ * selection dialog currently popped-up. 
  * 
- * Returns: TRUE if the dialog is popped-down (visible to user).
+ * Returns: TRUE if the dialog is popped-up (visible to user).
  *
  */
 gboolean
-hildon_color_button_get_is_popped               (HildonColorButton *button)
+hildon_color_button_get_popup_shown             (HildonColorButton *button)
 {
     HildonColorButtonPrivate *priv = NULL; 
     g_return_val_if_fail (HILDON_IS_COLOR_BUTTON (button), FALSE);
@@ -583,15 +583,15 @@
 }
 
 /**
- * hildon_color_button_pop_up
+ * hildon_color_button_popdown
  * @button: a #HildonColorButton
  *
- * If the color selection dialog is currently popped-down (visible)
- * it will be popped-up (hidden).
+ * If the color selection dialog is currently popped-up (visible)
+ * it will be popped-down (hidden).
  *
  */
 void
-hildon_color_button_pop_up                      (HildonColorButton *button)
+hildon_color_button_popdown                     (HildonColorButton *button)
 {
     HildonColorButtonPrivate *priv = NULL; 
     g_return_if_fail (HILDON_IS_COLOR_BUTTON (button));

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-color-button.h
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-color-button.h	2007-03-08 14:13:27 UTC (rev 10466)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-color-button.h	2007-03-08 14:21:48 UTC (rev 10467)
@@ -83,10 +83,10 @@
                                                  GdkColor *color);
 
 gboolean
-hildon_color_button_get_is_popped               (HildonColorButton *button);
+hildon_color_button_get_popup_shown             (HildonColorButton *button);
 
 void
-hildon_color_button_pop_up                      (HildonColorButton *button);
+hildon_color_button_popdown                     (HildonColorButton *button);
 
 G_END_DECLS
 


More information about the maemo-commits mailing list