summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index 2a72d511..edfd43cc 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -635,7 +635,7 @@ static iBool menuHandler_(iWidget *menu, const char *cmd) {
635 } 635 }
636 if ((equal_Command(cmd, "mouse.clicked") || equal_Command(cmd, "mouse.missed")) && 636 if ((equal_Command(cmd, "mouse.clicked") || equal_Command(cmd, "mouse.missed")) &&
637 arg_Command(cmd)) { 637 arg_Command(cmd)) {
638 if (hitChild_Widget(get_Window()->root.widget, coord_Command(cmd)) == parentMenuButton_(menu)) { 638 if (hitChild_Window(get_Window(), coord_Command(cmd)) == parentMenuButton_(menu)) {
639 return iFalse; 639 return iFalse;
640 } 640 }
641 /* Dismiss open menus when clicking outside them. */ 641 /* Dismiss open menus when clicking outside them. */
@@ -1366,7 +1366,7 @@ void finalizeSheet_Widget(iWidget *sheet) {
1366 easier to create phone versions of each dialog, but at least this works with any 1366 easier to create phone versions of each dialog, but at least this works with any
1367 future changes to the UI (..."works"). At least this way it is possible to enforce 1367 future changes to the UI (..."works"). At least this way it is possible to enforce
1368 a consistent styling. */ 1368 a consistent styling. */
1369 if (deviceType_App() == phone_AppDeviceType && parent_Widget(sheet) == get_Window()->root.widget) { 1369 if (deviceType_App() == phone_AppDeviceType && parent_Widget(sheet) == root_Widget(sheet)) {
1370 if (~flags_Widget(sheet) & keepOnTop_WidgetFlag) { 1370 if (~flags_Widget(sheet) & keepOnTop_WidgetFlag) {
1371 /* Already finalized. */ 1371 /* Already finalized. */
1372 arrange_Widget(sheet); 1372 arrange_Widget(sheet);
@@ -1573,7 +1573,7 @@ void finalizeSheet_Widget(iWidget *sheet) {
1573 destroy_Widget(pageContent); 1573 destroy_Widget(pageContent);
1574 setFlags_Widget(owner, drawBackgroundToBottom_WidgetFlag, iTrue); 1574 setFlags_Widget(owner, drawBackgroundToBottom_WidgetFlag, iTrue);
1575 } 1575 }
1576 destroyPending_Root(get_Root()); 1576 destroyPending_Root(sheet->root);
1577 /* Additional elements for preferences. */ 1577 /* Additional elements for preferences. */
1578 if (isPrefs) { 1578 if (isPrefs) {
1579 addChild_Widget(topPanel, iClob(makePadding_Widget(lineHeight_Text(defaultBig_FontId)))); 1579 addChild_Widget(topPanel, iClob(makePadding_Widget(lineHeight_Text(defaultBig_FontId))));
@@ -1754,7 +1754,7 @@ static void acceptValueInput_(iWidget *dlg) {
1754} 1754}
1755 1755
1756static void updateValueInputWidth_(iWidget *dlg) { 1756static void updateValueInputWidth_(iWidget *dlg) {
1757 const iRect safeRoot = safeRect_Root(get_Root()); 1757 const iRect safeRoot = safeRect_Root(dlg->root);
1758 const iInt2 rootSize = safeRoot.size; 1758 const iInt2 rootSize = safeRoot.size;
1759 iWidget * title = findChild_Widget(dlg, "valueinput.title"); 1759 iWidget * title = findChild_Widget(dlg, "valueinput.title");
1760 iWidget * prompt = findChild_Widget(dlg, "valueinput.prompt"); 1760 iWidget * prompt = findChild_Widget(dlg, "valueinput.prompt");
@@ -1966,7 +1966,7 @@ iWidget *makeQuestion_Widget(const char *title, const char *msg,
1966 } 1966 }
1967 addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI))); 1967 addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI)));
1968 addChild_Widget(dlg, iClob(makeDialogButtons_Widget(items, numItems))); 1968 addChild_Widget(dlg, iClob(makeDialogButtons_Widget(items, numItems)));
1969 addChild_Widget(get_Window()->root.widget, iClob(dlg)); 1969 addChild_Widget(dlg->root->widget, iClob(dlg));
1970 arrange_Widget(dlg); /* BUG: This extra arrange shouldn't be needed but the dialog won't 1970 arrange_Widget(dlg); /* BUG: This extra arrange shouldn't be needed but the dialog won't
1971 be arranged correctly unless it's here. */ 1971 be arranged correctly unless it's here. */
1972 finalizeSheet_Widget(dlg); 1972 finalizeSheet_Widget(dlg);
@@ -2412,7 +2412,7 @@ iWidget *makePreferences_Widget(void) {
2412 addChild_Widget(dlg, 2412 addChild_Widget(dlg,
2413 iClob(makeDialogButtons_Widget( 2413 iClob(makeDialogButtons_Widget(
2414 (iMenuItem[]){ { "${dismiss}", SDLK_ESCAPE, 0, "prefs.dismiss" } }, 1))); 2414 (iMenuItem[]){ { "${dismiss}", SDLK_ESCAPE, 0, "prefs.dismiss" } }, 1)));
2415 addChild_Widget(get_Window()->root.widget, iClob(dlg)); 2415 addChild_Widget(dlg->root->widget, iClob(dlg));
2416 finalizeSheet_Widget(dlg); 2416 finalizeSheet_Widget(dlg);
2417 //printTree_Widget(dlg); 2417 //printTree_Widget(dlg);
2418 return dlg; 2418 return dlg;
@@ -2445,7 +2445,7 @@ iWidget *makeBookmarkEditor_Widget(void) {
2445 KMOD_PRIMARY, 2445 KMOD_PRIMARY,
2446 "bmed.accept" } }, 2446 "bmed.accept" } },
2447 2))); 2447 2)));
2448 addChild_Widget(get_Window()->root.widget, iClob(dlg)); 2448 addChild_Widget(get_Root()->widget, iClob(dlg));
2449 finalizeSheet_Widget(dlg); 2449 finalizeSheet_Widget(dlg);
2450 return dlg; 2450 return dlg;
2451} 2451}
@@ -2578,7 +2578,7 @@ iWidget *makeFeedSettings_Widget(uint32_t bookmarkId) {
2578 setId_Widget(child_Widget(buttons, childCount_Widget(buttons) - 1), "feedcfg.save"); 2578 setId_Widget(child_Widget(buttons, childCount_Widget(buttons) - 1), "feedcfg.save");
2579 arrange_Widget(dlg); 2579 arrange_Widget(dlg);
2580 as_Widget(input)->rect.size.x = 100 * gap_UI - headings->rect.size.x; 2580 as_Widget(input)->rect.size.x = 100 * gap_UI - headings->rect.size.x;
2581 addChild_Widget(get_Window()->root.widget, iClob(dlg)); 2581 addChild_Widget(get_Root()->widget, iClob(dlg));
2582 finalizeSheet_Widget(dlg); 2582 finalizeSheet_Widget(dlg);
2583 /* Initialize. */ { 2583 /* Initialize. */ {
2584 const iBookmark *bm = bookmarkId ? get_Bookmarks(bookmarks_App(), bookmarkId) : NULL; 2584 const iBookmark *bm = bookmarkId ? get_Bookmarks(bookmarks_App(), bookmarkId) : NULL;
@@ -2654,7 +2654,7 @@ iWidget *makeIdentityCreation_Widget(void) {
2654 KMOD_PRIMARY, 2654 KMOD_PRIMARY,
2655 "ident.accept" } }, 2655 "ident.accept" } },
2656 2))); 2656 2)));
2657 addChild_Widget(get_Window()->root.widget, iClob(dlg)); 2657 addChild_Widget(get_Root()->widget, iClob(dlg));
2658 finalizeSheet_Widget(dlg); 2658 finalizeSheet_Widget(dlg);
2659 return dlg; 2659 return dlg;
2660} 2660}