[glom/gtkapplication] Do not use Gtk::Main.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/gtkapplication] Do not use Gtk::Main.
- Date: Fri, 10 Feb 2012 12:39:13 +0000 (UTC)
commit a5304156f2e8ffc3bebfe7e3f7b5b56fba82a9ef
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Feb 10 13:36:39 2012 +0100
Do not use Gtk::Main.
* glom/application.cc: create(): Call the new init_gtkmm method.
* glom/main.cc: Remove the use of Gtk::Main because it is no unnecessary.
ChangeLog | 7 +++++++
glom/application.cc | 2 ++
glom/main.cc | 12 ------------
3 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8997f8c..5aafba2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2012-02-10 Murray Cumming <murrayc murrayc com>
+ Do not use Gtk::Main.
+
+ * glom/application.cc: create(): Call the new init_gtkmm method.
+ * glom/main.cc: Remove the use of Gtk::Main because it is no unnecessary.
+
+2012-02-10 Murray Cumming <murrayc murrayc com>
+
--debug-date-check: Do not show the window.
* glom/main_local_options.[h|cc]: Make the handler function a class method,
diff --git a/glom/application.cc b/glom/application.cc
index 4faa91b..30b2413 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -22,6 +22,7 @@
#include <glom/appwindow.h>
#include <glom/main_local_options.h>
#include <glom/glade_utils.h>
+#include <gtkmm/main.h>
#include <glibmm/optioncontext.h>
#include <iostream>
@@ -40,6 +41,7 @@ Application::Application()
Glib::RefPtr<Application> Application::create()
{
+ init_gtkmm();
return Glib::RefPtr<Application>( new Application() );
}
diff --git a/glom/main.cc b/glom/main.cc
index f121a0a..0dc8630 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -29,7 +29,6 @@
#include <glom/libglom/init.h>
#include <glom/libglom/connectionpool.h>
#include <glom/libglom/utils.h>
-#include <gtkmm/main.h>
#include <giomm/file.h>
#include <glibmm/convert.h>
@@ -404,17 +403,6 @@ main(int argc, char* argv[])
//We use python for calculated-fields:
PySys_SetArgv(argc, argv);
- std::auto_ptr<Gtk::Main> mainInstance;
- try
- {
- mainInstance = std::auto_ptr<Gtk::Main>( new Gtk::Main(argc, argv) );
- }
- catch(const Glib::Error& ex)
- {
- std::cerr << "Glom: Error while initializing gtkmm: " << ex.what() << std::endl;
- return EXIT_FAILURE;
- }
-
try
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]