[gtk+/pathbar: 2/8] Add gtk_path_bar_new()



commit 3596f5b6c8c5209b03901d7730f3c63b018f7cd9
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Apr 24 20:49:10 2013 -0400

    Add gtk_path_bar_new()
    
    What do you know, we never had it...
    
    Signed-off-by: Federico Mena Quintero <federico gnome org>

 gtk/gtkpathbar.c |   14 ++++++++++++++
 gtk/gtkpathbar.h |    4 ++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 242a55d..973a90d 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -2005,3 +2005,17 @@ _gtk_path_bar_down (GtkPathBar *path_bar)
        }
     }
 }
+
+/**
+ * gtk_path_bar_new:
+ *
+ * Creates a new #GtkPathBar.  You need to set a path on it with
+ * gtk_path_bar_set_location() for it to show anything.
+ *
+ * Return value: a newly-created #GtkPathBar.
+ */
+GtkWidget *
+gtk_path_bar_new (void)
+{
+  return GTK_WIDGET (g_object_new (GTK_TYPE_PATH_BAR, NULL));
+}
diff --git a/gtk/gtkpathbar.h b/gtk/gtkpathbar.h
index c67c92b..5bd82b3 100644
--- a/gtk/gtkpathbar.h
+++ b/gtk/gtkpathbar.h
@@ -24,6 +24,7 @@
 
 #include <gtk/gtkcontainer.h>
 #include <gtk/gtkfilesystem.h>
+#include <gtk/gtkplacessidebar.h>
 
 G_BEGIN_DECLS
 
@@ -57,6 +58,9 @@ struct _GtkPathBarClass
 };
 
 GType    gtk_path_bar_get_type (void) G_GNUC_CONST;
+
+GtkWidget *gtk_path_bar_new (void);
+
 void     _gtk_path_bar_set_file_system (GtkPathBar         *path_bar,
                                        GtkFileSystem      *file_system);
 void     _gtk_path_bar_set_file        (GtkPathBar         *path_bar,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]