File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,7 @@ public class ENotes.Editor : Gtk.Box {
269269 current_page. data = this . get_text ();
270270 current_page. html_cache = " " ;
271271 PageTable . get_instance (). save_page (current_page);
272+ ViewEditStack . get_instance (). refresh_headerbar_title ();
272273 }
273274 }
274275 }
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ public class ENotes.ViewEditStack : Gtk.Overlay {
4444 private Gtk . Stack stack;
4545
4646 public ENotes . Page ? current_page {get ; private set ; default = null ;}
47+ public ENotes . Notebook ? current_notebook {get ; private set ; default = null ;}
4748
4849 public static ViewEditStack get_instance () {
4950 if (instance == null ) {
@@ -76,14 +77,13 @@ public class ENotes.ViewEditStack : Gtk.Overlay {
7677 return ;
7778 }
7879 }
79-
80+
8081 editor. save_file ();
8182 current_page = PageTable . get_instance (). get_page (page. id);
83+ current_notebook = ENotes . NotebookTable . get_instance(). load_notebook_data (current_page. notebook_id);
84+
8285 editor. current_page = current_page;
8386 viewer. load_page (current_page);
84-
85- var ntbook = ENotes . NotebookTable . get_instance(). load_notebook_data(current_page. notebook_id);
86- ENotes . Headerbar . get_instance (). set_title (page. name, ntbook. name);
8787
8888 bookmark_button. set_page (current_page);
8989 page_set (current_page);
@@ -93,6 +93,11 @@ public class ENotes.ViewEditStack : Gtk.Overlay {
9393 }
9494
9595 editor. set_sensitive (! Trash . get_instance (). is_page_trashed (page));
96+ refresh_headerbar_title ();
97+ }
98+
99+ public void refresh_headerbar_title () {
100+ ENotes . Headerbar . get_instance (). set_title (current_page. name, current_notebook. name);
96101 }
97102
98103 public void show_edit () {
You can’t perform that action at this time.
0 commit comments