[grisbi-cvs] grisbi/src accueil.c, 1.188, 1.189 categories_onglet.c, 1.181, 1.182 etats_config.c, 1.158, 1.159 gsb_assistant.c, 1.41, 1.42 gsb_assistant_reconcile_config.c, 1.23, 1.24

Martin Stromberger fabiolla at users.sourceforge.net
Sun Dec 7 22:40:08 CET 2008


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

Modified Files:
	accueil.c categories_onglet.c etats_config.c gsb_assistant.c 
	gsb_assistant_reconcile_config.c 
Log Message:
unified handling for dialoges (part_01)

Index: categories_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/categories_onglet.c,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- categories_onglet.c	23 Nov 2008 11:24:59 -0000	1.181
+++ categories_onglet.c	7 Dec 2008 21:40:06 -0000	1.182
@@ -71,7 +71,7 @@
 
 
 /**
- * Create and return contents of the "Category" notebook page. 
+ * Create and return contents of the "Category" notebook page.
  *
  * \return A newly allocated hbox.
  */
@@ -97,7 +97,7 @@
     gtk_widget_show ( vbox );
 
     /* on y ajoute la barre d'outils */
-    gtk_box_pack_start ( GTK_BOX ( vbox ), creation_barre_outils_categ(), 
+    gtk_box_pack_start ( GTK_BOX ( vbox ), creation_barre_outils_categ(),
 			 FALSE, FALSE, 0 );
 
     /* création de l'arbre principal */
@@ -105,18 +105,18 @@
     scroll_window = gtk_scrolled_window_new ( NULL, NULL );
     gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scroll_window ),
 				     GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
-    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW(scroll_window), 
+    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW(scroll_window),
 					  GTK_SHADOW_IN );
     gtk_box_pack_start ( GTK_BOX ( vbox ), scroll_window, TRUE, TRUE, 0 );
     gtk_widget_show ( scroll_window );
 
     /* Create model */
-    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE(categ_tree_model), 
+    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE(categ_tree_model),
 					   META_TREE_TEXT_COLUMN, GTK_SORT_ASCENDING );
