diff options
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index bf044c03..98f0fb18 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -907,8 +907,15 @@ iWidget *makeQuestion_Widget(const char *title, const char *msg, const char *lab | |||
907 | void setToggle_Widget(iWidget *d, iBool active) { | 907 | void setToggle_Widget(iWidget *d, iBool active) { |
908 | if (d) { | 908 | if (d) { |
909 | setFlags_Widget(d, selected_WidgetFlag, active); | 909 | setFlags_Widget(d, selected_WidgetFlag, active); |
910 | updateText_LabelWidget((iLabelWidget *) d, | 910 | iLabelWidget *label = (iLabelWidget *) d; |
911 | collectNewFormat_String("%s", isSelected_Widget(d) ? "YES" : "NO")); | 911 | if (!cmp_String(text_LabelWidget(label), "YES") || |
912 | !cmp_String(text_LabelWidget(label), "NO")) { | ||
913 | updateText_LabelWidget((iLabelWidget *) d, | ||
914 | collectNewFormat_String("%s", isSelected_Widget(d) ? "YES" : "NO")); | ||
915 | } | ||
916 | else { | ||
917 | refresh_Widget(d); | ||
918 | } | ||
912 | } | 919 | } |
913 | } | 920 | } |
914 | 921 | ||
@@ -1067,6 +1074,14 @@ iWidget *makePreferences_Widget(void) { | |||
1067 | fonts = new_Widget(); | 1074 | fonts = new_Widget(); |
1068 | addFontButtons_(fonts, "font"); | 1075 | addFontButtons_(fonts, "font"); |
1069 | addChildFlags_Widget(values, iClob(fonts), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); | 1076 | addChildFlags_Widget(values, iClob(fonts), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); |
1077 | addChild_Widget(headings, iClob(makeHeading_Widget("Monospace body:"))); | ||
1078 | iWidget *mono = new_Widget(); | ||
1079 | /* TODO: Needs labels! */ | ||
1080 | setTextCStr_LabelWidget( | ||
1081 | addChild_Widget(mono, iClob(makeToggle_Widget("prefs.mono.gemini"))), "Gemini"); | ||
1082 | setTextCStr_LabelWidget( | ||
1083 | addChild_Widget(mono, iClob(makeToggle_Widget("prefs.mono.gopher"))), "Gopher"); | ||
1084 | addChildFlags_Widget(values, iClob(mono), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); | ||
1070 | } | 1085 | } |
1071 | addChild_Widget(headings, iClob(makePadding_Widget(2 * gap_UI))); | 1086 | addChild_Widget(headings, iClob(makePadding_Widget(2 * gap_UI))); |
1072 | addChild_Widget(values, iClob(makePadding_Widget(2 * gap_UI))); | 1087 | addChild_Widget(values, iClob(makePadding_Widget(2 * gap_UI))); |
@@ -1173,7 +1188,7 @@ static iBool handleBookmarkCreationCommands_SidebarWidget_(iWidget *editor, cons | |||
1173 | url, | 1188 | url, |
1174 | title, | 1189 | title, |
1175 | tags, | 1190 | tags, |
1176 | first_String(label_LabelWidget(findChild_Widget(editor, "bmed.icon")))); | 1191 | first_String(text_LabelWidget(findChild_Widget(editor, "bmed.icon")))); |
1177 | postCommand_App("bookmarks.changed"); | 1192 | postCommand_App("bookmarks.changed"); |
1178 | } | 1193 | } |
1179 | destroy_Widget(editor); | 1194 | destroy_Widget(editor); |