[grisbi-cvs] grisbi/src gsb_bank.c, 1.13, 1.14 gsb_crypt.c, 1.12, 1.13 gsb_currency.c, 1.30, 1.31 gsb_currency_config.c, 1.38, 1.39 gsb_payment_method_config.c, 1.27, 1.28

Martin Stromberger fabiolla at users.sourceforge.net
Sun Dec 7 23:57:54 CET 2008


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24538/src

Modified Files:
	gsb_bank.c gsb_crypt.c gsb_currency.c gsb_currency_config.c 
	gsb_payment_method_config.c 
Log Message:
unified handling for dialoges (part_02)

Index: gsb_payment_method_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_payment_method_config.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- gsb_payment_method_config.c	11 Nov 2008 19:52:15 -0000	1.27
+++ gsb_payment_method_config.c	7 Dec 2008 22:57:51 -0000	1.28
@@ -1,6 +1,6 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     copyright (c)	2000-2007 Cédric Auger (cedric at grisbi.org)	      */
+/*     copyright (c)	2000-2007 C�dric Auger (cedric at grisbi.org)	      */
 /*			2004-2007 Benjamin Drieu (bdrieu at april.org) 	      */
 /*			http://www.grisbi.org   			      */
 /*                                                                            */
@@ -58,7 +58,7 @@
 static gboolean gsb_payment_method_config_auto_entry_changed ( GtkWidget *spin_button,
 							GtkWidget *tree_view );
 static void gsb_payment_method_config_fill_list ( GtkTreeModel *model);
-static gboolean gsb_payment_method_config_foreach_select ( GtkTreeModel *model, GtkTreePath *path, 
+static gboolean gsb_payment_method_config_foreach_select ( GtkTreeModel *model, GtkTreePath *path,
 						    GtkTreeIter *iter, gint *payment_number_data );
 static gint gsb_payment_method_config_get_transaction_by_sign ( gint account_number,
 							 gint signe_type,
@@ -147,8 +147,8 @@
     payment_method_treeview = gtk_tree_view_new_with_model ( GTK_TREE_MODEL (payment_method_model) );
     g_object_unref (G_OBJECT(payment_method_model));
     gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (payment_method_treeview), TRUE);
-    g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (payment_method_treeview)), 
-		      "changed", 
+    g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (payment_method_treeview)),
+		      "changed",
 		      G_CALLBACK (gsb_payment_method_config_select),
 		      payment_method_treeview);
 
@@ -370,9 +370,9 @@
 			    PAYMENT_METHODS_NUMBERING_COLUMN, NULL,
 			    PAYMENT_METHODS_TYPE_COLUMN, 0,
 			    PAYMENT_METHODS_DEFAULT_COLUMN, FALSE,
-			    PAYMENT_METHODS_ACTIVABLE_COLUMN, FALSE, 
-			    PAYMENT_METHODS_VISIBLE_COLUMN, FALSE, 
-			    PAYMENT_METHODS_NUMBER_COLUMN, NULL, 
+			    PAYMENT_METHODS_ACTIVABLE_COLUMN, FALSE,
+			    PAYMENT_METHODS_VISIBLE_COLUMN, FALSE,
+			    PAYMENT_METHODS_NUMBER_COLUMN, NULL,
 			    PAYMENT_METHODS_ACCOUNT_COLUMN, account_number,
 			    -1 );
 
@@ -383,9 +383,9 @@
 			    PAYMENT_METHODS_NUMBERING_COLUMN, NULL,
 			    PAYMENT_METHODS_TYPE_COLUMN, 0,
 			    PAYMENT_METHODS_DEFAULT_COLUMN, FALSE,
-			    PAYMENT_METHODS_ACTIVABLE_COLUMN, FALSE, 
-			    PAYMENT_METHODS_VISIBLE_COLUMN, FALSE, 
-			    PAYMENT_METHODS_NUMBER_COLUMN, NULL, 
+			    PAYMENT_METHODS_ACTIVABLE_COLUMN, FALSE,
+			    PAYMENT_METHODS_VISIBLE_COLUMN, FALSE,
+			    PAYMENT_METHODS_NUMBER_COLUMN, NULL,
 			    PAYMENT_METHODS_ACCOUNT_COLUMN, account_number,
 			    -1 );
 
@@ -394,13 +394,13 @@
 	gtk_tree_store_set (GTK_TREE_STORE (model), &credit_iter,
 			    PAYMENT_METHODS_NAME_COLUMN, _("Credit"),
 			    PAYMENT_METHODS_NUMBERING_COLUMN, NULL,
-			    /* This is a hack: account number is put in 
+			    /* This is a hack: account number is put in
 			       Debit/Credit nodes */
 			    PAYMENT_METHODS_TYPE_COLUMN, 0,
 			    PAYMENT_METHODS_DEFAULT_COLUMN, FALSE,
-			    PAYMENT_METHODS_ACTIVABLE_COLUMN, FALSE, 
-			    PAYMENT_METHODS_VISIBLE_COLUMN, FALSE, 
-			    PAYMENT_METHODS_NUMBER_COLUMN, NULL, 
+			    PAYMENT_METHODS_ACTIVABLE_COLUMN, FALSE,
+			    PAYMENT_METHODS_VISIBLE_COLUMN, FALSE,
+			    PAYMENT_METHODS_NUMBER_COLUMN, NULL,
 			    PAYMENT_METHODS_ACCOUNT_COLUMN, account_number,
 			    -1 );
 
@@ -495,7 +495,7 @@
 	gint payment_number;
 
 	model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
