summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-01 18:33:42 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-01 18:33:42 +0200
commit7d2744f839fb6adb9b4e13957ab53dc57293ae6d (patch)
tree0a69a8d0e26130e3aed77fcbb35722c26b7e85ea /src/ui/util.c
parent319b3d8bba5793a56654d143a4ac75170698e141 (diff)
Editing feed title in Feed Settings dialog
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index d5bddda9..d9997004 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1249,7 +1249,9 @@ iWidget *makeFeedSettings_Widget(uint32_t bookmarkId) {
1249 iWidget *dlg = makeSheet_Widget("feedcfg"); 1249 iWidget *dlg = makeSheet_Widget("feedcfg");
1250 setId_Widget(addChildFlags_Widget( 1250 setId_Widget(addChildFlags_Widget(
1251 dlg, 1251 dlg,
1252 iClob(new_LabelWidget(uiHeading_ColorEscape "FEED SETTINGS", NULL)), 1252 iClob(new_LabelWidget(bookmarkId ? uiHeading_ColorEscape "FEED SETTINGS"
1253 : uiHeading_ColorEscape "SUBSCRIBE TO PAGE",
1254 NULL)),
1253 frameless_WidgetFlag), 1255 frameless_WidgetFlag),
1254 "feedcfg.heading"); 1256 "feedcfg.heading");
1255 iWidget *page = new_Widget(); 1257 iWidget *page = new_Widget();
@@ -1259,27 +1261,30 @@ iWidget *makeFeedSettings_Widget(uint32_t bookmarkId) {
1259 page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag); 1261 page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag);
1260 iWidget *values = addChildFlags_Widget( 1262 iWidget *values = addChildFlags_Widget(
1261 page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag); 1263 page, iClob(new_Widget()), arrangeVertical_WidgetFlag | arrangeSize_WidgetFlag);
1262 addChild_Widget(headings, iClob(makeHeading_Widget("Feed title:"))); 1264 addChild_Widget(headings, iClob(makeHeading_Widget("Title:")));
1263 setId_Widget( 1265 iInputWidget *input = new_InputWidget(0);
1264 addChildFlags_Widget(values, iClob(new_LabelWidget("", NULL)), frameless_WidgetFlag), 1266 setId_Widget(addChild_Widget(values, iClob(input)), "feedcfg.title");
1265 "feedcfg.title");
1266 addChild_Widget(headings, iClob(makeHeading_Widget("Entry type:"))); 1267 addChild_Widget(headings, iClob(makeHeading_Widget("Entry type:")));
1267 iWidget *types = new_Widget(); { 1268 iWidget *types = new_Widget(); {
1268 addRadioButton_(types, "feedcfg.type.gemini", "YYYY-MM-DD", "feedcfg.type arg:0"); 1269 addRadioButton_(types, "feedcfg.type.gemini", "YYYY-MM-DD Links", "feedcfg.type arg:0");
1269 addRadioButton_(types, "feedcfg.type.headings", "New Headings", "feedcfg.type arg:1"); 1270 addRadioButton_(types, "feedcfg.type.headings", "New Headings", "feedcfg.type arg:1");
1270 } 1271 }
1271 addChildFlags_Widget(values, iClob(types), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); 1272 addChildFlags_Widget(values, iClob(types), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1272 iWidget *div = new_Widget(); { 1273 iWidget *div = new_Widget(); {
1273 setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue); 1274 setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue);
1274 addChild_Widget(div, iClob(newKeyMods_LabelWidget("Cancel", SDLK_ESCAPE, 0, "cancel"))); 1275 addChild_Widget(div, iClob(newKeyMods_LabelWidget("Cancel", SDLK_ESCAPE, 0, "cancel")));
1275 setId_Widget(addChild_Widget( 1276 setId_Widget(addChild_Widget(div,
1276 div, 1277 iClob(newKeyMods_LabelWidget(
1277 iClob(newKeyMods_LabelWidget( 1278 bookmarkId ? uiTextCaution_ColorEscape "Save Settings"
1278 uiTextCaution_ColorEscape "Save Settings", SDLK_RETURN, KMOD_PRIMARY, 1279 : uiTextCaution_ColorEscape "Subscribe",
1279 format_CStr("feedcfg.accept bmid:%d", bookmarkId)))), 1280 SDLK_RETURN,
1281 KMOD_PRIMARY,
1282 format_CStr("feedcfg.accept bmid:%d", bookmarkId)))),
1280 "feedcfg.save"); 1283 "feedcfg.save");
1281 } 1284 }
1282 addChild_Widget(dlg, iClob(div)); 1285 addChild_Widget(dlg, iClob(div));
1286 arrange_Widget(dlg);
1287 as_Widget(input)->rect.size.x = 100 * gap_UI - headings->rect.size.x;
1283 addChild_Widget(get_Window()->root, iClob(dlg)); 1288 addChild_Widget(get_Window()->root, iClob(dlg));
1284 centerSheet_Widget(dlg); 1289 centerSheet_Widget(dlg);
1285 return dlg; 1290 return dlg;