Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rnote-ui/data/app.gschema.xml.in
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
<summary>the current workspace index</summary>
</key>
<key name="workspace-list" type="a(aysus)">
<default>[]</default>
<default>[(b'./', 'folder-symbolic', 442479871, 'default')]</default>
<summary>the workspaces entries list</summary>
</key>
<key name="autosave" type="b">
4 changes: 3 additions & 1 deletion rnote-ui/src/workspacebrowser/mod.rs
Original file line number Diff line number Diff line change
@@ -150,6 +150,7 @@ impl WorkspaceBrowser {

pub fn init(&self, appwindow: &RnoteAppWindow) {
let remove_workspace_button = self.imp().remove_workspace_button.get();
let edit_workspace_button = self.imp().edit_workspace_button.get();

self.imp().add_workspace_button.get().connect_clicked(
clone!(@weak self as workspacebrowser, @weak appwindow => move |_add_workspace_button| {
@@ -174,8 +175,9 @@ impl WorkspaceBrowser {
);

self.imp().workspace_list.connect_items_changed(
clone!(@weak self as workspacebrowser, @weak appwindow, @weak remove_workspace_button => move |folders_model, _, _, _| {
clone!(@weak self as workspacebrowser, @weak appwindow, @weak remove_workspace_button, @weak edit_workspace_button => move |folders_model, _, _, _| {
remove_workspace_button.set_sensitive(folders_model.n_items() > 1);
edit_workspace_button.set_sensitive(folders_model.n_items() > 0);
workspacebrowser.save_to_settings(&appwindow.app_settings());
}),
);

0 comments on commit fab9abe

Please sign in to comment.