-	gtk_tree_model_get (model, &iter, 
+	gtk_tree_model_get (model, &iter,
 			    PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			    -1 );
 
@@ -521,7 +521,7 @@
 	    /* Activating widgets */
 	    gtk_widget_set_sensitive ( button_auto_numbering,
 				       gsb_data_payment_get_show_entry (payment_number));
-	    gtk_widget_set_sensitive ( payment_last_number_entry, 
+	    gtk_widget_set_sensitive ( payment_last_number_entry,
 				       gsb_data_payment_get_automatic_numbering (payment_number));
 	    /* We can remove this entry */
 	    gtk_widget_set_sensitive ( payment_remove_button, TRUE );
@@ -537,7 +537,7 @@
 	    gtk_widget_set_sensitive ( button_auto_numbering, FALSE );
 	    gtk_widget_set_sensitive ( payment_last_number_entry, FALSE );
 	    /* We set menu to "Neutral" as a default*/
-	    gtk_option_menu_set_history ( GTK_OPTION_MENU ( payment_sign_button ), 0);	
+	    gtk_option_menu_set_history ( GTK_OPTION_MENU ( payment_sign_button ), 0);
 	    /* Nothing to remove */
 	    gtk_widget_set_sensitive ( payment_remove_button, TRUE );
 
@@ -555,7 +555,7 @@
 	gtk_widget_set_sensitive ( button_auto_numbering, FALSE );
 	gtk_widget_set_sensitive ( payment_last_number_entry, FALSE );
 	/* We set menu to "Neutral" as a default*/
-	gtk_option_menu_set_history ( GTK_OPTION_MENU ( payment_sign_button ), 0);	
+	gtk_option_menu_set_history ( GTK_OPTION_MENU ( payment_sign_button ), 0);
 	/* Nothing to remove */
 	gtk_widget_set_sensitive ( payment_remove_button, TRUE );
 
@@ -578,13 +578,13 @@
  * \returns TRUE on success, which means gtk_tree_model_foreach() will
  *          stop browsing the tree.  FALSE otherwise.
  */
-gboolean gsb_payment_method_config_foreach_select ( GtkTreeModel *model, GtkTreePath *path, 
+gboolean gsb_payment_method_config_foreach_select ( GtkTreeModel *model, GtkTreePath *path,
 						    GtkTreeIter *iter, gint *payment_number_data )
 {
     GtkTreeSelection *selection;
     gint payment_number;
 
-    gtk_tree_model_get ( GTK_TREE_MODEL(model), iter, 
+    gtk_tree_model_get ( GTK_TREE_MODEL(model), iter,
 			 PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			 -1 );
 
@@ -592,7 +592,7 @@
     {
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (payment_method_treeview));
 	gtk_tree_selection_select_iter (selection, iter);
-	gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW(payment_method_treeview), path, NULL, 
+	gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW(payment_method_treeview), path, NULL,
 				       TRUE, 0.5, 0);
 	return TRUE;
     }
@@ -624,8 +624,8 @@
 
     /* get toggled iter */
     gtk_tree_model_get_iter (GTK_TREE_MODEL(model), &iter, path);
-    gtk_tree_model_get (GTK_TREE_MODEL(model), &iter, 
-			PAYMENT_METHODS_DEFAULT_COLUMN, &toggle_item, 
+    gtk_tree_model_get (GTK_TREE_MODEL(model), &iter,
+			PAYMENT_METHODS_DEFAULT_COLUMN, &toggle_item,
 			PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			-1);
 
@@ -645,14 +645,14 @@
 
 	if ( gtk_tree_model_iter_children (GTK_TREE_MODEL(model), &child, &parent) )
 	{
-	    do 
+	    do
 	    {
-		gtk_tree_store_set (GTK_TREE_STORE (model), &child, 
-				    PAYMENT_METHODS_DEFAULT_COLUMN, FALSE, 
+		gtk_tree_store_set (GTK_TREE_STORE (model), &child,
+				    PAYMENT_METHODS_DEFAULT_COLUMN, FALSE,
 				    -1);
 	    }
 	    while ( gtk_tree_model_iter_next (GTK_TREE_MODEL(model), &child) );
-	} 
+	}
 	else
 	{
 	    /* Should not happen theorically */
@@ -660,8 +660,8 @@
 	}
 
 	/* set new value */
-	gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 
-			    PAYMENT_METHODS_DEFAULT_COLUMN, 1, 
+	gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
+			    PAYMENT_METHODS_DEFAULT_COLUMN, 1,
 			    -1);
     }
 
@@ -699,15 +699,15 @@
 	gint payment_number;
 
 	model = gtk_tree_view_get_model ( GTK_TREE_VIEW (tree_view));
-	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
+	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter,
 			     PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			     -1 );
 
 	if (payment_number)
 	{
 	    /* update the tree view */
-	    gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 
-				PAYMENT_METHODS_NAME_COLUMN, gsb_data_payment_get_name (payment_number), 
+	    gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
+				PAYMENT_METHODS_NAME_COLUMN, gsb_data_payment_get_name (payment_number),
 				-1);
 	    gsb_reconcile_sort_config_fill ();
 
@@ -771,7 +771,7 @@
 	gint payment_number;
 
 	model = gtk_tree_view_get_model ( GTK_TREE_VIEW (tree_view));
-	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
+	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter,
 			     PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			     -1 );
 	if (payment_number )
@@ -809,7 +809,7 @@
 	gint payment_number;
 
 	model = gtk_tree_view_get_model ( GTK_TREE_VIEW (tree_view));
-	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
+	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter,
 			     PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			     -1 );
 
@@ -818,16 +818,16 @@
 	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( button_auto_numbering )))
 	    {
 		gtk_widget_set_sensitive ( payment_last_number_entry, TRUE );
-		gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 
-				    PAYMENT_METHODS_NUMBERING_COLUMN, 
-				    gsb_data_payment_get_last_number (payment_number), 
+		gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
+				    PAYMENT_METHODS_NUMBERING_COLUMN,
+				    gsb_data_payment_get_last_number (payment_number),
 				    -1);
 	    }
 	    else
 	    {
 		gtk_widget_set_sensitive ( payment_last_number_entry, FALSE );
-		gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 
-				    PAYMENT_METHODS_NUMBERING_COLUMN, NULL, 
+		gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
+				    PAYMENT_METHODS_NUMBERING_COLUMN, NULL,
 				    -1);
 	    }
 	}
@@ -843,9 +843,9 @@
  *
  * \param spin_button
  * \param tree_view
- * 
+ *
  * \return FALSE
- * 
+ *
  */
 gboolean gsb_payment_method_config_auto_entry_changed ( GtkWidget *spin_button,
 							GtkWidget *tree_view )
@@ -863,14 +863,14 @@
 	gint payment_number;
 
 	model = gtk_tree_view_get_model ( GTK_TREE_VIEW (tree_view));
-	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
+	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter,
 			     PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			     -1 );
 	if (payment_number)
 	{
 	    gchar* tmpstr = utils_str_itoa (gsb_data_payment_get_last_number (payment_number));
-	    gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 
-				PAYMENT_METHODS_NUMBERING_COLUMN, 
+	    gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
+				PAYMENT_METHODS_NUMBERING_COLUMN,
 				tmpstr,
 				-1);
 	    g_free ( tmpstr );
@@ -892,7 +892,7 @@
  * \param exclude	A payment method that should not be checked,
  *			as it may be the one which is to be removed.
  *
- * \return		The matching payment method number on success, 
+ * \return		The matching payment method number on success,
  *			0 otherwise (for transfer).
  */
 gint gsb_payment_method_config_get_transaction_by_sign ( gint account_number,
@@ -948,7 +948,7 @@
 	gint payment_number;
 
 	model = gtk_tree_view_get_model ( GTK_TREE_VIEW (payment_method_treeview));
-	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
+	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter,
 			     PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			     -1 );
 
@@ -1001,7 +1001,7 @@
 	    g_signal_handlers_unblock_by_func ( selection,
 						G_CALLBACK (gsb_payment_method_config_select),
 						model );
