[glom/gtkapplication] Remove use of Gtk::Main functions.



commit 175b9fc3964d3b8ce961cae1f716436528203299
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Feb 10 17:12:35 2012 +0100

    Remove use of Gtk::Main functions.
    
    	* glom/bakery/busy_cursor.cc:
    	* glom/import_csv/dialog_import_csv_progress.cc: Use the C API for
    	events_pending/iteration to avoid a crash.

 ChangeLog                                     |    8 ++++++++
 glom/bakery/busy_cursor.cc                    |    5 +++--
 glom/import_csv/dialog_import_csv_progress.cc |    5 +++--
 3 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c78d66b..11b7a78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2012-02-10  Murray Cumming  <murrayc murrayc com>
 
+	Remove use of Gtk::Main functions.
+
+	* glom/bakery/busy_cursor.cc:
+	* glom/import_csv/dialog_import_csv_progress.cc: Use the C API for 
+	events_pending/iteration to avoid a crash.
+
+2012-02-10  Murray Cumming  <murrayc murrayc com>
+
 	AppWindow: Rename get_application() to get_appwindow().
 
 2012-02-10  Murray Cumming  <murrayc murrayc com>
diff --git a/glom/bakery/busy_cursor.cc b/glom/bakery/busy_cursor.cc
index 04426fc..96d909e 100644
--- a/glom/bakery/busy_cursor.cc
+++ b/glom/bakery/busy_cursor.cc
@@ -75,8 +75,9 @@ void BusyCursor::force_gui_update()
   if(m_refWindow)
   {
     //Force the GUI to update:
-    while(Gtk::Main::events_pending())
-      Gtk::Main::iteration();
+    //TODO: Make sure that gtkmm has some non-Gtk::Main API for this:
+    while(gtk_events_pending())
+      gtk_main_iteration_do(true);
   }
 }
 
diff --git a/glom/import_csv/dialog_import_csv_progress.cc b/glom/import_csv/dialog_import_csv_progress.cc
index 4529cfa..90ed8a2 100644
--- a/glom/import_csv/dialog_import_csv_progress.cc
+++ b/glom/import_csv/dialog_import_csv_progress.cc
@@ -157,8 +157,9 @@ bool Dialog_Import_CSV_Progress::on_idle_import()
   
   //Allow GTK+ to process events, so that the UI is responsive.
   //TODO: This does not seem to actually work.
-  while(Gtk::Main::events_pending())
-   Gtk::Main::iteration();
+  //TODO: Make sure that gtkmm has some non-Gtk::Main API for this:
+  while(gtk_events_pending())
+    gtk_main_iteration_do(true);
 
   const CsvParser::type_row_strings row = m_data_source->get_parser().fetch_next_row();
 



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