diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index 242a55d4cf..973a90dc06 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 c67c92bb0a..5bd82b3995 100644 --- a/gtk/gtkpathbar.h +++ b/gtk/gtkpathbar.h @@ -24,6 +24,7 @@ #include #include +#include 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,