[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_1-18-g37a7cab

Philippe Delorme nobody at users.sourceforge.net
Sat Apr 30 23:56:35 CEST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  37a7cabf0a65640c1eac2cf9fccea16a12e5059b (commit)
      from  b7bebd81e03af1c4e90b3a4f3295a262f9f372db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 37a7cabf0a65640c1eac2cf9fccea16a12e5059b
Author: Philippe Delorme <philippedelorme at users.sourceforge.net>
Date:   Sat Apr 30 23:34:24 2011 +0200

    Remove call to a glib deprecated function (g_main_iteration)
    
    See http://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#g-main-iteration
    
    In GLib, g_main_iteration points to g_main_context_iteration thanks to a MACRO.
    But g_main_iteration may not be in GLib if G_DISABLE_DEPRECATED is defined for compilation (see glib/gmain.h)

-----------------------------------------------------------------------

Changes:
diff --git a/src/etats_gtktable.c b/src/etats_gtktable.c
index dc9477b..17a2358 100644
--- a/src/etats_gtktable.c
+++ b/src/etats_gtktable.c
@@ -252,7 +252,7 @@ gint gtktable_initialise ( GSList * opes_selectionnees, gchar * filename )
 
     /* just update screen so that the user does not see the previous report anymore
      * while we are processing the new report */
-    update_ecran ( );
+    update_gui ( );
 
     table_etat = gtk_table_new ( 0, nb_colonnes, FALSE );
     gtk_table_set_col_spacings ( GTK_TABLE ( table_etat ), 5 );
diff --git a/src/gsb_status.c b/src/gsb_status.c
index 04ac73e..1c6357f 100644
--- a/src/gsb_status.c
+++ b/src/gsb_status.c
@@ -100,10 +100,8 @@ void gsb_status_message ( gchar * message )
     gsb_status_clear ();
     message_id = gtk_statusbar_push ( GTK_STATUSBAR (main_statusbar), context_id, message );
 
-    /** Call gtk_main_iteration() to ensure status message is
-     * displayed.  This is done because we need to display it
-     * immediately without waiting to return to gtk_main().  */
-    while ( gtk_events_pending () ) gtk_main_iteration ( );
+    /* force status message to be displayed NOW */
+    update_gui ( );
 }
 
 
@@ -122,10 +120,8 @@ void gsb_status_clear (  )
 	message_id = -1;
     }
 
-    /** Call gtk_main_iteration() to ensure status message is
-     * displayed.  This is done because we need to display it
-     * immediately without waiting to return to gtk_main().  */
-    while ( gtk_events_pending () ) gtk_main_iteration ( );
+    /* force status message to be displayed NOW */
+    update_gui ( );
 }
 
 
@@ -167,9 +163,7 @@ void gsb_status_wait ( gboolean force_update )
     }
 
     if ( force_update )
-    {
-	update_ecran ();
-    }
+	update_gui ( );
 }
 
 
@@ -194,9 +188,7 @@ void gsb_status_stop_wait ( gboolean force_update )
     }
 
     if ( force_update )
-    {
-	update_ecran ();
-    }
+	update_gui ( );
 }
 
 
diff --git a/src/import.c b/src/import.c
index a84f577..31f68a4 100644
--- a/src/import.c
+++ b/src/import.c
@@ -1960,7 +1960,8 @@ void gsb_import_create_imported_transactions ( struct struct_compte_importation
         if ( nbre_transaction > NBRE_TRANSACTION_FOR_PROGRESS_BAR )
         {
             gsb_import_progress_bar_pulse ( progress, nbre_transaction );
-            while ( gtk_events_pending () ) gtk_main_iteration ( );
+            /* update progress bar NOW */
+            update_gui ( );
             nbre_transaction --;
         }
 
diff --git a/src/navigation.c b/src/navigation.c
index 493a49e..d95b5b9 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -1094,9 +1094,6 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
     page_number = gsb_gui_navigation_get_current_page ();
     gtk_notebook_set_current_page ( GTK_NOTEBOOK ( gsb_gui_get_general_notebook ( ) ), page_number );
 
-    /* step forward in GUI loops (context menu, ...) */
-/*     update_ecran ( );  */
-
     if ( page_number != GSB_ACCOUNT_PAGE )
     {
         gsb_gui_sensitive_menu_item ( "/menubar/EditMenu/NewTransaction", FALSE );
diff --git a/src/utils.c b/src/utils.c
index 208974d..d8ed22a 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -444,18 +444,19 @@ gboolean assert_account_loaded ()
 
 
 
-
-
-/******************************************************************************/
-/* cette fonction rafraichit l'écran pendant les traitements d'information */
-/******************************************************************************/
-void update_ecran ( void )
+/**
+ * Function to explicitly update window "outside gtk_main ( )"
+ * For example during computations
+ *
+ * \return
+ */
+void update_gui ( void )
 {
     devel_debug (NULL);
 
-    while ( g_main_iteration (FALSE));
+    while ( gtk_events_pending ( ) )
+        gtk_main_iteration ( );
 }
-/******************************************************************************/
 
 
 void register_button_as_linked ( GtkWidget *widget, GtkWidget *linked )
diff --git a/src/utils.h b/src/utils.h
index 66ee0da..f5c1879 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -28,7 +28,7 @@ gboolean sens_desensitive_pointeur ( GtkWidget *bouton,
                         GtkWidget *widget );
 gboolean sensitive_widget ( gpointer object,
                         GtkWidget *widget );
-void update_ecran ( void );
+void update_gui ( void );
 void utils_set_tree_view_selection_and_text_color ( GtkWidget *tree_view );
 /* END_DECLARATION */
 #endif


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list