[grisbi-cvs] grisbi/src export.c, 1.19, 1.20 gsb_assistant_archive_export.c, 1.9, 1.10 gsb_file.c, 1.34, 1.35 import.c, 1.253, 1.254 imputation_budgetaire.c, 1.144, 1.145 parse_cmdline.c, 1.15, 1.16

Martin Stromberger fabiolla at users.sourceforge.net
Sun Nov 23 10:44:43 CET 2008


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

Modified Files:
	export.c gsb_assistant_archive_export.c gsb_file.c import.c 
	imputation_budgetaire.c parse_cmdline.c 
Log Message:
modal file-chooser dialogs and minor layout-changes

Index: export.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/export.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- export.c	13 Nov 2008 19:32:44 -0000	1.19
+++ export.c	23 Nov 2008 09:44:40 -0000	1.20
@@ -363,7 +363,7 @@
     combo = gtk_combo_box_new_text();
     gtk_combo_box_append_text ( GTK_COMBO_BOX(combo), _("QIF format" ) );
     gtk_combo_box_append_text ( GTK_COMBO_BOX(combo), _("CSV format" ) );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, TRUE, TRUE, 6 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, TRUE, TRUE, 0 );
     g_signal_connect ( G_OBJECT(combo), "changed", 
 		       G_CALLBACK ( export_account_change_format ), 
 		       (gpointer) account );

Index: gsb_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- gsb_file.c	22 Oct 2008 15:47:32 -0000	1.34
+++ gsb_file.c	23 Nov 2008 09:44:40 -0000	1.35
@@ -215,11 +215,9 @@
     GtkWidget *selection_fichier;
     GtkFileFilter * filter;
 
-    selection_fichier = file_selection_new ( _("Open an accounts file"),
-					     FILE_SELECTION_MUST_EXIST);
+    selection_fichier = file_selection_new ( _("Open an accounts file"), FILE_SELECTION_IS_OPEN_DIALOG | FILE_SELECTION_MUST_EXIST);
     gtk_window_set_position ( GTK_WINDOW ( selection_fichier ), GTK_WIN_POS_MOUSE);
-    gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (selection_fichier),
-					 gsb_file_get_last_path ());
+    gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (selection_fichier), gsb_file_get_last_path ());
 
     filter = gtk_file_filter_new ();
     gtk_file_filter_set_name ( filter, _("Grisbi files (*.gsb)") );
@@ -232,6 +230,9 @@
     gtk_file_filter_add_pattern ( filter, "*" );
     gtk_file_chooser_add_filter ( GTK_FILE_CHOOSER ( selection_fichier ), filter );
 
+    gtk_window_set_transient_for ( GTK_WINDOW ( selection_fichier ), GTK_WINDOW ( window ));
+    gtk_window_set_modal ( GTK_WINDOW ( selection_fichier ), TRUE );
+
     switch ( gtk_dialog_run ( GTK_DIALOG (selection_fichier)))
     {
 	case GTK_RESPONSE_OK:
@@ -820,22 +821,21 @@
     GtkWidget *dialog;
     gint result;
 
-    dialog = file_selection_new ( _("Name the accounts file"),
-				  FILE_SELECTION_IS_SAVE_DIALOG);
-    gtk_window_set_modal ( GTK_WINDOW ( dialog ),
-			   TRUE );
-    gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog),
-					 gsb_file_get_last_path ());
+    dialog = file_selection_new ( _("Name the accounts file"), FILE_SELECTION_IS_SAVE_DIALOG );
+    gtk_file_chooser_set_current_folder ( GTK_FILE_CHOOSER ( dialog ), gsb_file_get_last_path () );
+    gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER ( dialog ), TRUE);
+
+    gtk_window_set_transient_for ( GTK_WINDOW ( dialog ), GTK_WINDOW ( window ));
+    gtk_window_set_modal ( GTK_WINDOW ( dialog ), TRUE );
 
     if ( ! nom_fichier_comptes )
     {
         gchar* tmpstr = g_strconcat ( titre_fichier, ".gsb", NULL );
-	gtk_file_chooser_set_current_name ( GTK_FILE_CHOOSER ( dialog ), tmpstr);
+        gtk_file_chooser_set_current_name ( GTK_FILE_CHOOSER ( dialog ), tmpstr);
         g_free ( tmpstr );
     }
     else
-	gtk_file_chooser_select_filename ( GTK_FILE_CHOOSER (dialog),
-					   nom_fichier_comptes );
+	gtk_file_chooser_select_filename ( GTK_FILE_CHOOSER (dialog), nom_fichier_comptes );
 
     result = gtk_dialog_run ( GTK_DIALOG ( dialog ));
 

Index: imputation_budgetaire.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/imputation_budgetaire.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- imputation_budgetaire.c	16 Nov 2008 20:34:25 -0000	1.144
+++ imputation_budgetaire.c	23 Nov 2008 09:44:40 -0000	1.145
@@ -336,11 +336,14 @@
     gint resultat;
     gchar *nom_ib;
 
