2008-09-04 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Thu, 4 Sep 2008 13:26:06 +0000 (13:26 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Thu, 4 Sep 2008 13:26:06 +0000 (13:26 +0000)
* src/hildon-button.h
* src/hildon-button.c (hildon_button_get_image): New method to
retrieve the image.

ChangeLog
src/hildon-button.c
src/hildon-button.h

index 13ee3e2..b146c4b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-04  Alberto Garcia  <agarcia@igalia.com>
+
+       * src/hildon-button.h
+       * src/hildon-button.c (hildon_button_get_image): New method to
+       retrieve the image.
+
 2008-09-04  Claudio Saavedra  <csaavedra@igalia.com>
 
        * src/hildon-touch-selector.c:
index 0a9620b..2c3cca2 100644 (file)
@@ -34,6 +34,9 @@
  * an image. To change the alignment of the button contents, use
  * gtk_button_set_alignment()
  *
+ * If only one label is needed, #GtkButton can be used as well, see
+ * also hildon_gtk_button_new().
+ *
  * <example>
  * <title>Creating a HildonButton</title>
  * <programlisting>
@@ -615,6 +618,27 @@ hildon_button_set_image                         (HildonButton *button,
 }
 
 /**
+ * hildon_button_get_image:
+ * @button: a #HildonButton
+ *
+ * Gets the widget that is currenty set as the image of @button,
+ * previously set with hildon_button_set_image()
+ *
+ * Returns: a #GtkWidget or %NULL in case there is no image
+ **/
+GtkWidget *
+hildon_button_get_image                         (HildonButton *button)
+{
+    HildonButtonPrivate *priv;
+
+    g_return_val_if_fail (HILDON_IS_BUTTON (button), NULL);
+
+    priv = HILDON_BUTTON_GET_PRIVATE (button);
+
+    return priv->image;
+}
+
+/**
  * hildon_button_set_image_position:
  * @button: a #HildonButton
  * @position: the position of the image (%GTK_POS_LEFT or %GTK_POS_RIGHT)
index 049f090..7019ff7 100644 (file)
@@ -99,6 +99,9 @@ void
 hildon_button_set_image                         (HildonButton *button,
                                                  GtkWidget    *image);
 
+GtkWidget *
+hildon_button_get_image                         (HildonButton *button);
+
 void
 hildon_button_set_image_position                (HildonButton    *button,
                                                  GtkPositionType  position);