-	    gtk_tree_model_foreach ( GTK_TREE_MODEL (model), 
+	    gtk_tree_model_foreach ( GTK_TREE_MODEL (model),
 				     (GtkTreeModelForeachFunc) gsb_payment_method_config_foreach_select,
 				     GINT_TO_POINTER (payment_number));
 	    /* need to clear and fill the reconciliation tree becaus if it was a neutral changing to credit/debit
@@ -1039,7 +1039,7 @@
     if ( good )
     {
 	/* there is a selection, get corrent iters */
-	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
+	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter,
 			     PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			     -1 );
 	if (payment_number)
@@ -1055,7 +1055,7 @@
 	{
 	    gchar *name;
 
-	    gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
+	    gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter,
 				 PAYMENT_METHODS_NAME_COLUMN, &name,
 				 -1 );
 
@@ -1074,7 +1074,7 @@
 		else 		/* Neutral */
 		{
 		    type_final = GSB_PAYMENT_NEUTRAL;
-		}	      
+		}
 	    }
 	    else
 	    {
@@ -1102,7 +1102,7 @@
     }
 
     /* final is now set on debit or credit line where we want to set the method of payment */
-    gtk_tree_model_get ( GTK_TREE_MODEL(model), final, 
+    gtk_tree_model_get ( GTK_TREE_MODEL(model), final,
 			 PAYMENT_METHODS_ACCOUNT_COLUMN, &account_number,
 			 -1);
 
@@ -1120,15 +1120,15 @@
 			PAYMENT_METHODS_NUMBERING_COLUMN, NULL,
 			PAYMENT_METHODS_TYPE_COLUMN, type_final,
 			PAYMENT_METHODS_DEFAULT_COLUMN, FALSE,
-			PAYMENT_METHODS_ACTIVABLE_COLUMN, type_final != 0, 
-			PAYMENT_METHODS_VISIBLE_COLUMN, type_final != 0, 
-			PAYMENT_METHODS_NUMBER_COLUMN, payment_number, 
+			PAYMENT_METHODS_ACTIVABLE_COLUMN, type_final != 0,
+			PAYMENT_METHODS_VISIBLE_COLUMN, type_final != 0,
+			PAYMENT_METHODS_NUMBER_COLUMN, payment_number,
 			-1 );
 
     /* Select and view new position */
     gtk_tree_selection_select_iter ( selection, &iter );
     treepath = gtk_tree_model_get_path ( GTK_TREE_MODEL(model), &iter );
-    gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW(tree_view), treepath, NULL, 
+    gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW(tree_view), treepath, NULL,
 				   TRUE, 0.5, 0);
     gtk_tree_path_free ( treepath );
 
@@ -1171,7 +1171,7 @@
 	return FALSE;
 
     model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
-    gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
+    gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter,
 			 PAYMENT_METHODS_NUMBER_COLUMN, &payment_number,
 			 -1 );
     if ( !payment_number )
@@ -1254,12 +1254,14 @@
     gint account_number;
 
     dialog = gtk_dialog_new_with_buttons ( _("Delete a payment method"),
-					   GTK_WINDOW (fenetre_preferences),
-					   GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
+					   GTK_WINDOW ( fenetre_preferences ),
+					   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 					   GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 					   GTK_STOCK_OK, GTK_RESPONSE_OK,
 					   NULL );
-    gtk_window_set_position ( GTK_WINDOW (dialog), GTK_WIN_POS_CENTER );
+
+    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), FALSE );
 
     /* Ugly dance to avoid side effects on dialog's vbox. */
     hbox = gtk_hbox_new ( FALSE, 0 );

Index: gsb_bank.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_bank.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- gsb_bank.c	15 Nov 2008 22:05:26 -0000	1.13
+++ gsb_bank.c	7 Dec 2008 22:57:51 -0000	1.14
@@ -64,13 +64,13 @@
 						gpointer null );
 static  gboolean gsb_bank_update_form ( gint bank_number,
 				       GtkWidget *frame );
-static  gboolean gsb_bank_update_selected_line ( GtkEntry *entry, 
+static  gboolean gsb_bank_update_selected_line ( GtkEntry *entry,
 						GtkWidget *combobox );
 static  gboolean gsb_bank_update_selected_line_model ( GtkWidget *combobox );
 /*END_STATIC*/
 
 static GtkWidget *bank_list_tree_view;
-enum bank_list_col 
+enum bank_list_col
 {
    BANK_VIEW_NAME_COL = 0,
    BANK_TALKER_COL,
@@ -82,7 +82,7 @@
 /* the model containing the list of the banks for the combobox */
 GtkTreeModel *bank_list_model = NULL;
 
-enum bank_list_model_col 
+enum bank_list_model_col
 {
    BANK_NAME_COL = 0,
    BANK_NUMBER_COL
@@ -163,12 +163,12 @@
     g_object_set_data ( G_OBJECT (combo_box),
 			"number_for_func", GINT_TO_POINTER (number_for_func));
     if (default_func)
-	g_object_set_data ( G_OBJECT (combo_box), "changed", 
+	g_object_set_data ( G_OBJECT (combo_box), "changed",
 			    (gpointer) g_signal_connect_after (G_OBJECT(combo_box), "changed",
 							       G_CALLBACK (gsb_bank_combobox_changed), default_func ));
     /* add the hook if exists */
     if ( hook )
-	g_object_set_data ( G_OBJECT (combo_box), "changed-hook", 
+	g_object_set_data ( G_OBJECT (combo_box), "changed-hook",
 			    (gpointer) g_signal_connect_after (GTK_OBJECT(combo_box), "changed",
 							       ((GCallback) hook), data ));
 
@@ -210,7 +210,7 @@
  *
  * \param combobox
  * \param bank_number 0 for none, -1 for new bank
- * \param number_for_func the number to give to the default_func when something changed 
+ * \param number_for_func the number to give to the default_func when something changed
  *
  * \return FALSE
  * */
@@ -230,11 +230,11 @@
     /* Block hook and default_func */
     if ( g_object_get_data (G_OBJECT (combobox), "changed") > 0 )
 	g_signal_handler_block ( GTK_OBJECT(combobox),
-				 (gulong) g_object_get_data (G_OBJECT (combobox), 
+				 (gulong) g_object_get_data (G_OBJECT (combobox),
 							     "changed"));
     if ( g_object_get_data (G_OBJECT (combobox), "changed-hook") > 0 )
 	g_signal_handler_block ( GTK_OBJECT(combobox),
-				 (gulong) g_object_get_data (G_OBJECT (combobox), 
+				 (gulong) g_object_get_data (G_OBJECT (combobox),
 							     "changed-hook"));
 
     do
@@ -262,11 +262,11 @@
     /* Unblock everything */
     if ( g_object_get_data (G_OBJECT (combobox), "changed") > 0 )
 	g_signal_handler_unblock ( GTK_OBJECT(combobox),
-				   (gulong) g_object_get_data (G_OBJECT (combobox), 
+				   (gulong) g_object_get_data (G_OBJECT (combobox),
 							       "changed"));
     if ( g_object_get_data (G_OBJECT (combobox), "changed-hook") > 0 )
 	g_signal_handler_unblock ( GTK_OBJECT(combobox),
-				   (gulong) g_object_get_data (G_OBJECT (combobox), 
+				   (gulong) g_object_get_data (G_OBJECT (combobox),
 							       "changed-hook"));
     return FALSE;
 }
@@ -351,7 +351,7 @@
  *
  * \param combobox a facultative option, if not NULL, the current selection will be saved and restored at the end of the function
  *
- * \return TRUE if ok, FALSE if problem 
+ * \return TRUE if ok, FALSE if problem
  * */
 static gboolean gsb_bank_update_selected_line_model ( GtkWidget *combobox )
 {
@@ -764,7 +764,7 @@
     gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
 				     GTK_POLICY_NEVER,
 				     GTK_POLICY_AUTOMATIC );
-    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW(scrolled_window), 
+    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW(scrolled_window),
 					  GTK_SHADOW_IN );
     /* Create the text view */
     bank_adr = gsb_autofunc_textview_new ( NULL, NULL, NULL, G_CALLBACK (gsb_data_bank_set_bank_address), 0);
@@ -894,7 +894,7 @@
     gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
 				     GTK_POLICY_NEVER,
 				     GTK_POLICY_AUTOMATIC );
-    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW(scrolled_window), 
+    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW(scrolled_window),
 					  GTK_SHADOW_IN );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), scrolled_window,
 			 TRUE, TRUE, 5 );
@@ -968,16 +968,18 @@
 	return FALSE;
 
     dialog = gtk_dialog_new_with_buttons ( _("Edit bank"),
-					   GTK_WINDOW(window),
-					   GTK_DIALOG_DESTROY_WITH_PARENT,
+					   GTK_WINDOW ( window ),
+					   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 					   GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
 					   NULL );
-    gtk_window_set_position ( GTK_WINDOW (dialog), GTK_WIN_POS_CENTER );
+
+    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), TRUE );
 
     scrolled_window = gtk_scrolled_window_new ( FALSE, FALSE );
     gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
 				     GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC );
