diff options
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -168,6 +168,7 @@ static iString *serializePrefs_App_(const iApp *d) { | |||
168 | } | 168 | } |
169 | appendFormat_String(str, "sidebar.mode arg:%d\n", mode_SidebarWidget(sidebar)); | 169 | appendFormat_String(str, "sidebar.mode arg:%d\n", mode_SidebarWidget(sidebar)); |
170 | appendFormat_String(str, "uiscale arg:%f\n", uiScale_Window(d->window)); | 170 | appendFormat_String(str, "uiscale arg:%f\n", uiScale_Window(d->window)); |
171 | appendFormat_String(str, "prefs.dialogtab arg:%d\n", d->prefs.dialogTab); | ||
171 | appendFormat_String(str, "font.set arg:%d\n", d->prefs.font); | 172 | appendFormat_String(str, "font.set arg:%d\n", d->prefs.font); |
172 | appendFormat_String(str, "headingfont.set arg:%d\n", d->prefs.headingFont); | 173 | appendFormat_String(str, "headingfont.set arg:%d\n", d->prefs.headingFont); |
173 | appendFormat_String(str, "zoom.set arg:%d\n", d->prefs.zoomPercent); | 174 | appendFormat_String(str, "zoom.set arg:%d\n", d->prefs.zoomPercent); |
@@ -695,6 +696,9 @@ static iBool handlePrefsCommands_(iWidget *d, const char *cmd) { | |||
695 | cstr_String(text_InputWidget(findChild_Widget(d, "prefs.proxy.http")))); | 696 | cstr_String(text_InputWidget(findChild_Widget(d, "prefs.proxy.http")))); |
696 | postCommandf_App("proxy.gopher address:%s", | 697 | postCommandf_App("proxy.gopher address:%s", |
697 | cstr_String(text_InputWidget(findChild_Widget(d, "prefs.proxy.gopher")))); | 698 | cstr_String(text_InputWidget(findChild_Widget(d, "prefs.proxy.gopher")))); |
699 | const iWidget *tabs = findChild_Widget(d, "prefs.tabs"); | ||
700 | postCommandf_App("prefs.dialogtab arg:%u", | ||
701 | tabPageIndex_Widget(tabs, currentTabPage_Widget(tabs))); | ||
698 | destroy_Widget(d); | 702 | destroy_Widget(d); |
699 | return iTrue; | 703 | return iTrue; |
700 | } | 704 | } |
@@ -819,7 +823,11 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) { | |||
819 | 823 | ||
820 | iBool handleCommand_App(const char *cmd) { | 824 | iBool handleCommand_App(const char *cmd) { |
821 | iApp *d = &app_; | 825 | iApp *d = &app_; |
822 | if (equal_Command(cmd, "window.retain")) { | 826 | if (equal_Command(cmd, "prefs.dialogtab")) { |
827 | d->prefs.dialogTab = arg_Command(cmd); | ||
828 | return iTrue; | ||
829 | } | ||
830 | else if (equal_Command(cmd, "window.retain")) { | ||
823 | d->prefs.retainWindowSize = arg_Command(cmd); | 831 | d->prefs.retainWindowSize = arg_Command(cmd); |
824 | return iTrue; | 832 | return iTrue; |
825 | } | 833 | } |
@@ -842,7 +850,7 @@ iBool handleCommand_App(const char *cmd) { | |||
842 | postCommand_App("font.changed"); | 850 | postCommand_App("font.changed"); |
843 | postCommand_App("window.unfreeze"); | 851 | postCommand_App("window.unfreeze"); |
844 | return iTrue; | 852 | return iTrue; |
845 | } | 853 | } |
846 | else if (equal_Command(cmd, "zoom.set")) { | 854 | else if (equal_Command(cmd, "zoom.set")) { |
847 | setFreezeDraw_Window(get_Window(), iTrue); /* no intermediate draws before docs updated */ | 855 | setFreezeDraw_Window(get_Window(), iTrue); /* no intermediate draws before docs updated */ |
848 | d->prefs.zoomPercent = arg_Command(cmd); | 856 | d->prefs.zoomPercent = arg_Command(cmd); |
@@ -1043,6 +1051,8 @@ iBool handleCommand_App(const char *cmd) { | |||
1043 | schemeProxy_App(range_CStr("http"))); | 1051 | schemeProxy_App(range_CStr("http"))); |
1044 | setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.gopher"), | 1052 | setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.gopher"), |
1045 | schemeProxy_App(range_CStr("gopher"))); | 1053 | schemeProxy_App(range_CStr("gopher"))); |
1054 | iWidget *tabs = findChild_Widget(dlg, "prefs.tabs"); | ||
1055 | showTabPage_Widget(tabs, tabPage_Widget(tabs, d->prefs.dialogTab)); | ||
1046 | setCommandHandler_Widget(dlg, handlePrefsCommands_); | 1056 | setCommandHandler_Widget(dlg, handlePrefsCommands_); |
1047 | } | 1057 | } |
1048 | else if (equal_Command(cmd, "navigate.home")) { | 1058 | else if (equal_Command(cmd, "navigate.home")) { |