file-roller r2533 - in trunk: . src



Author: paobac
Date: Wed Dec 24 12:39:49 2008
New Revision: 2533
URL: http://svn.gnome.org/viewvc/file-roller?rev=2533&view=rev

Log:
2008-12-24  Paolo Bacchilega  <paobac svn gnome org>

	* src/dlg-batch-add.c (dlg_batch_add_files): do not auto-expand
	the "other options" section.


Modified:
   trunk/ChangeLog
   trunk/src/dlg-batch-add.c

Modified: trunk/src/dlg-batch-add.c
==============================================================================
--- trunk/src/dlg-batch-add.c	(original)
+++ trunk/src/dlg-batch-add.c	Wed Dec 24 12:39:49 2008
@@ -71,11 +71,26 @@
 } DialogData;
 
 
+static const char *
+get_ext (DialogData *data)
+{
+	int idx;
+
+	idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->a_archive_type_combo_box));
+
+	return mime_type_desc[data->supported_types[idx]].default_ext;
+}
+
+
 /* called when the main dialog is closed. */
 static void
 destroy_cb (GtkWidget  *widget,
 	    DialogData *data)
 {
+	eel_gconf_set_string (PREF_BATCH_ADD_DEFAULT_EXTENSION, get_ext (data));
+	/*eel_gconf_set_boolean (PREF_BATCH_OTHER_OPTIONS, data->add_clicked ? FALSE : gtk_expander_get_expanded (GTK_EXPANDER (data->a_other_options_expander)));*/
+	eel_gconf_set_boolean (PREF_ENCRYPT_HEADER, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->a_encrypt_header_checkbutton)));
+	
 	if (! data->add_clicked) {
 		fr_window_pop_message (data->window);
 		fr_window_stop_batch (data->window);
@@ -86,17 +101,6 @@
 }
 
 
-static const char *
-get_ext (DialogData *data)
-{
-	int idx;
-
-	idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->a_archive_type_combo_box));
-
-	return mime_type_desc[data->supported_types[idx]].default_ext;
-}
-
-
 static void
 set_archive_options (DialogData *data)
 {
@@ -294,10 +298,6 @@
 	g_free (tmp);
 	archive_file = g_strconcat (archive_dir, "/", archive_name, NULL);
 
-	eel_gconf_set_string (PREF_BATCH_ADD_DEFAULT_EXTENSION, archive_ext);
-	eel_gconf_set_boolean (PREF_BATCH_OTHER_OPTIONS, gtk_expander_get_expanded (GTK_EXPANDER (data->a_other_options_expander)));
-	eel_gconf_set_boolean (PREF_ENCRYPT_HEADER, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->a_encrypt_header_checkbutton)));
-
 	if (uri_is_dir (archive_file)) {
 		GtkWidget  *d;
 
@@ -528,7 +528,7 @@
 
 	gtk_button_set_use_stock (GTK_BUTTON (add_button), TRUE);
 	gtk_button_set_label (GTK_BUTTON (add_button), FR_STOCK_CREATE_ARCHIVE);
-	gtk_expander_set_expanded (GTK_EXPANDER (data->a_other_options_expander), eel_gconf_get_boolean (PREF_BATCH_OTHER_OPTIONS, FALSE));
+	gtk_expander_set_expanded (GTK_EXPANDER (data->a_other_options_expander), FALSE /*eel_gconf_get_boolean (PREF_BATCH_OTHER_OPTIONS, FALSE)*/);
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->a_encrypt_header_checkbutton), eel_gconf_get_boolean (PREF_ENCRYPT_HEADER, FALSE));
 	gtk_spin_button_set_value (GTK_SPIN_BUTTON (data->a_volume_spinbutton), (double) eel_gconf_get_integer (PREF_BATCH_VOLUME_SIZE, 0) / MEGABYTE);
 



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