From: Michael Dominic Kostrzewa Date: Thu, 8 Mar 2007 14:21:48 +0000 (+0000) Subject: Correcting the color button popup API as suggested by Tommi to follow the GtkComboBox... X-Git-Tag: 2.1.66-1~928 X-Git-Url: http://git.maemo.org/git/?a=commitdiff_plain;h=9096a4430dd6d6b0a1060ace3a308936c0a2d117;p=hildon 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. --- diff --git a/ChangeLog.2 b/ChangeLog.2 index c510b35..6c7a094 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,5 +1,13 @@ 2007-03-08 Michael Dominic Kostrzewa + * 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 + * Makefile.am: * configure.ac: * doc/Makefile.am: diff --git a/examples/hildon-color-pop-example.c b/examples/hildon-color-pop-example.c index ebe33a7..307633d 100644 --- a/examples/hildon-color-pop-example.c +++ b/examples/hildon-color-pop-example.c @@ -40,9 +40,9 @@ new_thread_func (gpointer data) 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"); } diff --git a/src/hildon-color-button.c b/src/hildon-color-button.c index 249dcc3..1d2c8c8 100644 --- a/src/hildon-color-button.c +++ b/src/hildon-color-button.c @@ -87,7 +87,7 @@ enum { PROP_0, PROP_COLOR, - PROP_IS_POPPED + PROP_POPUP_SHOWN }; static void @@ -212,14 +212,14 @@ hildon_color_button_class_init (HildonColorButtonClass *klass) 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 @@ hildon_color_button_get_property (GObject *object, 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_set_color (HildonColorButton *button, } /** - * 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_get_is_popped (HildonColorButton *button) } /** - * 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)); diff --git a/src/hildon-color-button.h b/src/hildon-color-button.h index 7aa4dd3..258217d 100644 --- a/src/hildon-color-button.h +++ b/src/hildon-color-button.h @@ -83,10 +83,10 @@ hildon_color_button_set_color (HildonColorButton *button, 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