[gtkmm] Gdk, Gtk: Use {} for default values of method arguments



commit 3c22485821d3dd80c59819e26a2bd7c3e416098a
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Tue Jan 15 15:26:33 2019 +0100

    Gdk, Gtk: Use {} for default values of method arguments
    
    See issue glibmm#20

 gdk/src/seat.hg              |  4 ++--
 gtk/gtkmm/accelkey.h         |  4 ++--
 gtk/gtkmm/listviewtext.h     |  6 +++---
 gtk/src/application.hg       |  4 ++--
 gtk/src/aspectframe.hg       |  2 +-
 gtk/src/filechoosernative.hg |  8 ++++----
 gtk/src/menutoolbutton.hg    |  2 +-
 gtk/src/papersize.hg         |  2 +-
 gtk/src/radiotoolbutton.hg   |  4 ++--
 gtk/src/textiter.hg          | 10 +++++-----
 gtk/src/toggletoolbutton.hg  |  2 +-
 gtk/src/toolbutton.hg        |  2 +-
 12 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/gdk/src/seat.hg b/gdk/src/seat.hg
index 3afca858..1e623658 100644
--- a/gdk/src/seat.hg
+++ b/gdk/src/seat.hg
@@ -60,9 +60,9 @@ public:
   _WRAP_METHOD(GrabStatus grab(const Glib::RefPtr<Surface>& surface,
                Capabilities capabilities,
                bool owner_events,
-               const Glib::RefPtr<Cursor>& cursor = Glib::RefPtr<Cursor>(),
+               const Glib::RefPtr<Cursor>& cursor = {},
                const Glib::RefPtr<const Event>& event = {},
-               const SlotGrabPrepare& slot = SlotGrabPrepare()),
+               const SlotGrabPrepare& slot = {}),
                gdk_seat_grab, slot_name slot, slot_callback Seat_grab_callback, no_slot_copy)
 
   _WRAP_METHOD(void ungrab(), gdk_seat_ungrab)
diff --git a/gtk/gtkmm/accelkey.h b/gtk/gtkmm/accelkey.h
index 0e9f42e0..d3c575b5 100644
--- a/gtk/gtkmm/accelkey.h
+++ b/gtk/gtkmm/accelkey.h
@@ -45,7 +45,7 @@ public:
   * @param accel_path For instance, "<MainWindow>/File/Open"
   */
   AccelKey(guint accel_key, Gdk::ModifierType accel_mods,
-           const Glib::ustring& accel_path = Glib::ustring());
+           const Glib::ustring& accel_path = {});
 
   /** AccelKey constructor.
    * @param accelerator For instance, &quot;&lt;control&gt;q&quot; - Use
@@ -54,7 +54,7 @@ public:
    * @param accel_path For instance, "<MainWindow>/File/Open"
    */
   AccelKey(const Glib::ustring& accelerator,
-           const Glib::ustring& accel_path = Glib::ustring());
+           const Glib::ustring& accel_path = {});
 
   AccelKey(const AccelKey& src);
 
diff --git a/gtk/gtkmm/listviewtext.h b/gtk/gtkmm/listviewtext.h
index 3d4807f5..6980f45e 100644
--- a/gtk/gtkmm/listviewtext.h
+++ b/gtk/gtkmm/listviewtext.h
@@ -61,18 +61,18 @@ public:
    * @param column_one_value the new text for the new row, column 0
    * @return the number of the row added
    */
-  guint append(const Glib::ustring& column_one_value = Glib::ustring());
+  guint append(const Glib::ustring& column_one_value = {});
 
   /** Insert a new row at the beginning of the list
    * @param column_one_value the new text for the new row, column 0
    */
-  void prepend(const Glib::ustring& column_one_value = Glib::ustring());
+  void prepend(const Glib::ustring& column_one_value = {});
 
   /** Insert a new row at an arbitrary position in the list
    * @param row The row number
    * @param column_one_value the new text for the new row, column 0
    */
-  void insert(guint row, const Glib::ustring& column_one_value = Glib::ustring());
+  void insert(guint row, const Glib::ustring& column_one_value = {});
 
   /// Discard all row:
   void clear_items();
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index ff008aa8..86fdd6c7 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -109,7 +109,7 @@ protected:
    *
    * @newin{3,4}
    */
-  explicit Application(const Glib::ustring& application_id = Glib::ustring(), Gio::Application::Flags flags 
= Gio::Application::Flags::NONE);
+  explicit Application(const Glib::ustring& application_id = {}, Gio::Application::Flags flags = 
Gio::Application::Flags::NONE);
   _IGNORE(gtk_application_new)
   _IGNORE(gtk_application_window_new)
 
@@ -133,7 +133,7 @@ public:
    *
    * @newin{3,4}
    */
-  static Glib::RefPtr<Application> create(const Glib::ustring& application_id = Glib::ustring(), 
Gio::Application::Flags flags = Gio::Application::Flags::NONE);
+  static Glib::RefPtr<Application> create(const Glib::ustring& application_id = {}, Gio::Application::Flags 
flags = Gio::Application::Flags::NONE);
 
 #m4 _CONVERSION(`GList*',`std::vector<Window*>',`Glib::ListHandler<Window*>::list_to_vector($3, 
