[gtk+] GtkFileFilter: Set name from builder id



commit 6b23c4405602a79fd1772429c9ec820f56bdabdc
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Mar 8 09:10:58 2015 -0400

    GtkFileFilter: Set name from builder id
    
    Suggested in https://bugzilla.gnome.org/show_bug.cgi?id=577862
    as a way to make file filters constructed with GtkBuilder more
    useful.

 gtk/gtkfilefilter.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilefilter.c b/gtk/gtkfilefilter.c
index 45409e2..4803ffa 100644
--- a/gtk/gtkfilefilter.c
+++ b/gtk/gtkfilefilter.c
@@ -122,6 +122,11 @@ static void gtk_file_filter_finalize   (GObject            *object);
 
 
 static void     gtk_file_filter_buildable_init                 (GtkBuildableIface *iface);
+static void     gtk_file_filter_buildable_set_name             (GtkBuildable *buildable,
+                                                                const gchar  *name);
+static const gchar* gtk_file_filter_buildable_get_name         (GtkBuildable *buildable);
+
+
 static gboolean gtk_file_filter_buildable_custom_tag_start     (GtkBuildable  *buildable,
                                                                GtkBuilder    *builder,
                                                                GObject       *child,
@@ -197,6 +202,21 @@ gtk_file_filter_buildable_init (GtkBuildableIface *iface)
 {
   iface->custom_tag_start = gtk_file_filter_buildable_custom_tag_start;
   iface->custom_tag_end = gtk_file_filter_buildable_custom_tag_end;
+  iface->set_name = gtk_file_filter_buildable_set_name;
+  iface->get_name = gtk_file_filter_buildable_get_name;
+}
+
+static void
+gtk_file_filter_buildable_set_name (GtkBuildable *buildable,
+                                    const gchar  *name)
+{
+  gtk_file_filter_set_name (GTK_FILE_FILTER (buildable), name);
+}
+
+static const gchar *
+gtk_file_filter_buildable_get_name (GtkBuildable *buildable)
+{
+  return gtk_file_filter_get_name (GTK_FILE_FILTER (buildable));
 }
 
 typedef enum {


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