16
16
* GNU General Public License for more details.
18
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
22
#include <config.h>
185
185
DialogData *data = callback_data;
187
187
gtk_widget_set_sensitive (data->exclude_symlinks,
188
GTK_TOGGLE_BUTTON (widget)->active);
188
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)));
210
210
GtkWidget *align;
212
212
data = g_new0 (DialogData, 1);
213
data->settings = g_settings_new (FILE_ROLLER_SCHEMA_ADD);
214
214
data->window = callback_data;
216
215
data->dialog = file_sel =
217
216
gtk_file_chooser_dialog_new (_("Add a Folder"),
218
217
GTK_WINDOW (data->window),
444
443
gboolean recursive;
445
444
gboolean no_symlinks;
447
options_dir = get_home_relative_file (RC_OPTIONS_DIR);
446
options_dir = get_user_config_subdirectory (ADD_FOLDER_OPTIONS_DIR, TRUE);
448
447
options_file = g_file_get_child (options_dir, name);
449
448
file_path = g_file_get_path (options_file);
450
449
key_file = g_key_file_new ();
505
504
gboolean recursive;
506
505
gboolean no_symlinks;
508
base_dir = eel_gconf_get_string (PREF_ADD_CURRENT_FOLDER, "");
509
filename = eel_gconf_get_string (PREF_ADD_FILENAME, "");
510
include_files = eel_gconf_get_string (PREF_ADD_INCLUDE_FILES, "");
511
exclude_files = eel_gconf_get_string (PREF_ADD_EXCLUDE_FILES, "");
512
exclude_folders = eel_gconf_get_string (PREF_ADD_EXCLUDE_FOLDERS, "");
513
update = eel_gconf_get_boolean (PREF_ADD_UPDATE, FALSE);
514
recursive = eel_gconf_get_boolean (PREF_ADD_RECURSIVE, TRUE);
515
no_symlinks = eel_gconf_get_boolean (PREF_ADD_NO_SYMLINKS, FALSE);
507
base_dir = g_settings_get_string (data->settings, PREF_ADD_CURRENT_FOLDER);
508
filename = g_settings_get_string (data->settings, PREF_ADD_FILENAME);
509
include_files = g_settings_get_string (data->settings, PREF_ADD_INCLUDE_FILES);
510
exclude_files = g_settings_get_string (data->settings, PREF_ADD_EXCLUDE_FILES);
511
exclude_folders = g_settings_get_string (data->settings, PREF_ADD_EXCLUDE_FOLDERS);
512
update = g_settings_get_boolean (data->settings, PREF_ADD_UPDATE);
513
recursive = g_settings_get_boolean (data->settings, PREF_ADD_RECURSIVE);
514
no_symlinks = g_settings_get_boolean (data->settings, PREF_ADD_NO_SYMLINKS);
517
516
sync_widgets_with_options (data,
632
eel_gconf_set_string (PREF_ADD_CURRENT_FOLDER, base_dir);
633
eel_gconf_set_string (PREF_ADD_FILENAME, filename);
634
eel_gconf_set_string (PREF_ADD_INCLUDE_FILES, include_files);
635
eel_gconf_set_string (PREF_ADD_EXCLUDE_FILES, exclude_files);
636
eel_gconf_set_string (PREF_ADD_EXCLUDE_FOLDERS, exclude_folders);
637
eel_gconf_set_boolean (PREF_ADD_UPDATE, update);
638
eel_gconf_set_boolean (PREF_ADD_RECURSIVE, recursive);
639
eel_gconf_set_boolean (PREF_ADD_NO_SYMLINKS, no_symlinks);
631
g_settings_set_string (data->settings, PREF_ADD_CURRENT_FOLDER, base_dir);
632
g_settings_set_string (data->settings, PREF_ADD_FILENAME, filename);
633
g_settings_set_string (data->settings, PREF_ADD_INCLUDE_FILES, include_files);
634
g_settings_set_string (data->settings, PREF_ADD_EXCLUDE_FILES, exclude_files);
635
g_settings_set_string (data->settings, PREF_ADD_EXCLUDE_FOLDERS, exclude_folders);
636
g_settings_set_boolean (data->settings, PREF_ADD_UPDATE, update);
637
g_settings_set_boolean (data->settings, PREF_ADD_RECURSIVE, recursive);
638
g_settings_set_boolean (data->settings, PREF_ADD_NO_SYMLINKS, no_symlinks);
641
640
g_free (base_dir);
642
641
g_free (filename);
706
705
gtk_list_store_clear (list_store);
708
options_dir = get_home_relative_file (RC_OPTIONS_DIR);
707
options_dir = get_user_config_subdirectory (ADD_FOLDER_OPTIONS_DIR, TRUE);
709
708
make_directory_tree (options_dir, 0700, NULL);
711
710
file_enum = g_file_enumerate_children (options_dir, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, NULL, &err);
767
766
gtk_tree_model_get (aod_data->aod_model, &iter, 1, &filename, -1);
768
767
gtk_list_store_remove (GTK_LIST_STORE (aod_data->aod_model), &iter);
770
options_dir = get_home_relative_file (RC_OPTIONS_DIR);
769
options_dir = get_user_config_subdirectory (ADD_FOLDER_OPTIONS_DIR, TRUE);
771
770
options_file = g_file_get_child (options_dir, filename);
772
771
if (! g_file_delete (options_file, NULL, &error)) {
773
772
g_warning ("could not delete the options: %s", error->message);
874
873
GFile *options_file;
875
874
char *opt_filename;
877
options_dir = get_home_relative_file (RC_OPTIONS_DIR);
876
options_dir = get_user_config_subdirectory (ADD_FOLDER_OPTIONS_DIR, TRUE);
878
877
make_directory_tree (options_dir, 0700, NULL);
880
879
opt_filename = _gtk_request_dialog_run (