Skip to content

Commit 84e19ed

Browse files
committed
Fix missed changed connect
2 parents adc3601 + 62b1a52 commit 84e19ed

File tree

4 files changed

+6
-18
lines changed

4 files changed

+6
-18
lines changed

libcore/Preferences.vala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ namespace Files {
2727

2828
public bool show_hidden_files {get; set; default = false;}
2929
public bool show_file_preview {set; get; default = true;}
30-
public bool singleclick_select {set; get; default = false;}
3130
public bool confirm_trash {set; get; default = true;}
3231
public bool sort_directories_first { get; set; default = true; }
3332
public bool remember_history { get; set; default = true; }

src/Application.vala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,6 @@ public class Files.Application : Gtk.Application {
263263
private void init_schemas () {
264264
/* Bind settings with GOFPreferences */
265265
var prefs = Files.Preferences.get_default ();
266-
if (app_settings.settings_schema.has_key ("singleclick-select")) {
267-
app_settings.bind ("singleclick-select", prefs, "singleclick-select", GLib.SettingsBindFlags.DEFAULT);
268-
}
269-
270266
Files.app_settings.bind ("show-hiddenfiles", prefs, "show-hidden-files", GLib.SettingsBindFlags.DEFAULT);
271267

272268
Files.app_settings.bind ("show-file-preview",

src/View/AbstractDirectoryView.vala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -454,13 +454,13 @@ namespace Files {
454454

455455
var prefs = (Files.Preferences.get_default ());
456456
prefs.notify["show-hidden-files"].connect (on_show_hidden_files_changed);
457-
prefs.notify["show-remote-thumbnails"].connect (on_show_thumbnails_changed);
458-
prefs.notify["show-local-thumbnails"].connect (on_show_thumbnails_changed);
459457
prefs.notify["sort-directories-first"].connect (on_sort_directories_first_changed);
460458
prefs.notify["date-format"].connect (on_dateformat_changed);
461-
prefs.bind_property (
462-
"singleclick-select", this, "singleclick_select", BindingFlags.DEFAULT | BindingFlags.SYNC_CREATE
463-
);
459+
460+
app_settings.bind ("singleclick-select", this, "singleclick_select", SettingsBindFlags.DEFAULT);
461+
462+
app_settings.changed["show-remote-thumbnails"].connect (on_show_thumbnails_changed);
463+
app_settings.changed["show-local-thumbnails"].connect (on_show_thumbnails_changed);
464464

465465
model.set_should_sort_directories_first (Files.Preferences.get_default ().sort_directories_first);
466466
model.row_deleted.connect (on_row_deleted);

src/View/Window.vala

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public class Files.View.Window : Hdy.ApplicationWindow {
7171
{"go-to", action_go_to, "s"},
7272
{"zoom", action_zoom, "s"},
7373
{"view-mode", action_view_mode, "u", "0" },
74-
{"singleclick-select", null, null, "false", change_state_single_click_select},
7574
{"tabhistory-restore", action_tabhistory_restore, "s" },
7675
{"folders-before-files", null, null, "true", change_state_folders_before_files},
7776
{"forward", action_forward, "i"},
@@ -123,6 +122,7 @@ public class Files.View.Window : Hdy.ApplicationWindow {
123122
add_action (app_settings.create_action ("show-local-thumbnails"));
124123
add_action (app_settings.create_action ("show-remote-thumbnails"));
125124
add_action (app_settings.create_action ("show-hiddenfiles"));
125+
add_action (app_settings.create_action ("singleclick-select"));
126126

127127
add_action_entries (WIN_ENTRIES, this);
128128
undo_actions_set_insensitive ();
@@ -280,7 +280,6 @@ public class Files.View.Window : Hdy.ApplicationWindow {
280280

281281
/** Apply preferences */
282282
var prefs = Files.Preferences.get_default (); // Bound to settings schema by Application
283-
get_action ("singleclick-select").set_state (prefs.singleclick_select);
284283
get_action ("folders-before-files").set_state (prefs.sort_directories_first);
285284

286285
button_forward.slow_press.connect (() => {
@@ -1038,12 +1037,6 @@ public class Files.View.Window : Hdy.ApplicationWindow {
10381037
doing_undo_redo = false;
10391038
}
10401039

1041-
public void change_state_single_click_select (GLib.SimpleAction action) {
1042-
bool state = !action.state.get_boolean ();
1043-
action.set_state (new GLib.Variant.boolean (state));
1044-
Files.Preferences.get_default ().singleclick_select = state;
1045-
}
1046-
10471040
public void change_state_folders_before_files (GLib.SimpleAction action) {
10481041
bool state = !action.state.get_boolean ();
10491042
action.set_state (new GLib.Variant.boolean (state));

0 commit comments

Comments
 (0)