-    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW(scrolled_window), 
+    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW(scrolled_window),
 					  GTK_SHADOW_NONE );
     gtk_container_add ( GTK_CONTAINER ( GTK_DIALOG(dialog)->vbox ), scrolled_window );
     gtk_widget_set_size_request ( scrolled_window, 600, 400 );
@@ -1001,7 +1003,7 @@
 
 
 
-/** 
+/**
  * Update bank name in list, called when the name of the bank changes, or
  * the name of the talker
  * update too the model list of the combobox
@@ -1011,7 +1013,7 @@
  *
  * \return FALSE
  */
-static gboolean gsb_bank_update_selected_line ( GtkEntry *entry, 
+static gboolean gsb_bank_update_selected_line ( GtkEntry *entry,
 						GtkWidget *combobox )
 {
     GtkTreeIter iter;

Index: gsb_currency_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_currency_config.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- gsb_currency_config.c	15 Nov 2008 22:05:26 -0000	1.38
+++ gsb_currency_config.c	7 Dec 2008 22:57:51 -0000	1.39
@@ -290,7 +290,7 @@
     GtkTreeModel *currency_tree_model;
     GtkWidget *entry;
 
-    vbox_pref = new_vbox_with_title_and_icon ( _("Currencies"), "currencies.png" ); 
+    vbox_pref = new_vbox_with_title_and_icon ( _("Currencies"), "currencies.png" );
     paddingbox = new_paddingbox_with_title (vbox_pref, TRUE, _("Known currencies"));
 
     hbox = gtk_hbox_new ( FALSE, 5 );
@@ -306,8 +306,8 @@
     currency_tree_model = gtk_tree_view_get_model ( currency_list_view );
     gtk_container_add ( GTK_CONTAINER ( scrolled_window ), GTK_WIDGET(currency_list_view) );
     gtk_box_pack_start ( GTK_BOX ( hbox ), scrolled_window, TRUE, TRUE, 0);
-    g_signal_connect ( gtk_tree_view_get_selection (GTK_TREE_VIEW ( currency_list_view ) ), 
-		       "changed", G_CALLBACK ( gsb_currency_config_select_currency ), 
+    g_signal_connect ( gtk_tree_view_get_selection (GTK_TREE_VIEW ( currency_list_view ) ),
+		       "changed", G_CALLBACK ( gsb_currency_config_select_currency ),
 		       NULL );
 
     /* if nothing opened, all is unsensitive */
@@ -357,7 +357,7 @@
     entry = gsb_autofunc_entry_new ( NULL,
 					  G_CALLBACK (gsb_currency_config_entry_changed), currency_list_view,
 					  G_CALLBACK (gsb_data_currency_set_name), 0 );
-    gtk_table_attach ( GTK_TABLE ( table ), entry, 1, 2, 0, 1, 
+    gtk_table_attach ( GTK_TABLE ( table ), entry, 1, 2, 0, 1,
 		       GTK_EXPAND | GTK_FILL, 0, 0, 0 );
     g_object_set_data ( G_OBJECT(currency_tree_model), "entry_name", entry );
 
@@ -394,7 +394,7 @@
     gtk_table_attach ( GTK_TABLE ( table ), label, 0, 1, 3, 4,
 		       GTK_SHRINK | GTK_FILL, 0, 0, 0 );
     entry = gsb_autofunc_int_new ( 0,
-				   G_CALLBACK (gsb_currency_config_entry_changed), currency_list_view, 
+				   G_CALLBACK (gsb_currency_config_entry_changed), currency_list_view,
 				   G_CALLBACK (gsb_data_currency_set_floating_point), 0 );
     gtk_table_attach ( GTK_TABLE ( table ), entry, 1, 2, 3, 4,
 		       GTK_EXPAND | GTK_FILL, 0, 0, 0 );
@@ -446,7 +446,7 @@
 
     /* Flag */
     cell = gtk_cell_renderer_pixbuf_new ();
-    col_offset = 
+    col_offset =
 	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
 						     -1, _("Country name"),
 						     cell, "pixbuf",
@@ -460,7 +460,7 @@
     /* Country name */
     cell = gtk_cell_renderer_text_new ();
     gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), cell, TRUE);
-    gtk_tree_view_column_add_attribute(GTK_TREE_VIEW_COLUMN(column), cell, 
+    gtk_tree_view_column_add_attribute(GTK_TREE_VIEW_COLUMN(column), cell,
 				       "text", COUNTRY_NAME_COLUMN);
 
     /* Currency name */
@@ -469,7 +469,7 @@
     gtk_tree_view_column_set_expand ( column, TRUE );
 
     cell = gtk_cell_renderer_text_new ();
-    col_offset = 
+    col_offset =
 	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
 						     -1, _("Currency name"),
 						     cell, "text",
@@ -480,9 +480,9 @@
     gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
 
     cell = gtk_cell_renderer_text_new ();
-    col_offset = 
+    col_offset =
 	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
-						     -1, _("ISO Code"), 
+						     -1, _("ISO Code"),
 						     cell, "text",
 						     CURRENCY_ISO_CODE_COLUMN,
 						     NULL);
@@ -492,9 +492,9 @@
     gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
 
     cell = gtk_cell_renderer_text_new ();
-    col_offset = 
+    col_offset =
 	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
-						     -1, _("Sign"), 
+						     -1, _("Sign"),
 						     cell, "text",
 						     CURRENCY_NICKNAME_COLUMN,
 						     NULL);
@@ -503,7 +503,7 @@
     gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
 
     /* Sort columns accordingly */
-    gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(model), 
+    gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(model),
 					  COUNTRY_NAME_COLUMN, GTK_SORT_ASCENDING);
 
     return treeview;