-    fenetre_nom = file_selection_new (  _("Export the budgetary lines"),FILE_SELECTION_IS_SAVE_DIALOG);
-	gtk_file_chooser_set_current_name ( GTK_FILE_CHOOSER ( fenetre_nom ),  _("Budgetary-lines.igsb"));
-    gtk_file_chooser_set_current_folder ( GTK_FILE_CHOOSER ( fenetre_nom ),
-					  gsb_file_get_last_path () );
-    file_selection_set_entry ( GTK_FILE_CHOOSER ( fenetre_nom ), ".igsb" );
+    fenetre_nom = file_selection_new ( _("Export the budgetary lines"), FILE_SELECTION_IS_SAVE_DIALOG );
+    gtk_file_chooser_set_current_name ( GTK_FILE_CHOOSER ( fenetre_nom ),  _("Budgetary-lines.igsb"));
+    gtk_file_chooser_set_current_folder ( GTK_FILE_CHOOSER ( fenetre_nom ), gsb_file_get_last_path () );
+    gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER ( fenetre_nom ), TRUE);
+
+    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 ));
 
     switch ( resultat )
@@ -378,10 +381,9 @@
     gint last_transaction_number;
     GtkFileFilter * filter;
 
-    dialog = file_selection_new ( _("Import budgetary lines"),
-				  FILE_SELECTION_IS_OPEN_DIALOG | FILE_SELECTION_MUST_EXIST);
+    dialog = file_selection_new ( _("Import budgetary lines"), FILE_SELECTION_IS_OPEN_DIALOG | FILE_SELECTION_MUST_EXIST);
     gtk_file_chooser_set_current_folder ( GTK_FILE_CHOOSER ( dialog ), gsb_file_get_last_path () );
-    file_selection_set_entry ( GTK_FILE_CHOOSER ( dialog ), ".igsb" );
+    file_selection_set_entry ( GTK_FILE_CHOOSER ( dialog ), g_strconcat ( gsb_file_get_last_path (), ".igsb", NULL ));
 
     filter = gtk_file_filter_new ();
     gtk_file_filter_set_name ( filter, _("Grisbi budgetary lines files (*.igsb)") );
@@ -394,6 +396,9 @@
     gtk_file_filter_add_pattern ( filter, "*" );
     gtk_file_chooser_add_filter ( GTK_FILE_CHOOSER ( dialog ), filter );
 
+    gtk_window_set_transient_for ( GTK_WINDOW ( dialog ), GTK_WINDOW ( window ));
+    gtk_window_set_modal ( GTK_WINDOW ( dialog ), TRUE );
+
     resultat = gtk_dialog_run ( GTK_DIALOG ( dialog ));
 
     if ( resultat != GTK_RESPONSE_OK  )

Index: parse_cmdline.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parse_cmdline.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- parse_cmdline.c	20 Oct 2008 15:50:58 -0000	1.15
+++ parse_cmdline.c	23 Nov 2008 09:44:40 -0000	1.16
@@ -53,7 +53,7 @@
 #define   HELP_STRING  				                               \
  N_("grisbi [options] [file]\n"                                                 \
     "  --help                    Show this help message and exit\n"        \
-    "  -v, --version                 Show version number and exit\n"           \
+    "  -v, --version             Show version number and exit\n"           \
    )
 
 /**

Index: gsb_assistant_archive_export.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_archive_export.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- gsb_assistant_archive_export.c	1 Nov 2008 21:59:44 -0000	1.9
+++ gsb_assistant_archive_export.c	23 Nov 2008 09:44:40 -0000	1.10
@@ -306,7 +306,7 @@
     gtk_combo_box_append_text ( GTK_COMBO_BOX(archive_export_combobox), _("Grisbi (GSB) format" ) );
     gtk_combo_box_append_text ( GTK_COMBO_BOX(archive_export_combobox), _("QIF format" ) );
     gtk_combo_box_append_text ( GTK_COMBO_BOX(archive_export_combobox), _("CSV format" ) );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), archive_export_combobox, TRUE, TRUE, 6 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), archive_export_combobox, TRUE, TRUE, 0 );
 
     archive_export_filechooser = gtk_file_chooser_widget_new ( GTK_FILE_CHOOSER_ACTION_SAVE );
     g_signal_connect ( G_OBJECT (archive_export_filechooser ), "destroy",

Index: import.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.c,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -d -r1.253 -r1.254
--- import.c	17 Nov 2008 19:45:17 -0000	1.253
+++ import.c	23 Nov 2008 09:44:40 -0000	1.254
@@ -637,7 +637,7 @@
     GSList *filenames = NULL;
 
     dialog = gtk_file_chooser_dialog_new ( _("Choose files to import."),
-					   NULL, GTK_FILE_CHOOSER_ACTION_OPEN,
+					   GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_OPEN,
 					   GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 					   GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
 					   NULL );



More information about the cvs mailing list