[gtkmm] RecentFilter: Change RecentFilterFlags to RecentFilter::Flags.



commit 55e3f4511affb6eef15ab4a295d385dabaa51b37
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Apr 27 21:39:51 2017 +0200

    RecentFilter: Change RecentFilterFlags to RecentFilter::Flags.

 gtk/src/recentfilter.ccg |    8 +++++---
 gtk/src/recentfilter.hg  |   11 +++++------
 tools/m4/convert_gtk.m4  |    2 +-
 3 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/gtk/src/recentfilter.ccg b/gtk/src/recentfilter.ccg
index a19a466..c3a24a7 100644
--- a/gtk/src/recentfilter.ccg
+++ b/gtk/src/recentfilter.ccg
@@ -19,6 +19,8 @@
 
 #include <glibmm/ustring.h>
 
+using Flags = Gtk::RecentFilter::Flags;
+
 // This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
 
 static gboolean SignalProxy_Custom_gtk_callback(const GtkRecentFilterInfo* filter_info, gpointer data)
@@ -29,7 +31,7 @@ static gboolean SignalProxy_Custom_gtk_callback(const GtkRecentFilterInfo* filte
   {
     // Create a suitable C++ instance to pass to the C++ method:
     Gtk::RecentFilter::Info cppInfo;
-    cppInfo.contains = (Gtk::RecentFilterFlags)filter_info->contains;
+    cppInfo.contains = (Gtk::RecentFilter::Flags)filter_info->contains;
     cppInfo.uri = Glib::convert_const_gchar_ptr_to_ustring(filter_info->uri);
     cppInfo.display_name = Glib::convert_const_gchar_ptr_to_ustring(filter_info->display_name);
     cppInfo.mime_type = Glib::convert_const_gchar_ptr_to_ustring(filter_info->mime_type);
@@ -65,12 +67,12 @@ namespace Gtk
 {
 
 RecentFilter::Info::Info()
-: contains(Gtk::RecentFilterFlags::MIME_TYPE), //arbitrary default
+: contains(Gtk::RecentFilter::Flags::MIME_TYPE), //arbitrary default
   age(0)
 {
 }
 
-void RecentFilter::add_custom(RecentFilterFlags needed, const SlotCustom& slot)
+void RecentFilter::add_custom(RecentFilter::Flags needed, const SlotCustom& slot)
 {
   // Create a copy of the slot. A pointer to this will be passed through the callback's data parameter.
   // It will be deleted when SignalProxy_Custom_gtk_callback_destroy() is called.
diff --git a/gtk/src/recentfilter.hg b/gtk/src/recentfilter.hg
index bf1321b..5eb900b 100644
--- a/gtk/src/recentfilter.hg
+++ b/gtk/src/recentfilter.hg
@@ -23,9 +23,6 @@ _PINCLUDE(glibmm/private/object_p.h)
 namespace Gtk
 {
 
-_WRAP_ENUM(RecentFilterFlags, GtkRecentFilterFlags)
-
-
 /** RecentFilter can be used to restrict the files being shown
  * in a RecentChooser.  Files can be filtered based on their name
  * (with add_pattern()), on their mime type (with add_mime_type()),
@@ -54,6 +51,8 @@ protected:
   _CTOR_DEFAULT
 
 public:
+  _WRAP_ENUM(Flags, GtkRecentFilterFlags)
+
   _WRAP_CREATE()
 
   _WRAP_METHOD(void set_name(const Glib::ustring& name), gtk_recent_filter_set_name)
@@ -83,7 +82,7 @@ public:
     Info();
 
     ///This bitmask tells us which of the other variables contain useful information.
-    RecentFilterFlags contains;
+    Flags contains;
 
     Glib::ustring uri;
     Glib::ustring display_name;
@@ -96,10 +95,10 @@ public:
   /// For instance, bool on_custom(const Gtk::RecentFilter::Info& filter_info);
   typedef sigc::slot<bool(const Info&)> SlotCustom;
 
-  void add_custom(RecentFilterFlags needed, const SlotCustom& slot);
+  void add_custom(Flags needed, const SlotCustom& slot);
   _IGNORE(gtk_recent_filter_add_custom)
 
-  _WRAP_METHOD(RecentFilterFlags get_needed() const, gtk_recent_filter_get_needed)
+  _WRAP_METHOD(Flags get_needed() const, gtk_recent_filter_get_needed)
 
   // Method is used by class RecentChooser implementors.
   _IGNORE(gtk_recent_filter_filter)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 92104bd..9bacf23 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -136,7 +136,7 @@ _CONV_ENUM(Gtk,FileChooserConfirmation)
 _CONV_ENUM(Gtk,SensitivityType)
 _CONV_INCLASS_ENUM(Gtk,Assistant,PageType)
 _CONV_INCLASS_ENUM(Gtk,IconView,DropPosition)
-_CONV_ENUM(Gtk,RecentFilterFlags)
+_CONV_INCLASS_ENUM(Gtk,RecentFilter,Flags)
 _CONV_ENUM(Gtk,RecentManagerError)
 _CONV_ENUM(Gtk,RecentSortType)
 _CONV_ENUM(Gtk,Unit)


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