@@ -562,7 +562,7 @@
 			  gsb_data_currency_get_code_iso4217 (currency_number),
 			  ".png", NULL );
     pixbuf = gdk_pixbuf_new_from_file ( string,
-					NULL );	
+					NULL );
     g_free (string);
 
     gtk_list_store_append (GTK_LIST_STORE(model), &iter);
@@ -610,7 +610,7 @@
 	{
 	    gchar* tmpstr1 = g_strdup_printf ( _("Currency '%s' is used in current file.  Grisbi can't delete it."),
 						    gsb_data_currency_get_name (currency_number));
-	    gchar* tmpstr2 = g_strdup_printf ( _("Impossible to remove currency '%s'"), 
+	    gchar* tmpstr2 = g_strdup_printf ( _("Impossible to remove currency '%s'"),
 						    gsb_data_currency_get_name (currency_number) );
 	    dialogue_error_hint ( tmpstr1, tmpstr2);
 	    g_free ( tmpstr1 );
@@ -633,7 +633,7 @@
 	{
 	    gchar* tmpstr1 = g_strdup_printf ( _("Currency '%s' is used in current file.  Grisbi can't delete it."),
 						    gsb_data_currency_get_name (currency_number));
-	    gchar* tmpstr2 = g_strdup_printf ( _("Impossible to remove currency '%s'"), 
+	    gchar* tmpstr2 = g_strdup_printf ( _("Impossible to remove currency '%s'"),
 						    gsb_data_currency_get_name (currency_number) );
 	    dialogue_error_hint ( tmpstr1, tmpstr2);
 	    g_free ( tmpstr1 );
@@ -672,7 +672,7 @@
  * Obtain selected currency from currency tree.
  *
  * \param tree_view		GtkTreeView to remove currency from.
- * 
+ *
  * \return		the number of the selected currency.
  */
 gint gsb_currency_config_get_selected ( GtkTreeView *tree_view )
@@ -686,7 +686,7 @@
 	return(FALSE);
 
     gtk_tree_model_get ( tree_model,
-			 &iter, 
+			 &iter,
 			 CURRENCY_NUMBER_COLUMN, &currency_number,
 			 -1 );
     return currency_number;
@@ -757,11 +757,11 @@
     entry_floating_point = g_object_get_data ( G_OBJECT(model), "entry_floating_point" );
 
     /* get the contents of the selected line */
-    gtk_tree_model_get ( model, &iter, 
+    gtk_tree_model_get ( model, &iter,
 			 CURRENCY_NAME_COLUMN, &currency_name,
 			 CURRENCY_ISO_CODE_COLUMN, &currency_iso_code,
-			 CURRENCY_NICKNAME_COLUMN, &currency_nickname, 
-			 CURRENCY_FLOATING_COLUMN, &currency_floating, 
+			 CURRENCY_NICKNAME_COLUMN, &currency_nickname,
+			 CURRENCY_FLOATING_COLUMN, &currency_floating,
 			 CURRENCY_NUMBER_COLUMN, &currency_number,
 			 -1 );
 
@@ -771,12 +771,12 @@
     gsb_autofunc_int_set_value ( entry_floating_point, currency_floating, currency_number );
 
     return ( FALSE );
-} 
+}
 
 
 
 /******************************** that next part is for config page of totals, perhaps
- * should go elsewhere ?? 
+ * should go elsewhere ??
  * *********************************************************************************** */
 
 /**
@@ -801,9 +801,9 @@
     label = gtk_label_new (COLON(_("Currency for payees tree")));
     gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
     gtk_label_set_justify ( GTK_LABEL (label), GTK_JUSTIFY_LEFT );
-    gtk_table_attach ( GTK_TABLE ( table ), label, 
+    gtk_table_attach ( GTK_TABLE ( table ), label,
 		       0, 1, 0, 1, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
-    combo_box = gsb_currency_config_new_combobox ( &no_devise_totaux_tiers, 
+    combo_box = gsb_currency_config_new_combobox ( &no_devise_totaux_tiers,
 						   payee_fill_tree );
     gtk_table_attach ( GTK_TABLE ( table ), combo_box,
 		       1, 2, 0, 1, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
@@ -813,7 +813,7 @@
     gtk_label_set_justify ( GTK_LABEL (label), GTK_JUSTIFY_LEFT );
     gtk_table_attach ( GTK_TABLE ( table ), label,
 		       0, 1, 1, 2, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
-    combo_box = gsb_currency_config_new_combobox ( &no_devise_totaux_categ, 
+    combo_box = gsb_currency_config_new_combobox ( &no_devise_totaux_categ,
 					       remplit_arbre_categ );
     gtk_table_attach ( GTK_TABLE ( table ), combo_box,
 		       1, 2, 1, 2, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
@@ -823,7 +823,7 @@
     gtk_label_set_justify ( GTK_LABEL (label), GTK_JUSTIFY_LEFT );
     gtk_table_attach ( GTK_TABLE ( table ), label,
 		       0, 1, 2, 3, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
-    combo_box = gsb_currency_config_new_combobox ( &no_devise_totaux_ib, 
+    combo_box = gsb_currency_config_new_combobox ( &no_devise_totaux_ib,
 					       remplit_arbre_imputation );
     gtk_table_attach ( GTK_TABLE ( table ), combo_box,
 		       1, 2, 2, 3, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
@@ -863,14 +863,14 @@
 /**
  * Set an integer to the value of a menu.  Normally called via a GTK
  * "changed" signal handler.
- * 
+ *
  * \param menu a pointer to a menu widget.
  * \param dummy unused
  */
 gboolean gsb_currency_config_set_int_from_combobox ( GtkWidget *combobox, gint * dummy)
 {
     gint *data;
-    
+
     data = g_object_get_data ( G_OBJECT(combobox), "pointer" );
 
     if ( data )
@@ -892,10 +892,10 @@
 /**
  * Pop up a dialog to create a new currency, do some sanity checks and
  * call the gsb_currency_config_create_currency() function to do the grunt work.
- * 
+ *
  * \param button	GtkButton that triggered event.
  * \param currency_tree_model the treemodel to add the new currency (can be NULL)
- * 
+ *
  * \return TRUE if currency has been created.
  */
 gboolean gsb_currency_config_add_currency ( GtkWidget *button,
@@ -908,11 +908,13 @@
     GtkTreeModel *model;
 
     dialog = gtk_dialog_new_with_buttons ( _("Add a currency"),
-					   GTK_WINDOW (window),
+					   GTK_WINDOW ( window ),
 					   GTK_DIALOG_MODAL,
 					   GTK_STOCK_CLOSE, 1,
 					   NULL );
-    gtk_window_set_position ( GTK_WINDOW (dialog), GTK_WIN_POS_CENTER );
+
+    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), TRUE );
 
     main_vbox = new_vbox_with_title_and_icon ( _("Select base currency for your account"),
 					       "flags.png" );
@@ -921,7 +923,7 @@
     vbox = gtk_vbox_new ( FALSE, 12 );
     gtk_box_pack_start ( GTK_BOX ( main_vbox ), vbox, TRUE, TRUE, 0 );
     gtk_container_set_border_width ( GTK_CONTAINER ( vbox ), 12 );
-    
+
     paddingbox = new_paddingbox_with_title ( vbox,
 					     TRUE, _("World currencies"));
 
@@ -986,8 +988,8 @@
     g_object_set_data ( G_OBJECT(model), "entry_floating_point", entry_floating_point );
 
     /* Select default currency. */
-    gtk_tree_model_foreach ( GTK_TREE_MODEL(model), 
-			     (GtkTreeModelForeachFunc) gsb_currency_config_select_default, 
+    gtk_tree_model_foreach ( GTK_TREE_MODEL(model),
+			     (GtkTreeModelForeachFunc) gsb_currency_config_select_default,
 			     g_object_get_data ( G_OBJECT(list), "treeview" ) );
 
 dialog_return:
@@ -1003,7 +1005,7 @@
 	    currency_isocode = gtk_entry_get_text ( GTK_ENTRY ( entry_isocode ));
 	    floating_point = utils_str_atoi (gtk_entry_get_text ( GTK_ENTRY ( entry_floating_point )));
 
-	    if ( strlen ( currency_name ) && 
+	    if ( strlen ( currency_name ) &&
 		 (strlen ( currency_code ) ||
 		  strlen ( currency_isocode )))
 	    {
@@ -1019,7 +1021,7 @@
 		}
 		else
 		{
-		    currency_number = gsb_currency_config_create_currency ( currency_name, currency_code, 
+		    currency_number = gsb_currency_config_create_currency ( currency_name, currency_code,
 									    currency_isocode, floating_point );
 		}
 
@@ -1075,7 +1077,7 @@
  * \return the number of the new currency
  * */
 gint gsb_currency_config_create_currency ( const gchar *currency_name,
-					   const gchar *currency_code, 
+					   const gchar *currency_code,
 					   const gchar *currency_isocode,
 					   gint floating_point )
 {
@@ -1112,8 +1114,8 @@
 	if ( !strcmp ( currency -> currency_code, tmp ) && currency -> main_currency )
 	{
 	    g_free ( tmp );
-	    return gsb_currency_config_create_currency ( currency -> currency_name, 
-							 currency -> currency_nickname, 
+	    return gsb_currency_config_create_currency ( currency -> currency_name,
+							 currency -> currency_nickname,
 							 currency -> currency_code,
 							 currency -> floating_point );
 	}
@@ -1133,14 +1135,14 @@
  * the tree view and model are saved into the box with the keys :
  * 	"model" and "treeview"
  *
- * \param select_callback callback to call when a line is selected 
+ * \param select_callback callback to call when a line is selected
  * 		callback (GtkTreeSelection *, GtkTreeModel *)
  *
  * \return a vbox
  *
  */
 GtkWidget *gsb_currency_config_create_box_popup ( GCallback select_callback )
-{ 
+{
     GtkWidget * sw, * treeview, * vbox, * checkbox;
     GtkTreeModel * model;
 
@@ -1155,8 +1157,8 @@
     gtk_widget_set_size_request ( treeview, -1, 200 );
     model = gtk_tree_view_get_model ( GTK_TREE_VIEW(treeview) );
     if (select_callback)
-	g_signal_connect ( gtk_tree_view_get_selection (GTK_TREE_VIEW ( treeview ) ), 
-			   "changed", G_CALLBACK (select_callback), 
+	g_signal_connect ( gtk_tree_view_get_selection (GTK_TREE_VIEW ( treeview ) ),
+			   "changed", G_CALLBACK (select_callback),
 			   model );
 
     gtk_container_add (GTK_CONTAINER (sw), treeview);
@@ -1206,15 +1208,15 @@
 	    GdkPixbuf * pixbuf;
 	    gchar *string;
 
-	    string = g_build_filename ( PIXMAPS_DIR, 
-					"flags", 
-					currency -> flag_filename, 
+	    string = g_build_filename ( PIXMAPS_DIR,
+					"flags",
+					currency -> flag_filename,
 					NULL );
 	    pixbuf = gdk_pixbuf_new_from_file ( string,
-						NULL );	
+						NULL );
 	    g_free (string);
 
-	    string = g_strconcat ( " ", 
+	    string = g_strconcat ( " ",
 				   _(currency -> country_name),
 				   NULL );
 	    gtk_list_store_append (GTK_LIST_STORE(model), &iter);
@@ -1260,8 +1262,8 @@
     /* re-select the default currency
      * TODO : should use the GtkTreeModelFilter to show or not the obsoletes currencies,
      * so the selection shouldn't be lost */
-    gtk_tree_model_foreach ( GTK_TREE_MODEL(model), 
-			     (GtkTreeModelForeachFunc) gsb_currency_config_select_default, 
+    gtk_tree_model_foreach ( GTK_TREE_MODEL(model),
+			     (GtkTreeModelForeachFunc) gsb_currency_config_select_default,
 			     tree_view );
     return FALSE;
 }
@@ -1291,18 +1293,18 @@
     entry_floating_point = g_object_get_data ( G_OBJECT(model), "entry_floating_point" );
 
 
-    gtk_tree_model_get ( model, &iter, 
+    gtk_tree_model_get ( model, &iter,
 			 CURRENCY_NAME_COLUMN, &currency_name,
 			 CURRENCY_ISO_CODE_COLUMN, &currency_iso_code,
-			 CURRENCY_NICKNAME_COLUMN, &currency_nickname, 
-			 CURRENCY_FLOATING_COLUMN, &currency_floating, 
+			 CURRENCY_NICKNAME_COLUMN, &currency_nickname,
+			 CURRENCY_FLOATING_COLUMN, &currency_floating,
 			 -1 );
 
-    if ( !currency_name ) 
+    if ( !currency_name )
 	currency_name = "";
-    if ( !currency_nickname ) 
+    if ( !currency_nickname )
 	currency_nickname = "";
-    if ( !currency_iso_code ) 
+    if ( !currency_iso_code )
 	currency_iso_code = "";
 
     gtk_entry_set_text ( GTK_ENTRY ( entry_name ), currency_name );
@@ -1312,7 +1314,7 @@
     gtk_entry_set_text ( GTK_ENTRY ( entry_floating_point ), tmpstr);
     g_free ( tmpstr );
     return ( FALSE );
-} 
+}
 
 
 
@@ -1329,7 +1331,7 @@
  *
  * \return TRUE if found
  */
-gboolean gsb_currency_config_select_default ( GtkTreeModel * tree_model, GtkTreePath * path, 
+gboolean gsb_currency_config_select_default ( GtkTreeModel * tree_model, GtkTreePath * path,
 					      GtkTreeIter * iter, GtkTreeView * tree_view )
 {
     struct lconv * conv = localeconv();
@@ -1337,9 +1339,9 @@
     gboolean good = FALSE, main_currency;
 
     gtk_tree_model_get ( GTK_TREE_MODEL ( tree_model ), iter,
-			 CURRENCY_ISO_CODE_COLUMN, &code, 
-			 COUNTRY_NAME_COLUMN, &country, 
-			 CURRENCY_MAIN_CURRENCY_COLUMN, &main_currency, 
+			 CURRENCY_ISO_CODE_COLUMN, &code,
+			 COUNTRY_NAME_COLUMN, &country,
+			 CURRENCY_MAIN_CURRENCY_COLUMN, &main_currency,
 			 -1 );
     if ( conv && conv -> int_curr_symbol && strlen ( conv -> int_curr_symbol ) )
     {
@@ -1366,7 +1368,7 @@
 
     if ( good )
     {
-        gchar* tmpstr = g_strdup_printf ( "gsb_currency_config_select_default: found '%s'", 
+        gchar* tmpstr = g_strdup_printf ( "gsb_currency_config_select_default: found '%s'",
 					conv -> int_curr_symbol );
 	devel_debug ( tmpstr );
 	g_free ( tmpstr );
@@ -1375,7 +1377,7 @@
 	return TRUE;
     }
 
-    gchar* tmpstr = g_strdup_printf ( "gsb_currency_config_select_default: failed to find '%s' in '%s'", 
+    gchar* tmpstr = g_strdup_printf ( "gsb_currency_config_select_default: failed to find '%s' in '%s'",
 				    conv -> int_curr_symbol, country );
     warning_debug (tmpstr);
     g_free ( tmpstr );

Index: gsb_crypt.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_crypt.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- gsb_crypt.c	1 Nov 2008 21:59:44 -0000	1.12
+++ gsb_crypt.c	7 Dec 2008 22:57:51 -0000	1.13
@@ -52,12 +52,12 @@
  * crypt if necessary the string given in the param
  * if the string is crypted, the parameter string is freed
  *
- * \param file_name	File name, used to 
+ * \param file_name	File name, used to
  * \param file_content	A string which is the file
  * \param crypt		TRUE to crypt, FALSE to uncrypt
  * \param length	The length of the grisbi data,
  *                      without "Grisbi encrypted file " if comes to crypt
- *                      with "Grisbi encrypted file " if comes to decrypt 
+ *                      with "Grisbi encrypted file " if comes to decrypt
  *
  * \return the length of the new file_content or 0 if problem
  */
@@ -109,10 +109,10 @@
 		  22 );
 
 	des_cbc_encrypt ( (guchar *) (* file_content),
-			  (guchar *) (encrypted_file + 22), 
-			  (long) length, 
-			  sched, 
-			  (DES_cblock *) key, 
+			  (guchar *) (encrypted_file + 22),
+			  (long) length,
+			  sched,
+			  (DES_cblock *) key,
 			  TRUE );
 
 	g_free (*file_content);
@@ -130,7 +130,7 @@
 	/* we set the length on the rigt size */
 
 	length = length - 22;
-	
+
 return_bad_password:
 
 	/* now, if we know here a key to crypt, we use it, else, we ask for it */
@@ -152,12 +152,12 @@
 	/* we create a copy of the file in memory which will begin by "Grisbi encrypted file " */
 
 	decrypted_file = g_malloc ( length * sizeof ( gchar ));
-	
-	des_cbc_encrypt ( (guchar *) (* file_content + 22), 
-			  (guchar *) decrypted_file, 
-			  (long) length, 
-			  sched, 
-			  (DES_cblock *) key, 
+
+	des_cbc_encrypt ( (guchar *) (* file_content + 22),
+			  (guchar *) decrypted_file,
+			  (long) length,
+			  sched,
+			  (DES_cblock *) key,
 			  FALSE );
 
 	/* before freeing file_content and go back, we check that the password was correct
@@ -213,11 +213,12 @@
 					   GTK_WINDOW ( window ),
 					   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 					   GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-					   ( encrypt ? _("Crypt file") : _("Decrypt file") ),
-					   GTK_RESPONSE_OK,
+					   ( encrypt ? _("Crypt file") : _("Decrypt file") ), GTK_RESPONSE_OK,
 					   NULL );
+
+    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), FALSE );
     gtk_dialog_set_default_response ( GTK_DIALOG ( dialog ), GTK_RESPONSE_OK );
-    gtk_window_set_position ( GTK_WINDOW (dialog), GTK_WIN_POS_CENTER );
 
     hbox = gtk_hbox_new ( FALSE, 6 );
     gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox), hbox, TRUE, TRUE, 6 );
@@ -228,7 +229,7 @@
     icon = gtk_image_new_from_stock ( GTK_STOCK_DIALOG_AUTHENTICATION,
 				      GTK_ICON_SIZE_DIALOG );
     gtk_box_pack_start ( GTK_BOX ( vbox ), icon, FALSE, FALSE, 6 );
-    
+
     vbox = gtk_vbox_new ( FALSE, 6 );
     gtk_box_pack_start ( GTK_BOX ( hbox ), vbox, TRUE, TRUE, 6 );
 
@@ -255,8 +256,8 @@
 
     hbox2 = gtk_hbox_new ( FALSE, 6 );
     gtk_box_pack_start ( GTK_BOX ( vbox ), hbox2, FALSE, FALSE, 6 );
-    gtk_box_pack_start ( GTK_BOX ( hbox2 ), 
-			 gtk_label_new ( COLON(_("Password")) ), 
+    gtk_box_pack_start ( GTK_BOX ( hbox2 ),
+			 gtk_label_new ( COLON(_("Password")) ),
 			 FALSE, FALSE, 0 );
 
     entry = gtk_entry_new ();
@@ -272,7 +273,7 @@
     result = gtk_dialog_run ( GTK_DIALOG ( dialog ));
 
     switch (result)
-    {	
+    {
 	case GTK_RESPONSE_OK:
 
 	    key = my_strdup (gtk_entry_get_text ( GTK_ENTRY ( entry )));

Index: gsb_currency.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_currency.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- gsb_currency.c	15 Nov 2008 22:05:26 -0000	1.30
+++ gsb_currency.c	7 Dec 2008 22:57:51 -0000	1.31
@@ -1,6 +1,6 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)	      */
+/*     Copyright (C)	2000-2007 C�dric Auger (cedric at grisbi.org)	      */
 /*			2003-2007 Benjamin Drieu (bdrieu at april.org)	      */
 /* 			http://www.grisbi.org				      */
 /*                                                                            */
@@ -45,9 +45,9 @@
 /*END_INCLUDE*/
 
 /*START_STATIC*/
-static struct cached_exchange_rate *gsb_currency_config_get_cached_exchange ( gint currency1_number, 
+static struct cached_exchange_rate *gsb_currency_config_get_cached_exchange ( gint currency1_number,
 								       gint currency2_number );
-static void gsb_currency_config_set_cached_exchange ( gint currency1_number, 
+static void gsb_currency_config_set_cached_exchange ( gint currency1_number,
 					       gint currency2_number,
 					       gsb_real change, gsb_real fees );
 static gboolean gsb_currency_create_combobox_store ( void );
@@ -73,7 +73,7 @@
 
 /** Exchange rates cache, used by
  * gsb_currency_config_set_cached_exchange
- * and 
+ * and
  * gsb_currency_config_get_cached_exchange */
 static GSList * cached_exchange_rates = NULL;
 
@@ -131,7 +131,7 @@
 }
 
 /**
- * return the content of the current exchange fees 
+ * return the content of the current exchange fees
  * that variable should have been filed before with gsb_currency_exchange_dialog
  *
  * \param
@@ -168,7 +168,7 @@
     gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), flag_renderer, FALSE);
     gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), flag_renderer,
 				    "pixbuf", CURRENCY_COL_FLAG, NULL );
-    
+
     GTK_CELL_RENDERER(flag_renderer) -> xpad = 3; /* Ugly but how to set it otherwise ?*/
 
     text_renderer = gtk_cell_renderer_text_new ();
@@ -231,12 +231,12 @@
 }
 
 
-/** 
+/**
  * Get and return the number of the currency in the option_menu given
  * in param
- * 
+ *
  * \param currency_option_menu an option menu with the currencies
- * 
+ *
  * \return the number of currency
  * */
 gint gsb_currency_get_currency_from_combobox ( GtkWidget *combo_box )
@@ -290,7 +290,7 @@
 			      "flags", C_DIRECTORY_SEPARATOR,
 			      gsb_data_currency_get_code_iso4217 (currency_number),
 			      ".png", NULL );
-	pixbuf = gdk_pixbuf_new_from_file ( string, NULL );	
+	pixbuf = gdk_pixbuf_new_from_file ( string, NULL );
 	g_free (string);
 
 
@@ -319,11 +319,11 @@
 
 
 
-/** 
+/**
  * Check if a transaction need an exchange rate and fees with its
  * account
  * if yes, ask for that and set the in the transaction.
- * 
+ *
  * \param transaction_number
  */
 void gsb_currency_check_for_change ( gint transaction_number )
@@ -366,7 +366,7 @@
  *
  * \param account_currency_number
  * \param transaction_currency_number
- * \param link_currency si = 1 : 1 nom_devise = "change" devise_en_rapport 
+ * \param link_currency si = 1 : 1 nom_devise = "change" devise_en_rapport
  * \param exchange_rate
  * \param exchange_fees
  * \param force if TRUE will not get the cached exchange rate and will really ask to the user
@@ -388,7 +388,7 @@
 
 
     if ( !force
-	 && 
+	 &&
 	 (cache = gsb_currency_config_get_cached_exchange ( account_currency_number, transaction_currency_number )) )
     {
 	current_exchange = cache -> rate;
@@ -396,12 +396,17 @@
 	return;
     }
 
-    dialog = gtk_dialog_new_with_buttons ( _("Enter exchange rate"), GTK_WINDOW (window), GTK_DIALOG_MODAL,
-                       GTK_STOCK_OK, 0, NULL);
-    gtk_window_set_position ( GTK_WINDOW (dialog), GTK_WIN_POS_CENTER );
+    dialog = gtk_dialog_new_with_buttons ( _("Enter exchange rate"),
+					   GTK_WINDOW ( window ),
+					   GTK_DIALOG_MODAL,
+					   GTK_STOCK_OK, 0,
+					   NULL );
+
+    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), FALSE );
 
     /* text for paddingbox */
-    gchar* tmpstr = g_strdup_printf( _("Please enter exchange rate for %s"), 
+    gchar* tmpstr = g_strdup_printf( _("Please enter exchange rate for %s"),
 				     gsb_data_currency_get_name (transaction_currency_number));
 
     /* Ugly dance to avoid side effects on dialog's vbox. */
@@ -537,7 +542,7 @@
 	if ( tmp_currency_number != transaction_currency_number )
 	    current_exchange = gsb_real_opposite (current_exchange);
 
-	gsb_currency_config_set_cached_exchange ( account_currency_number, transaction_currency_number, 
+	gsb_currency_config_set_cached_exchange ( account_currency_number, transaction_currency_number,
 						  current_exchange, current_exchange_fees );
     }
     gtk_widget_destroy ( GTK_WIDGET ( dialog ));
@@ -556,7 +561,7 @@
  * \return NULL on failure, a pointer to a cached_exchange_rate
  * structure on success.
  */
-struct cached_exchange_rate *gsb_currency_config_get_cached_exchange ( gint currency1_number, 
+struct cached_exchange_rate *gsb_currency_config_get_cached_exchange ( gint currency1_number,
 								       gint currency2_number )
 {
     GSList * tmp_list = cached_exchange_rates;
@@ -583,7 +588,7 @@
  * \param change    Exchange rate between two currencies.
  * \param fees      Fees of transaction.
  */
-void gsb_currency_config_set_cached_exchange ( gint currency1_number, 
+void gsb_currency_config_set_cached_exchange ( gint currency1_number,
 					       gint currency2_number,
 					       gsb_real change, gsb_real fees )
 {
@@ -602,7 +607,7 @@
 
 
 
-/* 
+/*
  * Handler that change the second combobox of a window that ask for
  * change.
  *



More information about the cvs mailing list