2008-12-09 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Tue, 9 Dec 2008 12:52:04 +0000 (12:52 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Tue, 9 Dec 2008 12:52:04 +0000 (12:52 +0000)
* src/hildon-gtk.h
* src/hildon-gtk.c
(hildon_gtk_tree_view_set_ui_mode)
(hildon_gtk_icon_view_set_ui_mode): New functions to change the UI
mode of treeviews and iconviews.

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

index d8631b6..4d1bb1e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-09  Alberto Garcia  <agarcia@igalia.com>
+
+       * src/hildon-gtk.h
+       * src/hildon-gtk.c
+       (hildon_gtk_tree_view_set_ui_mode)
+       (hildon_gtk_icon_view_set_ui_mode): New functions to change the UI
+       mode of treeviews and iconviews.
+
 2008-12-09  Claudio Saavedra  <csaavedra@igalia.com>
 
        * src/hildon-touch-selector-entry.c:
index 166f976..48949e7 100644 (file)
@@ -220,6 +220,21 @@ hildon_gtk_tree_view_new_with_model             (HildonUIMode  mode,
 }
 
 /**
+ * hildon_gtk_tree_view_set_ui_mode:
+ * @treeview: A #GtkTreeView
+ * @mode: The new #HildonUIMode
+ *
+ * Sets the UI mode of @treeview to @mode.
+ **/
+void
+hildon_gtk_tree_view_set_ui_mode                (GtkTreeView  *treeview,
+                                                 HildonUIMode  mode)
+{
+    g_return_if_fail (GTK_IS_TREE_VIEW (treeview));
+    g_object_set (treeview, "hildon-ui-mode", mode, NULL);
+}
+
+/**
  * hildon_gtk_icon_view_new:
  * @mode: the Hildon UI mode
  *
@@ -250,6 +265,21 @@ hildon_gtk_icon_view_new_with_model             (HildonUIMode  mode,
 {
     return g_object_new (GTK_TYPE_ICON_VIEW, "hildon-ui-mode", mode, "model", model, NULL);
 }
+
+/**
+ * hildon_gtk_icon_view_set_ui_mode:
+ * @iconview: A #GtkIconView
+ * @mode: The new #HildonUIMode
+ *
+ * Sets the UI mode of @iconview to @mode.
+ **/
+void
+hildon_gtk_icon_view_set_ui_mode                (GtkIconView  *iconview,
+                                                 HildonUIMode  mode)
+{
+    g_return_if_fail (GTK_IS_ICON_VIEW (iconview));
+    g_object_set (iconview, "hildon-ui-mode", mode, NULL);
+}
 #endif /* MAEMO_GTK */
 
 /**
index b382eae..318b446 100644 (file)
@@ -46,12 +46,20 @@ GtkWidget *
 hildon_gtk_tree_view_new_with_model             (HildonUIMode  mode,
                                                  GtkTreeModel *model);
 
+void
+hildon_gtk_tree_view_set_ui_mode                (GtkTreeView  *treeview,
+                                                 HildonUIMode  mode);
+
 GtkWidget *
 hildon_gtk_icon_view_new                        (HildonUIMode mode);
 
 GtkWidget *
 hildon_gtk_icon_view_new_with_model             (HildonUIMode  mode,
                                                  GtkTreeModel *model);
+
+void
+hildon_gtk_icon_view_set_ui_mode                (GtkIconView  *iconview,
+                                                 HildonUIMode  mode);
 #endif /* MAEMO_GTK */
 
 void