[gtkmm] Main: Undeprecate add_gtk_option_group(), because it is still needed.



commit 7dace94e3b32202d647acb93097fee38a3c12d53
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Jan 29 11:20:10 2014 +0100

    Main: Undeprecate add_gtk_option_group(), because it is still needed.
    
    * gtk/src/main.[hg|ccg]: We should probably move it out of Main,
      along with some other functions from here, but Main does not feel
      completely deprecated anyway because Application still cannot
      properly handle GOption.

 gtk/src/main.ccg |    3 +--
 gtk/src/main.hg  |    8 ++++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtk/src/main.ccg b/gtk/src/main.ccg
index 35764c0..59df7fd 100644
--- a/gtk/src/main.ccg
+++ b/gtk/src/main.ccg
@@ -352,8 +352,6 @@ void Main::init_gtkmm_internals()
   }
 }
 
-_DEPRECATE_IFDEF_START
-
 void Main::add_gtk_option_group(Glib::OptionContext& option_context, bool open_default_display)
 {
   //Get the option group:
@@ -363,6 +361,7 @@ void Main::add_gtk_option_group(Glib::OptionContext& option_context, bool open_d
   option_context.add_group(gtkgroup);
 }
 
+_DEPRECATE_IFDEF_START
 
 /**** Gtk::Main -- static forwarder methods ********************************/
 
diff --git a/gtk/src/main.hg b/gtk/src/main.hg
index 8323a00..ea39660 100644
--- a/gtk/src/main.hg
+++ b/gtk/src/main.hg
@@ -200,6 +200,12 @@ _DEPRECATE_IFDEF_START
    */
   static guint level();
 
+_DEPRECATE_IFDEF_END
+
+  //TODO: Move these general methods out of Main when we really remove Main,
+  //one day when Gtk::Application can really do everything, which should probably
+  //include handling OptionContext properly. murrayc. 
+
   //This attempts to provide the same functionality as gtk_get_option_group():
   /** Add a Glib::OptionGroup, for the commandline arguments recognized
    * by GTK+ and GDK, to a Glib::OptionContext, so that these commandline arguments will
@@ -215,8 +221,6 @@ _DEPRECATE_IFDEF_START
    */
   static void add_gtk_option_group(Glib::OptionContext& option_context, bool open_default_display = true);
 
-_DEPRECATE_IFDEF_END
-
 
   /** Runs a single iteration of the main loop.
    * If no events are waiting to be processed GTK+ will block until the next event is noticed.


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