-    gtk_tree_sortable_set_sort_func ( GTK_TREE_SORTABLE(categ_tree_model), 
+    gtk_tree_sortable_set_sort_func ( GTK_TREE_SORTABLE(categ_tree_model),
 				      META_TREE_TEXT_COLUMN, metatree_sort_column,
 				      NULL, NULL );
-    g_object_set_data ( G_OBJECT (categ_tree_model), "metatree-interface", 
+    g_object_set_data ( G_OBJECT (categ_tree_model), "metatree-interface",
 			category_interface );
 
     /* Create container + TreeView */
@@ -129,47 +129,47 @@
     gtk_tree_view_set_reorderable (GTK_TREE_VIEW(arbre_categ), TRUE);
     gtk_tree_selection_set_mode ( gtk_tree_view_get_selection ( GTK_TREE_VIEW(arbre_categ)),
 				  GTK_SELECTION_SINGLE );
-    gtk_tree_view_set_model (GTK_TREE_VIEW (arbre_categ), 
+    gtk_tree_view_set_model (GTK_TREE_VIEW (arbre_categ),
 			     GTK_TREE_MODEL (categ_tree_model));
     g_object_unref (G_OBJECT(categ_tree_model));
     g_object_set_data ( G_OBJECT(categ_tree_model), "tree-view", arbre_categ );
 
     /* Make category column */
     cell = gtk_cell_renderer_text_new ();
-    column = gtk_tree_view_column_new_with_attributes (_("Category"), cell, 
-						       "text", META_TREE_TEXT_COLUMN, 
+    column = gtk_tree_view_column_new_with_attributes (_("Category"), cell,
+						       "text", META_TREE_TEXT_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
 						       NULL);
 #if GTK_CHECK_VERSION(2,4,0)
     gtk_tree_view_column_set_expand ( column, TRUE );
 #endif
-    gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ), 
+    gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
 
     /* Make account column */
     cell = gtk_cell_renderer_text_new ();
-    column = gtk_tree_view_column_new_with_attributes (_("Account"), cell, 
-						       "text", META_TREE_ACCOUNT_COLUMN, 
+    column = gtk_tree_view_column_new_with_attributes (_("Account"), cell,
+						       "text", META_TREE_ACCOUNT_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
 						       NULL);
-    gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ), 
+    gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
 
     /* Make balance column */
     cell = gtk_cell_renderer_text_new ();
-    column = gtk_tree_view_column_new_with_attributes (_("Balance"), cell, 
+    column = gtk_tree_view_column_new_with_attributes (_("Balance"), cell,
 						       "text", META_TREE_BALANCE_COLUMN,
 						       "weight", META_TREE_FONT_COLUMN,
 						       "xalign", META_TREE_XALIGN_COLUMN,
 						       NULL);
-    gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ), 
+    gtk_tree_view_append_column ( GTK_TREE_VIEW ( arbre_categ ),
 				  GTK_TREE_VIEW_COLUMN ( column ) );
 
     gtk_container_add ( GTK_CONTAINER ( scroll_window ), arbre_categ );
     gtk_widget_show ( arbre_categ );
 
     /* Connect to signals */
-    g_signal_connect ( G_OBJECT(arbre_categ), "row-expanded", 
+    g_signal_connect ( G_OBJECT(arbre_categ), "row-expanded",
 		       G_CALLBACK(division_column_expanded), NULL );
     g_signal_connect( G_OBJECT(arbre_categ), "row-activated",
 		      G_CALLBACK(division_activated), NULL);
@@ -233,7 +233,7 @@
 	category_number = gsb_data_category_get_no_category (category_list -> data);
 
 	gtk_tree_store_append (GTK_TREE_STORE (categ_tree_model), &iter_categ, NULL);
-	fill_division_row ( GTK_TREE_MODEL(categ_tree_model), category_interface, 
+	fill_division_row ( GTK_TREE_MODEL(categ_tree_model), category_interface,
 			    &iter_categ, category_number);
 
 	/** Each category has subcategories. */
@@ -249,9 +249,9 @@
 
 		sub_category_number = gsb_data_category_get_no_sub_category (sub_category_list -> data);
 
-		gtk_tree_store_append (GTK_TREE_STORE (categ_tree_model), 
+		gtk_tree_store_append (GTK_TREE_STORE (categ_tree_model),
 				       &iter_sous_categ, &iter_categ);
-		fill_sub_division_row ( GTK_TREE_MODEL(categ_tree_model), category_interface, 
+		fill_sub_division_row ( GTK_TREE_MODEL(categ_tree_model), category_interface,
 					&iter_sous_categ,
 					category_number,
 					sub_category_number);
@@ -263,12 +263,12 @@
 	/* add the no sub category only if category */
 	if (category_number)
 	{
-	    gtk_tree_store_append (GTK_TREE_STORE (categ_tree_model), 
+	    gtk_tree_store_append (GTK_TREE_STORE (categ_tree_model),
 				   &iter_sous_categ, &iter_categ);
-	    fill_sub_division_row ( GTK_TREE_MODEL(categ_tree_model), category_interface, 
+	    fill_sub_division_row ( GTK_TREE_MODEL(categ_tree_model), category_interface,
 				    &iter_sous_categ, category_number, 0 );
 	}
-	
+
 	category_list = category_list -> next;
     }
 }
@@ -315,7 +315,7 @@
 
     gtk_window_set_transient_for ( GTK_WINDOW ( fenetre_nom ), GTK_WINDOW ( window ));
     gtk_window_set_modal ( GTK_WINDOW ( fenetre_nom ), TRUE );
-    
+
     resultat = gtk_dialog_run ( GTK_DIALOG ( fenetre_nom ));
 
     if ( resultat != GTK_RESPONSE_OK )
@@ -436,18 +436,18 @@
 GtkWidget *creation_barre_outils_categ ( void )
 {
     GtkWidget * handlebox, * hbox2, * button;
-    
+
     /* HandleBox */
     handlebox = gtk_handle_box_new ();
-    
+
     /* Hbox2 */
     hbox2 = gtk_hbox_new ( FALSE, 0 );
     gtk_container_add ( GTK_CONTAINER(handlebox), hbox2 );
 
     /* New category button */
     button = gsb_automem_imagefile_button_new ( etat.display_toolbar,
-					       _("New\ncategory"), 
-					       "new-categ.png", 
+					       _("New\ncategory"),
+					       "new-categ.png",
 					       G_CALLBACK(metatree_new_division),
 					       categ_tree_model );
     gtk_widget_set_tooltip_text ( GTK_WIDGET (button),
@@ -456,7 +456,7 @@
 
     /* New sub category button */
     button = gsb_automem_imagefile_button_new ( etat.display_toolbar,
-					       _("New sub\ncategory"), 
+					       _("New sub\ncategory"),
 					       "new-sub-categ.png",
 					       G_CALLBACK(appui_sur_ajout_sub_division),
 					       categ_tree_model );
@@ -468,7 +468,7 @@
 
     /* Import button */
     button = gsb_automem_stock_button_new ( etat.display_toolbar,
-					   GTK_STOCK_OPEN, 
+					   GTK_STOCK_OPEN,
 					   _("Import"),
 					   G_CALLBACK(importer_categ),
 					   NULL );
@@ -477,8 +477,8 @@
     gtk_box_pack_start ( GTK_BOX ( hbox2 ), button, FALSE, TRUE, 0 );
 
     /* Export button */
-    button = gsb_automem_stock_button_new ( etat.display_toolbar, 
-					   GTK_STOCK_SAVE, 
+    button = gsb_automem_stock_button_new ( etat.display_toolbar,
+					   GTK_STOCK_SAVE,
 					   _("Export"),
 					   G_CALLBACK(exporter_categ),
 					   NULL );
@@ -506,7 +506,7 @@
 
     /* View button */
     button = gsb_automem_stock_button_menu_new ( etat.display_toolbar,
-						GTK_STOCK_SELECT_COLOR, 
+						GTK_STOCK_SELECT_COLOR,
 						_("View"),
 						G_CALLBACK(popup_category_view_mode_menu),
 						NULL );
@@ -540,26 +540,26 @@
 
     /* Edit transaction */
     menu_item = gtk_image_menu_item_new_with_label ( _("Category view") );
-    g_signal_connect ( G_OBJECT(menu_item), "activate", 
+    g_signal_connect ( G_OBJECT(menu_item), "activate",
 		       G_CALLBACK(expand_arbre_division), (gpointer) 0 );
     g_object_set_data ( G_OBJECT(menu_item), "tree-view", arbre_categ );
     gtk_menu_append ( menu, menu_item );
 
     menu_item = gtk_image_menu_item_new_with_label ( _("Subcategory view") );
-    g_signal_connect ( G_OBJECT(menu_item), "activate", 
+    g_signal_connect ( G_OBJECT(menu_item), "activate",
 		       G_CALLBACK(expand_arbre_division), (gpointer) 1 );
     g_object_set_data ( G_OBJECT(menu_item), "tree-view", arbre_categ );
     gtk_menu_append ( menu, menu_item );
 
     menu_item = gtk_image_menu_item_new_with_label ( _("Complete view") );
-    g_signal_connect ( G_OBJECT(menu_item), "activate", 
+    g_signal_connect ( G_OBJECT(menu_item), "activate",
 		       G_CALLBACK(expand_arbre_division), (gpointer) 2 );
     g_object_set_data ( G_OBJECT(menu_item), "tree-view", arbre_categ );
     gtk_menu_append ( menu, menu_item );
 
     gtk_widget_show_all ( menu );
 
-    gtk_menu_popup ( GTK_MENU(menu), NULL, button, set_popup_position, button, 1, 
+    gtk_menu_popup ( GTK_MENU(menu), NULL, button, set_popup_position, button, 1,
 		     gtk_get_current_event_time());
 
     return FALSE;
@@ -586,7 +586,7 @@
     selection = gtk_tree_view_get_selection ( view );
     if ( selection && gtk_tree_selection_get_selected(selection, &model, &iter))
     {
-	gtk_tree_model_get ( model, &iter, 
+	gtk_tree_model_get ( model, &iter,
 			     META_TREE_NO_DIV_COLUMN, &category_number,
 			     META_TREE_NO_SUB_DIV_COLUMN, &sub_category_number,
 			     -1 );
@@ -604,11 +604,15 @@
 										       0,
 										       _("No category defined") ));
 
-    dialog = gtk_dialog_new_with_buttons ( title, GTK_WINDOW (window), GTK_DIALOG_MODAL,
-					   GTK_STOCK_CANCEL, GTK_RESPONSE_NO, 
-					   GTK_STOCK_APPLY, GTK_RESPONSE_OK, 
-					   NULL);
-    gtk_window_set_position ( GTK_WINDOW (dialog), GTK_WIN_POS_CENTER );
+    dialog = gtk_dialog_new_with_buttons ( title,
+					   GTK_WINDOW ( window ),
+					   GTK_DIALOG_MODAL,
+					   GTK_STOCK_CANCEL, GTK_RESPONSE_NO,
+					   GTK_STOCK_APPLY, 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 );
 
     /* Ugly dance to avoid side effects on dialog's vbox. */
     hbox = gtk_hbox_new ( FALSE, 0 );
@@ -632,14 +636,14 @@
     entry = gtk_entry_new ( );
     if ( sub_category_number > 0 )
     {
-	gtk_entry_set_text ( GTK_ENTRY ( entry ), 
+	gtk_entry_set_text ( GTK_ENTRY ( entry ),
 			     gsb_data_category_get_sub_category_name ( category_number,
 								       sub_category_number,
 								       NULL ) );
     }
     else
     {
-	gtk_entry_set_text ( GTK_ENTRY ( entry ), 
+	gtk_entry_set_text ( GTK_ENTRY ( entry ),
 			     gsb_data_category_get_name ( category_number, 0, NULL ) );
     }
 
@@ -658,7 +662,7 @@
 						     gsb_data_category_get_type (category_number),
 						     NULL, NULL,
 						     G_CALLBACK (gsb_data_category_set_type), category_number );
-	gtk_table_attach ( GTK_TABLE(table), radiogroup, 
+	gtk_table_attach ( GTK_TABLE(table), radiogroup,
 			   1, 2, 1, 2, GTK_EXPAND|GTK_FILL, 0, 0, 0 );
     }
 
@@ -672,21 +676,21 @@
 	    return FALSE;
 	}
 
-	if ( ( sub_category_number > 0 && 
+	if ( ( sub_category_number > 0 &&
 	       gsb_data_category_get_sub_category_number_by_name ( category_number,
 								   gtk_entry_get_text ( GTK_ENTRY ( entry ) ),
 								   FALSE ) &&
 	       gsb_data_category_get_sub_category_number_by_name ( category_number,
 								   gtk_entry_get_text ( GTK_ENTRY ( entry ) ),
 								   FALSE ) != sub_category_number ) ||
-	     ( sub_category_number <= 0 && 
+	     ( sub_category_number <= 0 &&
 	       gsb_data_category_get_number_by_name ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ),
 						      FALSE, 0 ) &&
 	       gsb_data_category_get_number_by_name ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ),
 						      FALSE, 0 ) != category_number ) )
 	{
 	    gchar * message;
-	    if ( sub_category_number > 0 ) 
+	    if ( sub_category_number > 0 )
 	    {
 		message = g_strdup_printf ( _("You tried to rename current sub-category to '%s' "
 					      "but this sub-category already exists.  Please "
@@ -726,7 +730,7 @@
     {
 	div_iter = get_iter_from_div ( model, category_number, sub_category_number );
 	fill_sub_division_row ( model, category_interface,
-				div_iter, 
+				div_iter,
 				category_number,
 				sub_category_number);
     }

Index: accueil.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/accueil.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -d -r1.188 -r1.189
--- accueil.c	14 Nov 2008 21:27:09 -0000	1.188
+++ accueil.c	7 Dec 2008 21:40:06 -0000	1.189
@@ -119,7 +119,7 @@
     base_scroll = gtk_scrolled_window_new ( NULL, NULL);
     gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( base_scroll ),
 				     GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW ( base_scroll ), 
+    gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW ( base_scroll ),
 					  GTK_SHADOW_NONE );
 
     base = gtk_vbox_new ( FALSE, 15 );
@@ -164,7 +164,7 @@
 	    			G_CALLBACK( gtk_widget_destroyed ), &logo_accueil);
 	    gtk_box_pack_start ( GTK_BOX ( hbox_title ), logo_accueil, FALSE, FALSE, 20 );
 	}
-	
+
 	gtk_box_pack_end ( GTK_BOX ( hbox_title ), label_titre_fichier, TRUE, TRUE, 20 );
 	gtk_container_set_border_width ( GTK_CONTAINER ( hbox_title ), 6 );
 	gtk_container_add ( GTK_CONTAINER(eb), hbox_title );
@@ -176,7 +176,7 @@
 	label_titre_fichier = gtk_label_new ( NULL );
 	gtk_box_pack_start ( GTK_BOX ( base ), label_titre_fichier, FALSE, FALSE, 0 );
     }
-    
+
     /* on crée la première frame dans laquelle on met les états des comptes */
     frame_etat_comptes_accueil = gtk_notebook_new ();
     g_signal_connect ( G_OBJECT ( frame_etat_comptes_accueil ), "destroy",
@@ -208,14 +208,14 @@
     paddingbox = new_paddingbox_with_title ( base, FALSE,
 					     _("Run out manual scheduled transactions") );
     frame_etat_echeances_manuelles_accueil = gtk_notebook_new ();
-    gtk_notebook_set_show_tabs ( GTK_NOTEBOOK(frame_etat_echeances_manuelles_accueil), 
+    gtk_notebook_set_show_tabs ( GTK_NOTEBOOK(frame_etat_echeances_manuelles_accueil),
 				 FALSE );
-    gtk_notebook_set_show_border ( GTK_NOTEBOOK(frame_etat_echeances_manuelles_accueil), 
+    gtk_notebook_set_show_border ( GTK_NOTEBOOK(frame_etat_echeances_manuelles_accueil),
 				   FALSE );
     gtk_container_set_border_width ( GTK_CONTAINER(frame_etat_echeances_manuelles_accueil),
 				     0 );
     gtk_box_set_spacing ( GTK_BOX(paddingbox), 6 );
-    gtk_box_pack_start ( GTK_BOX(paddingbox), frame_etat_echeances_manuelles_accueil, 
+    gtk_box_pack_start ( GTK_BOX(paddingbox), frame_etat_echeances_manuelles_accueil,
 			 FALSE, FALSE, 6 );
 
 
@@ -308,7 +308,9 @@
 					   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 );
     gtk_dialog_set_default_response ( GTK_DIALOG (dialog), GTK_RESPONSE_OK );
 
     /* first we reparent the form in the dialog */
@@ -346,7 +348,7 @@
 void update_liste_comptes_accueil ( gboolean force )
 {
     GtkWidget *pTable, *pEventBox, *pLabel, *vbox, *paddingbox;
-    GtkStyle *pStyleLabelNomCompte, *pStyleLabelSoldeCourant, 
+    GtkStyle *pStyleLabelNomCompte, *pStyleLabelSoldeCourant,
 	     *pStyleLabelSoldePointe;
     GSList *devise;
     gsb_real solde_global_courant, solde_global_pointe;
@@ -359,7 +361,7 @@
     if ( !force
 	 &&
 	 !(mise_a_jour_liste_comptes_accueil
-	   && 
+	   &&
 	   gsb_data_account_get_accounts_amount ()))
 	return;
 
@@ -654,7 +656,7 @@
 	gtk_widget_show ( pLabel );
 
 	/* Troisième colonne : elle contient le solde total courant des comptes */
-	tmpstr = gsb_real_get_string_with_currency (solde_global_courant, 
+	tmpstr = gsb_real_get_string_with_currency (solde_global_courant,
 								    currency_number, TRUE);
 	pLabel = gtk_label_new ( tmpstr );
 	g_free ( tmpstr );
@@ -910,7 +912,7 @@
 	gtk_widget_show ( pLabel );
 
 	/* Troisieme colonne : elle contient le solde total courant des comptes */
-	tmpstr = gsb_real_get_string_with_currency (solde_global_courant, 
+	tmpstr = gsb_real_get_string_with_currency (solde_global_courant,
 								    currency_number, TRUE);
 	pLabel = gtk_label_new ( tmpstr );
 	g_free ( tmpstr );
@@ -1143,7 +1145,7 @@
 	    }
 	    i++;
 	    list_tmp = list_tmp -> next;
-	}	
+	}
 
 	/* Création et remplissage de la (nb_comptes + 3)ième ligne du tableau :
 	   elle contient la somme des soldes de chaque compte */
@@ -1155,7 +1157,7 @@
 	gtk_widget_show ( pLabel );
 
 	/* Deuxième colonne : elle contient le solde total pointé des comptes */
-	tmpstr = gsb_real_get_string_with_currency (solde_global_pointe, 
+	tmpstr = gsb_real_get_string_with_currency (solde_global_pointe,
 								    currency_number, TRUE);
 	pLabel = gtk_label_new ( tmpstr );
 	g_free ( tmpstr );
@@ -1836,9 +1838,9 @@
 /**
  * update the finished scheduled transactions part in the main page
  * the scheduled transaction in param is finished
- * 
+ *
  * \param scheduled_number
- * 
+ *
  * \return FALSE
  * */
 gboolean gsb_main_page_update_finished_scheduled_transactions ( gint scheduled_number )

Index: etats_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_config.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- etats_config.c	15 Nov 2008 22:05:26 -0000	1.158
+++ etats_config.c	7 Dec 2008 21:40:06 -0000	1.159
@@ -132,9 +132,9 @@
 				      gboolean path_currently_selected,
 				      gpointer data);
 static gboolean report_tree_update_style ( gint * page_number );
-static gboolean report_tree_update_style_iterator ( GtkTreeModel * tree_model, 
-					     GtkTreePath *path, 
-					     GtkTreeIter *iter, 
+static gboolean report_tree_update_style_iterator ( GtkTreeModel * tree_model,
+					     GtkTreePath *path,
+					     GtkTreeIter *iter,
 					     gpointer data );
 static gboolean report_tree_view_selection_changed ( GtkTreeSelection *selection,
 					      GtkTreeModel *model );
@@ -169,9 +169,9 @@
 
 
 
-/***********************************/ 
+/***********************************/
 /* fichier etats_config.c */
-/***********************************/ 
+/***********************************/
 
 gchar *liste_plages_dates[] = {
     N_("All"),
@@ -356,7 +356,7 @@
 static GtkTreeStore * report_tree_model = NULL;
 static GtkWidget * report_tree_view = NULL;
 
-/** globals used to speed up the category/budget list 
+/** globals used to speed up the category/budget list
  * and clarify the code */
 static GtkTreeModel *model_categ;
 static GtkTreeModel *model_budget;
@@ -395,16 +395,19 @@
 	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general),
 				GSB_REPORTS_PAGE );
 
-    dialog = gtk_dialog_new_with_buttons ( _("Report properties"), 
-					   GTK_WINDOW (window), GTK_DIALOG_MODAL, 
+    dialog = gtk_dialog_new_with_buttons ( _("Report properties"),
+					   GTK_WINDOW ( window ),
+					   GTK_DIALOG_MODAL,
 					   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 ), TRUE );
 
     /* Create model */
-    report_tree_model = gtk_tree_store_new ( REPORT_TREE_NUM_COLUMNS, 
-					     G_TYPE_STRING, 
+    report_tree_model = gtk_tree_store_new ( REPORT_TREE_NUM_COLUMNS,
+					     G_TYPE_STRING,
 					     G_TYPE_INT,
 					     G_TYPE_INT,
 					     G_TYPE_INT );
@@ -418,13 +421,13 @@
     report_tree_view = gtk_tree_view_new();
     g_signal_connect ( G_OBJECT (report_tree_view ), "destroy",
     		G_CALLBACK ( gtk_widget_destroyed), &report_tree_view );
-    gtk_tree_view_set_model (GTK_TREE_VIEW (report_tree_view), 
+    gtk_tree_view_set_model (GTK_TREE_VIEW (report_tree_view),
 			     GTK_TREE_MODEL (report_tree_model));
     g_object_unref (G_OBJECT(report_tree_model));
 
     /* Make column */
     cell = gtk_cell_renderer_text_new ();
-    column = 
+    column =
 	gtk_tree_view_column_new_with_attributes ("Categories",
 						  cell,
 						  "text", REPORT_TREE_TEXT_COLUMN,
@@ -437,12 +440,12 @@
 
     /* Handle select */
     selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (report_tree_view));
-    g_signal_connect (selection, "changed", 
+    g_signal_connect (selection, "changed",
 		      ((GCallback) report_tree_view_selection_changed),
 		      report_tree_model);
 
     /* Choose which entries will be selectable */
-    gtk_tree_selection_set_select_function ( selection, report_tree_selectable_func, 
+    gtk_tree_selection_set_select_function ( selection, report_tree_selectable_func,
 					     NULL, NULL );
 
     /* Put the tree in the scroll */
@@ -464,9 +467,9 @@
     notebook_config_etat = gtk_notebook_new ();
     gtk_paned_add2(GTK_PANED(paned), notebook_config_etat );
 
-    gtk_notebook_set_show_tabs ( GTK_NOTEBOOK ( notebook_config_etat ), 
+    gtk_notebook_set_show_tabs ( GTK_NOTEBOOK ( notebook_config_etat ),
 				 FALSE );
-    gtk_notebook_set_show_border ( GTK_NOTEBOOK ( notebook_config_etat ), 
+    gtk_notebook_set_show_border ( GTK_NOTEBOOK ( notebook_config_etat ),
 				   FALSE );
     gtk_container_set_border_width ( GTK_CONTAINER ( notebook_config_etat ), 0 );
 
@@ -480,7 +483,7 @@
     gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter,
 			REPORT_TREE_TEXT_COLUMN, _("Data selection"),
 			REPORT_TREE_PAGE_COLUMN, -1,
-			REPORT_TREE_BOLD_COLUMN, 800, 
+			REPORT_TREE_BOLD_COLUMN, 800,
 			-1);
 
     gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
@@ -1312,7 +1315,7 @@
 	 !gsb_date_check_entry ( entree_date_init_etat ) )
     {
 	dialogue_error_hint ( _("Grisbi can't parse date.  For a list of date formats that Grisbi can use, refer to Grisbi manual."),
-			      g_strdup_printf ( _("Invalid initial date '%s'"), 
+			      g_strdup_printf ( _("Invalid initial date '%s'"),
 						gtk_entry_get_text(GTK_ENTRY(entree_date_init_etat)) ) );
 	return;
     }
@@ -1321,7 +1324,7 @@
 	 !gsb_date_check_entry (entree_date_finale_etat ) )
     {
 	dialogue_error_hint ( _("Grisbi can't parse date.  For a list of date formats that Grisbi can use, refer to Grisbi manual."),
-			      g_strdup_printf ( _("Invalid final date '%s'"), 
+			      g_strdup_printf ( _("Invalid final date '%s'"),
 						gtk_entry_get_text(GTK_ENTRY(entree_date_finale_etat)) ) );
 	return;
     }
@@ -1496,7 +1499,7 @@
 	 &&
 	 gsb_data_report_get_financial_year_type (current_report_number) == 3 )
     {
-	dialogue_special ( GTK_MESSAGE_INFO, 
+	dialogue_special ( GTK_MESSAGE_INFO,
 			   make_hint ( _("Performance issue."),
 				       _("All financial years have been selected.  Grisbi will run faster without the \"Detail financial years\" option activated.") ) );
 	gsb_data_report_set_financial_year_type ( current_report_number,
@@ -1555,7 +1558,7 @@
 	 &&
 	 gsb_data_report_get_account_use_chosen (current_report_number))
     {
-	dialogue_special ( GTK_MESSAGE_INFO, 
+	dialogue_special ( GTK_MESSAGE_INFO,
 			   make_hint ( _("Performance issue."),
 				       _("All accounts have been selected.  Grisbi will run faster without the \"Detail accounts used\" option activated.") ) );
 	gsb_data_report_set_account_use_chosen ( current_report_number,
@@ -1704,7 +1707,7 @@
 	 &&
 	 gsb_data_report_get_payee_detail_used (current_report_number))
     {
-	dialogue_special ( GTK_MESSAGE_INFO, 
+	dialogue_special ( GTK_MESSAGE_INFO,
 			   make_hint ( _("Performance issue."),
 				       _("All payees have been selected.  Grisbi will run faster without the \"Detail payees used\" option activated.") ) );
 	gsb_data_report_set_payee_detail_used ( current_report_number,
@@ -1883,7 +1886,7 @@
 	 &&
 	 gsb_data_report_get_method_of_payment_used (current_report_number))
     {
-	dialogue_special ( GTK_MESSAGE_INFO, 
+	dialogue_special ( GTK_MESSAGE_INFO,
 			   make_hint ( _("Performance issue."),
 				       _("All methods of payment have been selected.  Grisbi will run faster without the \"Detail methods of payment used\" option activated.") ) );
 	gsb_data_report_set_method_of_payment_used ( current_report_number,
@@ -1942,9 +1945,9 @@
  *
  * \return TRUE if this iter matches.
  */
-gboolean report_tree_update_style_iterator ( GtkTreeModel * tree_model, 
-					     GtkTreePath *path, 
-					     GtkTreeIter *iter, 
+gboolean report_tree_update_style_iterator ( GtkTreeModel * tree_model,
+					     GtkTreePath *path,
+					     GtkTreeIter *iter,
 					     gpointer data )
 {
     gint page_number = GPOINTER_TO_INT(data);
@@ -3719,11 +3722,11 @@
     if (all_selected)
     {
 	if (is_categ)
-	    dialogue_special ( GTK_MESSAGE_INFO, 
+	    dialogue_special ( GTK_MESSAGE_INFO,
 			       make_hint ( _("Performance issue."),
 					   _("All categories have been selected.  Grisbi will run faster without the \"Detail categories used\" option activated.")));
 	else
-	    dialogue_special ( GTK_MESSAGE_INFO, 
+	    dialogue_special ( GTK_MESSAGE_INFO,
 			       make_hint ( _("Performance issue."),
 					   _("All budgets have been selected.  Grisbi will run faster without the \"Detail budgets used\" option activated.")));
 
@@ -4363,7 +4366,7 @@
 				      gsb_data_report_text_comparison_get_field (text_comparison_number));
 	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_operator (text_comparison_number)),
 				      gsb_data_report_text_comparison_get_operator (text_comparison_number));
-	
+
 	if (gsb_data_report_text_comparison_get_text (text_comparison_number))
 	    gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_text_comparison_get_entry_text (text_comparison_number)),
 				 gsb_data_report_text_comparison_get_text (text_comparison_number));
@@ -4463,7 +4466,7 @@
     text_comparison_number = gsb_data_report_text_comparison_new (0);
     gsb_data_report_text_comparison_set_report_number ( text_comparison_number,
 							current_report_number );
-    
+
     /* on crée la row et remplit les widget de la structure */
 
     widget = cree_ligne_comparaison_texte (text_comparison_number);
@@ -5949,7 +5952,7 @@
     }
 
     if ( gtk_menu_get_attach_widget ( GTK_MENU ( menu_item -> parent ))
-	 == 
+	 ==
 	 gsb_data_report_amount_comparison_get_button_first_comparison (amount_comparison_number))
 	gtk_widget_set_sensitive ( gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number),
 				   sensitif );
@@ -6172,9 +6175,9 @@
      gint current_report_number;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
-    
+
     /* il faut qu'il y ai plus d'une row affichée */
-    
+
     if ( g_slist_length ( gsb_data_report_get_amount_comparison_list (current_report_number)) < 2 )
 	return;
 

Index: gsb_assistant_reconcile_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_reconcile_config.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- gsb_assistant_reconcile_config.c	7 Dec 2008 19:22:37 -0000	1.23
+++ gsb_assistant_reconcile_config.c	7 Dec 2008 21:40:06 -0000	1.24
@@ -170,7 +170,7 @@
     transactions_to_link = g_slist_length (transactions_list);
 
     /* come here if we have some orphan transactions
-     * this can happen by 2 ways : 
+     * this can happen by 2 ways :
      * for old users of grisbi, before i don't remember what version, there were no reconcile number,
      * 		the reconciled transactions were juste marked R
      * before the 0.6.0, ctrl R didn't permit to choose a reconcile
@@ -275,7 +275,7 @@
     gtk_box_pack_start ( GTK_BOX (page),
 			 separator,
 			 FALSE, FALSE, 0 );
-    
+
     /* set up the menu */
     label = gtk_label_new (_("Choose the next operation to do :"));
     gtk_misc_set_alignment ( GTK_MISC (label),
@@ -283,7 +283,7 @@
     gtk_box_pack_start ( GTK_BOX (page),
 			 label,
 			 FALSE, FALSE, 0 );
-	
+
     /* create a new reconcile */
     button = gtk_radio_button_new_with_label ( NULL,
 					       _("Manually create a new reconciliation"));
@@ -704,7 +704,7 @@
 		       assistant );
     gtk_box_pack_start ( GTK_BOX (hbox),
 			 button,
-			 FALSE, FALSE,
+			 TRUE, TRUE,
 			 0 );
 
     gtk_widget_show_all (page);
@@ -855,7 +855,7 @@
     gtk_label_set_markup ( GTK_LABEL (label),
 			   string );
     g_free (string);
-    
+
     /* update the list of reconcile in the configuration list */
     gsb_reconcile_config_fill ();
 
@@ -1195,15 +1195,16 @@
     /* ok, all the transactions belong to the same account, we can
      * show a dialog to select the reconcile */
     dialog = gtk_dialog_new_with_buttons ( _("Selection of a reconciliation"),
-					   GTK_WINDOW (assistant),
+					   GTK_WINDOW ( assistant ),
 					   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 					   GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                       GTK_STOCK_OK, GTK_RESPONSE_OK,
+					   GTK_STOCK_OK, GTK_RESPONSE_OK,
 					   NULL );
 
-    gtk_window_set_default_size (GTK_WINDOW (dialog), 770, 412 );
-    gtk_window_set_position ( GTK_WINDOW (dialog), GTK_WIN_POS_CENTER );
-    gtk_container_set_border_width ( GTK_CONTAINER(dialog), 12 );
+    gtk_window_set_default_size ( GTK_WINDOW ( dialog ), 770, 412 );
+    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), TRUE );
+    gtk_container_set_border_width ( GTK_CONTAINER ( dialog ), 12 );
 
     label = gtk_label_new (COLON(_("Select the reconciliation to associate to the selected transactions")));
     gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.0 );
@@ -1211,7 +1212,7 @@
 			 label,
 			 FALSE, FALSE,
 			 10 );
-    
+
     /* make the list */
     scrolled_window = gtk_scrolled_window_new (FALSE, FALSE);
     gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW (scrolled_window),

Index: gsb_assistant.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- gsb_assistant.c	1 Nov 2008 21:59:44 -0000	1.41
+++ gsb_assistant.c	7 Dec 2008 21:40:06 -0000	1.42
@@ -35,7 +35,7 @@
 /*END_INCLUDE*/
 
 /*START_STATIC*/
-static gboolean gsb_assistant_change_page ( GtkNotebook * notebook, GtkNotebookPage * npage, 
+static gboolean gsb_assistant_change_page ( GtkNotebook * notebook, GtkNotebookPage * npage,
 				     gint page, gpointer assistant );
 /*END_STATIC*/
 
@@ -49,7 +49,7 @@
  * Create and initialize a new grisbi assistant.  It is basically
  * composed of a GtkDialog with a notebook that is switched from page
  * to page when user click on dialog buttons.
- * 
+ *
  * \param title			Title of the assistant.
  * \param explanation		Short text to display in the first
  *				page of the assistant.
@@ -67,26 +67,26 @@
     GtkWidget * button_cancel, * button_prev, * button_next;
     GtkStyle * style;
     GtkTextBuffer * buffer;
-    
+
     assistant = gtk_dialog_new_with_buttons ( title,
-					      GTK_WINDOW(window),
-					      GTK_DIALOG_NO_SEPARATOR,
-					      NULL );
+					   GTK_WINDOW ( window ),
+					   GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR,
+					   NULL );
 
-    /* set a default size to have all the assistant in the same aspect */
-    gtk_window_set_default_size (GTK_WINDOW (assistant), 800, 500 );
-    gtk_window_set_position ( GTK_WINDOW (assistant), GTK_WIN_POS_CENTER );
+    gtk_window_set_default_size ( GTK_WINDOW ( assistant ), 800, 500 );
+    gtk_window_set_position ( GTK_WINDOW ( assistant ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( assistant ), TRUE );
 
-    button_cancel = gtk_dialog_add_button ( GTK_DIALOG(assistant), 
+    button_cancel = gtk_dialog_add_button ( GTK_DIALOG(assistant),
 					    GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL );
     g_object_set_data ( G_OBJECT(assistant), "button_cancel", button_cancel );
 
-    button_prev = gtk_dialog_add_button ( GTK_DIALOG(assistant), 
+    button_prev = gtk_dialog_add_button ( GTK_DIALOG(assistant),
 					  GTK_STOCK_GO_BACK, GTK_RESPONSE_NO );
     g_object_set_data ( G_OBJECT(assistant), "button_prev", button_prev );
     gtk_widget_set_sensitive ( button_prev, FALSE );
 
-    button_next = gtk_dialog_add_button ( GTK_DIALOG(assistant), 
+    button_next = gtk_dialog_add_button ( GTK_DIALOG(assistant),
 					  GTK_STOCK_GO_FORWARD, GTK_RESPONSE_YES );
     g_object_set_data ( G_OBJECT(assistant), "button_next", button_next );
 
@@ -112,13 +112,13 @@
     g_free ( tmpstr );
     gtk_box_pack_start ( GTK_BOX(hbox), image, FALSE, FALSE, 0 );
 
-    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG(assistant) -> vbox ), eb, 
+    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG(assistant) -> vbox ), eb,
 			 FALSE, FALSE, 0 );
 
     notebook = gtk_notebook_new ();
     gtk_notebook_set_show_tabs ( GTK_NOTEBOOK(notebook), FALSE );
     gtk_notebook_set_show_border ( GTK_NOTEBOOK(notebook), FALSE );
-    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG(assistant) -> vbox ), notebook, 
+    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG(assistant) -> vbox ), notebook,
 			 TRUE, TRUE, 0 );
 
     view = gtk_text_view_new ();
@@ -156,12 +156,12 @@
 
 /**
  * Add a page to the Grisbi assistant.
- * 
+ *
  * \param assistant		Grisbi assistant to add a page to.
  * \param widget		Widget containing the new page to insert.
  * \param position		Number of the page to insert.  Page 0 is
  *				reserved to the explanation label.
- * \param prev			Page to display when the "Previous" button is 
+ * \param prev			Page to display when the "Previous" button is
  *				clicked.
  * \param next			Page to display when the "Next" button is clicked.
  * \param enter_callback	A callback to connect to the "switch-page" callback
@@ -180,7 +180,7 @@
     gsb_assistant_set_prev ( assistant, position, prev );
     gsb_assistant_set_next ( assistant, position, next );
     tmpstr = g_strdup_printf ( "enter%d", position );
-    g_object_set_data ( G_OBJECT(assistant), tmpstr, 
+    g_object_set_data ( G_OBJECT(assistant), tmpstr,
 			enter_callback );
     g_free (tmpstr);
 
@@ -191,12 +191,12 @@
 
 /**
  * Run the Grisbi assistant.  This will pop up a new dialog.
- * 
+ *
  * \param assistant	Grisbi assistant to run.
  *
  * \return		Outcome of the Grisbi assistant.  Can be
  *			GTK_RESPONSE_APPLY for success and
- *			GTK_RESPONSE_CANCEL for failure 
+ *			GTK_RESPONSE_CANCEL for failure
  *			(user canceled or closed dialog).
  */
 GtkResponseType gsb_assistant_run ( GtkWidget * assistant )
@@ -218,7 +218,7 @@
 	gint current = gtk_notebook_get_current_page ( GTK_NOTEBOOK(notebook) );
 	gint result, prev, next;
 
-        gchar* tmpstr = g_strdup_printf ( _("%s (%d of %d)"), 
+        gchar* tmpstr = g_strdup_printf ( _("%s (%d of %d)"),
 						 (gchar *) g_object_get_data ( G_OBJECT(assistant),
 									       "title" ),
 						 current + 1,
@@ -242,7 +242,7 @@
 		gtk_widget_set_sensitive ( button_prev, TRUE );
 		if ( gtk_notebook_get_n_pages ( GTK_NOTEBOOK(notebook) ) == ( next + 1 ) )
 		{
-		    gsb_assistant_change_button_next ( assistant, GTK_STOCK_CLOSE, 
+		    gsb_assistant_change_button_next ( assistant, GTK_STOCK_CLOSE,
 						       GTK_RESPONSE_APPLY );
 		    gsb_assistant_sensitive_button_prev ( assistant,
 							  FALSE );
@@ -254,7 +254,7 @@
 	    case GTK_RESPONSE_NO:
 		if ( next == -1 )
 		{
-		    gsb_assistant_change_button_next ( assistant, GTK_STOCK_GO_FORWARD, 
+		    gsb_assistant_change_button_next ( assistant, GTK_STOCK_GO_FORWARD,
 						       GTK_RESPONSE_YES );
 		}
 
@@ -285,16 +285,16 @@
 /**
  * Call a user-defined optional callback when user change page.  Note
  * that it is called AFTER stock callbacks for various reasons.
- * 
+ *
  * \param notebook	This Grisbi assistant notebook.
  * \param npage		Not used.
  * \param page		Page selected.
  * \param assistant	Grisbi assistant containing the notebook.
- * 
+ *
  * \return		Result from user-defined callback or FALSE if
  *			no callback defined.
  */
-gboolean gsb_assistant_change_page ( GtkNotebook * notebook, GtkNotebookPage * npage, 
+gboolean gsb_assistant_change_page ( GtkNotebook * notebook, GtkNotebookPage * npage,
 				     gint page, gpointer assistant )
 {
     typedef gboolean ( * gsb_assistant_callback ) ( GtkWidget *, gint );
@@ -361,7 +361,7 @@
  */
 gboolean gsb_assistant_sensitive_button_next ( GtkWidget * assistant, gboolean state )
 {
-    gtk_widget_set_sensitive ( g_object_get_data ( G_OBJECT (assistant), "button_next" ), 
+    gtk_widget_set_sensitive ( g_object_get_data ( G_OBJECT (assistant), "button_next" ),
 			       state );
 
     return FALSE;
@@ -373,7 +373,7 @@
  */
 gboolean gsb_assistant_sensitive_button_prev ( GtkWidget * assistant, gboolean state )
 {
-    gtk_widget_set_sensitive ( g_object_get_data ( G_OBJECT (assistant), "button_prev" ), 
+    gtk_widget_set_sensitive ( g_object_get_data ( G_OBJECT (assistant), "button_prev" ),
 			       state );
 
     return FALSE;
@@ -430,7 +430,7 @@
 
 
 /**
- * 
+ *
  *
  */
 /* dOm TODO : this function seems not to be used. Is it possible to remove it ?



More information about the cvs mailing list