Glib::OWNERSHIP_NONE)')
   _WRAP_METHOD(std::vector<Window*> get_windows(), gtk_application_get_windows)
diff --git a/gtk/src/aspectframe.hg b/gtk/src/aspectframe.hg
index 53425c3a..298071a6 100644
--- a/gtk/src/aspectframe.hg
+++ b/gtk/src/aspectframe.hg
@@ -50,7 +50,7 @@ public:
    * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
    *   is taken from the requisition of the child.
    */
-  _WRAP_CTOR(AspectFrame(const Glib::ustring& label = Glib::ustring(),
+  _WRAP_CTOR(AspectFrame(const Glib::ustring& label = {},
     Align xalign = Gtk::Align::CENTER, Align yalign = Gtk::Align::CENTER,
     float ratio = 1.0, bool obey_child = false), gtk_aspect_frame_new)
 
diff --git a/gtk/src/filechoosernative.hg b/gtk/src/filechoosernative.hg
index b213f0bf..718fb428 100644
--- a/gtk/src/filechoosernative.hg
+++ b/gtk/src/filechoosernative.hg
@@ -138,13 +138,13 @@ public:
    * @return A Glib::RefPtr to a new %FileChooserNative.
    */
   _WRAP_CREATE(const Glib::ustring& title, Window& parent{?},
-    FileChooser::Action action, const Glib::ustring& accept_label = Glib::ustring(),
-    const Glib::ustring& cancel_label = Glib::ustring())
+    FileChooser::Action action, const Glib::ustring& accept_label = {},
+    const Glib::ustring& cancel_label = {})
 
   _WRAP_METHOD(Glib::ustring get_accept_label() const, gtk_file_chooser_native_get_accept_label, newin 
"3,24")
-  _WRAP_METHOD(void set_accept_label(const Glib::ustring& accept_label{NULL} = Glib::ustring()), 
gtk_file_chooser_native_set_accept_label, newin "3,24")
+  _WRAP_METHOD(void set_accept_label(const Glib::ustring& accept_label{NULL} = {}), 
gtk_file_chooser_native_set_accept_label, newin "3,24")
   _WRAP_METHOD(Glib::ustring get_cancel_label() const, gtk_file_chooser_native_get_cancel_label, newin 
"3,24")
-  _WRAP_METHOD(void set_cancel_label(const Glib::ustring& cancel_label{NULL} = Glib::ustring()), 
gtk_file_chooser_native_set_cancel_label, newin "3,24")
+  _WRAP_METHOD(void set_cancel_label(const Glib::ustring& cancel_label{NULL} = {}), 
gtk_file_chooser_native_set_cancel_label, newin "3,24")
 
   _WRAP_PROPERTY("accept-label", Glib::ustring, newin "3,24")
   _WRAP_PROPERTY("cancel-label", Glib::ustring, newin "3,24")
diff --git a/gtk/src/menutoolbutton.hg b/gtk/src/menutoolbutton.hg
index 58b5dd59..3206237b 100644
--- a/gtk/src/menutoolbutton.hg
+++ b/gtk/src/menutoolbutton.hg
@@ -56,7 +56,7 @@ public:
    * @param icon_widget The widget placed as the MenuToolButton's icon.
    * @param label The string used to display the label for this MenuToolButton.
    */
-  explicit MenuToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
+  explicit MenuToolButton(Widget& icon_widget, const Glib::ustring& label = {});
 
   _WRAP_METHOD(void set_menu(Menu& menu), gtk_menu_tool_button_set_menu)
   _WRAP_METHOD(Menu* get_menu(), gtk_menu_tool_button_get_menu)
diff --git a/gtk/src/papersize.hg b/gtk/src/papersize.hg
index 69ee4ce1..33bd694a 100644
--- a/gtk/src/papersize.hg
+++ b/gtk/src/papersize.hg
@@ -72,7 +72,7 @@ public:
    *
    * @throws Gtk::PrintError, Glib::KeyFileError
    */
-  explicit PaperSize(const Glib::KeyFile& key_file, const Glib::ustring& group_name = Glib::ustring());
+  explicit PaperSize(const Glib::KeyFile& key_file, const Glib::ustring& group_name = {});
 
   _IGNORE(gtk_paper_size_copy, gtk_paper_size_free, gtk_paper_size_is_equal)
   bool equal(const PaperSize& other) const;
diff --git a/gtk/src/radiotoolbutton.hg b/gtk/src/radiotoolbutton.hg
index 081b79c3..154a2e3f 100644
--- a/gtk/src/radiotoolbutton.hg
+++ b/gtk/src/radiotoolbutton.hg
@@ -69,7 +69,7 @@ public:
    *
    * @newin{2,4}
    */
-  explicit RadioToolButton(Group& group, const Glib::ustring& label = Glib::ustring());
+  explicit RadioToolButton(Group& group, const Glib::ustring& label = {});
   _IGNORE(gtk_radio_tool_button_new)
 
   //This would look too much like a copy constructor:
@@ -90,7 +90,7 @@ public:
    *
    * @newin{2,4}
    */
-  explicit RadioToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
+  explicit RadioToolButton(Widget& icon_widget, const Glib::ustring& label = {});
 
 
   _WRAP_METHOD(Group get_group(), gtk_radio_tool_button_get_group)
diff --git a/gtk/src/textiter.hg b/gtk/src/textiter.hg
index f08b0a9c..c51acd8d 100644
--- a/gtk/src/textiter.hg
+++ b/gtk/src/textiter.hg
@@ -89,9 +89,9 @@ public:
   _WRAP_METHOD(Glib::ustring get_visible_slice(const TextIterBase& end) const, 
gtk_text_iter_get_visible_slice)
   _WRAP_METHOD(Glib::ustring get_visible_text(const TextIterBase& end) const, gtk_text_iter_get_visible_text)
 
-  _WRAP_METHOD(bool starts_tag(const Glib::RefPtr<const TextTag>& tag = Glib::RefPtr<const TextTag>()) 
const, gtk_text_iter_starts_tag)
-  _WRAP_METHOD(bool ends_tag(const Glib::RefPtr<const TextTag>& tag = Glib::RefPtr<const TextTag>()) const, 
gtk_text_iter_ends_tag)
-  _WRAP_METHOD(bool toggles_tag(const Glib::RefPtr<const TextTag>& tag = Glib::RefPtr<const TextTag>()) 
const, gtk_text_iter_toggles_tag)
+  _WRAP_METHOD(bool starts_tag(const Glib::RefPtr<const TextTag>& tag = {}) const, gtk_text_iter_starts_tag)
+  _WRAP_METHOD(bool ends_tag(const Glib::RefPtr<const TextTag>& tag = {}) const, gtk_text_iter_ends_tag)
+  _WRAP_METHOD(bool toggles_tag(const Glib::RefPtr<const TextTag>& tag = {}) const, 
gtk_text_iter_toggles_tag)
   _WRAP_METHOD(bool has_tag(const Glib::RefPtr<const TextTag>& tag) const, gtk_text_iter_has_tag)
 
   _WRAP_METHOD(bool editable(bool default_setting = true) const, gtk_text_iter_editable)
@@ -165,8 +165,8 @@ public:
   _WRAP_METHOD(void set_visible_line_offset(int char_on_line), gtk_text_iter_set_visible_line_offset)
   _WRAP_METHOD(void set_visible_line_index(int byte_on_line), gtk_text_iter_set_visible_line_index)
 
-  _WRAP_METHOD(bool forward_to_tag_toggle(const Glib::RefPtr<const TextTag>& tag = Glib::RefPtr<const 
TextTag>()), gtk_text_iter_forward_to_tag_toggle)
-  _WRAP_METHOD(bool backward_to_tag_toggle(const Glib::RefPtr<const TextTag>& tag = Glib::RefPtr<const 
TextTag>()), gtk_text_iter_backward_to_tag_toggle)
+  _WRAP_METHOD(bool forward_to_tag_toggle(const Glib::RefPtr<const TextTag>& tag = {}), 
gtk_text_iter_forward_to_tag_toggle)
+  _WRAP_METHOD(bool backward_to_tag_toggle(const Glib::RefPtr<const TextTag>& tag = {}), 
gtk_text_iter_backward_to_tag_toggle)
 
   /** A slot that will be called on each consecutive character.
    * forward_find_char() and backward_find_char() advance the iterator one
diff --git a/gtk/src/toggletoolbutton.hg b/gtk/src/toggletoolbutton.hg
index 79c35527..6f4e4c41 100644
--- a/gtk/src/toggletoolbutton.hg
+++ b/gtk/src/toggletoolbutton.hg
@@ -57,7 +57,7 @@ public:
    * @param icon_widget The widget placed as the ToggleToolButton's icon.
    * @param label The string used to display the label for this ToggleToolButton.
    */
-  explicit ToggleToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
+  explicit ToggleToolButton(Widget& icon_widget, const Glib::ustring& label = {});
 
   _WRAP_METHOD(void set_active(bool is_active = true), gtk_toggle_tool_button_set_active)
   _WRAP_METHOD(bool get_active() const, gtk_toggle_tool_button_get_active)
diff --git a/gtk/src/toolbutton.hg b/gtk/src/toolbutton.hg
index 4da06a2d..402203f2 100644
--- a/gtk/src/toolbutton.hg
+++ b/gtk/src/toolbutton.hg
@@ -57,7 +57,7 @@ public:
    * @param icon_widget The widget placed as the ToolButton's icon.
    * @param label The string used to display the label for this ToolButton.
    */
-  _WRAP_CTOR(ToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring()), 
gtk_tool_button_new)
+  _WRAP_CTOR(ToolButton(Widget& icon_widget, const Glib::ustring& label = {}), gtk_tool_button_new)
 
   _WRAP_METHOD(void set_label(const Glib::ustring& label), gtk_tool_button_set_label)
   _WRAP_METHOD(Glib::ustring get_label() const, gtk_tool_button_get_label)


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