[gtkmm] Gtk::Main: Add a constructor with no argc and argv.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::Main: Add a constructor with no argc and argv.
- Date: Mon, 7 Mar 2011 12:31:41 +0000 (UTC)
commit 7d5a3cbec4925af76a4cdff3cfc0ec226a821f55
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Mar 7 13:09:05 2011 +0100
Gtk::Main: Add a constructor with no argc and argv.
* gtk/src/main.[hg|ccg]: Main: Add a public constructor with no argc/argv
parameters, becase that is now officially allowed by the C API.
See https://bugzilla.gnome.org/show_bug.cgi?id=643649#c3
ChangeLog | 8 ++++++++
gtk/src/main.ccg | 13 ++-----------
gtk/src/main.hg | 5 ++++-
3 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3aa68e9..d8bf684 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-03-07 Murray Cumming <murrayc murrayc com>
+
+ Gtk::Main: Add a constructor with no argc and argv.
+
+ * gtk/src/main.[hg|ccg]: Main: Add a public constructor with no argc/argv
+ parameters, becase that is now officially allowed by the C API.
+ See https://bugzilla.gnome.org/show_bug.cgi?id=643649#c3
+
2011-03-04 Murray Cumming <murrayc murrayc com>
Window: Added unset_application,
diff --git a/gtk/src/main.ccg b/gtk/src/main.ccg
index 347d818..da55769 100644
--- a/gtk/src/main.ccg
+++ b/gtk/src/main.ccg
@@ -261,18 +261,9 @@ Main::Main(int* argc, char*** argv, bool set_locale)
init(argc, argv, parameter_string, entries, translation_domain);
}*/
-// Default ctor only used by subclasses:
-Main::Main()
+Main::Main(bool set_locale)
{
- if(instance_ == 0)
- {
- init_gtkmm_internals();
- instance_ = this;
- }
- else
- {
- g_warning("Gtk::Main instantiated twice");
- }
+ init(0, 0, set_locale);
}
Main::~Main()
diff --git a/gtk/src/main.hg b/gtk/src/main.hg
index b5aeb06..c49d000 100644
--- a/gtk/src/main.hg
+++ b/gtk/src/main.hg
@@ -117,6 +117,10 @@ public:
/// See Main(int* argc, char*** argv, bool set_locale).
Main(int& argc, char**& argv, bool set_locale = true);
+
+ /**
+ */
+ explicit Main(bool set_locale = true);
virtual ~Main();
@@ -200,7 +204,6 @@ public:
static void init_gtkmm_internals();
protected:
- Main();
void init(int* argc, char*** argv, bool set_locale);
// TODO: implement this to use the new Glib::OptionEntry argument parsing classes.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]