diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-29 12:10:29 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-29 12:10:29 +0300 |
commit | 9d8d4e6f3b560b92c8b5e67b93b164831028dff0 (patch) | |
tree | 03abd4af551269e32b144eafee840c029570eab4 /src/app.c | |
parent | 317614874b2bb4c2b3ac144bc99431d1abe58dc7 (diff) |
Cleanup
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -125,6 +125,7 @@ const iString *dateStr_(const iDate *date) { | |||
125 | static iString *serializePrefs_App_(const iApp *d) { | 125 | static 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 | ||
630 | iBool handleCommand_App(const char *cmd) { | 630 | iBool 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 | } |