[Xfce4-commits] <midori:master> Omit property labels if the proxy would have it included already

Christian Dywan noreply at xfce.org
Thu Oct 29 10:00:08 CET 2009


Updating branch refs/heads/master
         to c541a75ae1847c2fc650184d0ba27cbf7c4f1531 (commit)
       from 616f62a10e81c54dd93b6a6e46364bb6d91c549a (commit)

commit c541a75ae1847c2fc650184d0ba27cbf7c4f1531
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Oct 28 23:57:27 2009 +0100

    Omit property labels if the proxy would have it included already
    
    Picker buttons in Hildon contain the label.

 katze/katze-utils.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/katze/katze-utils.c b/katze/katze-utils.c
index 0a88dfd..eb1b155 100644
--- a/katze/katze-utils.c
+++ b/katze/katze-utils.c
@@ -272,7 +272,10 @@ katze_app_info_get_all_for_category (const gchar* category)
  * Any other values for @hint are silently ignored.
  *
  * Since 0.1.2 strings without hints and booleans are truly synchronous
- * including property changes causing the proxy to be updated.
+ *     including property changes causing the proxy to be updated.
+ *
+ * Since 0.2.1 the proxy may contain a label if the platform
+ *     has according widgets.
  *
  * Return value: a new widget
  **/
@@ -539,7 +542,7 @@ katze_property_proxy (gpointer     object,
         #ifdef HAVE_HILDON_2_2
         GtkWidget* selector;
 
-        widget = hildon_picker_button_new (HILDON_SIZE_AUTO, HILDON_BUTTON_ARRANGEMENT_VERTICAL);
+        widget = hildon_picker_button_new (HILDON_SIZE_AUTO, HILDON_BUTTON_ARRANGEMENT_HORIZONTAL);
         selector = hildon_touch_selector_new_text ();
         hildon_button_set_title (HILDON_BUTTON (widget), gettext (nick));
         hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (widget),
@@ -588,6 +591,9 @@ katze_property_proxy (gpointer     object,
  * Create a label widget displaying the name of the specified object's property.
  *
  * Return value: a new label widget
+ *
+ * Since 0.2.1 the label will be empty if the property proxy for the
+ *    same property would contain a label already.
  **/
 GtkWidget*
 katze_property_label (gpointer     object,
@@ -608,6 +614,12 @@ katze_property_label (gpointer     object,
                    property, G_OBJECT_CLASS_NAME (class));
         return gtk_label_new (property);
     }
+
+    #ifdef HAVE_HILDON_2_2
+    if (G_PARAM_SPEC_TYPE (pspec) == G_TYPE_PARAM_ENUM)
+        return gtk_label_new (NULL);
+    #endif
+
     nick = g_param_spec_get_nick (pspec);
     widget = gtk_label_new (nick);
     gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);



More information about the Xfce4-commits mailing list