summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/app.c b/src/app.c
index 43e69446..3767495c 100644
--- a/src/app.c
+++ b/src/app.c
@@ -125,6 +125,7 @@ const iString *dateStr_(const iDate *date) {
125static iString *serializePrefs_App_(const iApp *d) { 125static iString *serializePrefs_App_(const iApp *d) {
126 iString *str = new_String(); 126 iString *str = new_String();
127 const iSidebarWidget *sidebar = findWidget_App("sidebar"); 127 const iSidebarWidget *sidebar = findWidget_App("sidebar");
128 appendFormat_String(str, "window.retain arg:%d\n", d->retainWindowSize);
128 if (d->retainWindowSize) { 129 if (d->retainWindowSize) {
129 int w, h, x, y; 130 int w, h, x, y;
130 SDL_GetWindowSize(d->window->win, &w, &h); 131 SDL_GetWindowSize(d->window->win, &w, &h);
@@ -132,7 +133,6 @@ static iString *serializePrefs_App_(const iApp *d) {
132 appendFormat_String(str, "window.setrect width:%d height:%d coord:%d %d\n", w, h, x, y); 133 appendFormat_String(str, "window.setrect width:%d height:%d coord:%d %d\n", w, h, x, y);
133 appendFormat_String(str, "sidebar.width arg:%d\n", width_SidebarWidget(sidebar)); 134 appendFormat_String(str, "sidebar.width arg:%d\n", width_SidebarWidget(sidebar));
134 } 135 }
135 appendFormat_String(str, "retainwindow arg:%d\n", d->retainWindowSize);
136 if (isVisible_Widget(constAs_Widget(sidebar))) { 136 if (isVisible_Widget(constAs_Widget(sidebar))) {
137 appendCStr_String(str, "sidebar.toggle\n"); 137 appendCStr_String(str, "sidebar.toggle\n");
138 } 138 }
@@ -503,7 +503,7 @@ static iBool handlePrefsCommands_(iWidget *d, const char *cmd) {
503 if (equal_Command(cmd, "prefs.dismiss") || equal_Command(cmd, "preferences")) { 503 if (equal_Command(cmd, "prefs.dismiss") || equal_Command(cmd, "preferences")) {
504 setUiScale_Window(get_Window(), 504 setUiScale_Window(get_Window(),
505 toFloat_String(text_InputWidget(findChild_Widget(d, "prefs.uiscale")))); 505 toFloat_String(text_InputWidget(findChild_Widget(d, "prefs.uiscale"))));
506 postCommandf_App("retainwindow arg:%d", 506 postCommandf_App("window.retain arg:%d",
507 isSelected_Widget(findChild_Widget(d, "prefs.retainwindow"))); 507 isSelected_Widget(findChild_Widget(d, "prefs.retainwindow")));
508 postCommandf_App("ostheme arg:%d", 508 postCommandf_App("ostheme arg:%d",
509 isSelected_Widget(findChild_Widget(d, "prefs.ostheme"))); 509 isSelected_Widget(findChild_Widget(d, "prefs.ostheme")));
@@ -629,7 +629,7 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) {
629 629
630iBool handleCommand_App(const char *cmd) { 630iBool handleCommand_App(const char *cmd) {
631 iApp *d = &app_; 631 iApp *d = &app_;
632 if (equal_Command(cmd, "retainwindow")) { 632 if (equal_Command(cmd, "window.retain")) {
633 d->retainWindowSize = arg_Command(cmd); 633 d->retainWindowSize = arg_Command(cmd);
634 return iTrue; 634 return iTrue;
635 } 635 }