diff options
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r-- | src/ui/sidebarwidget.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 121e9a7c..ca4404d5 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -580,7 +580,8 @@ void setWidth_SidebarWidget(iSidebarWidget *d, int width) { | |||
580 | 580 | ||
581 | iBool handleBookmarkEditorCommands_SidebarWidget_(iWidget *editor, const char *cmd) { | 581 | iBool handleBookmarkEditorCommands_SidebarWidget_(iWidget *editor, const char *cmd) { |
582 | if (equal_Command(cmd, "bmed.accept") || equal_Command(cmd, "cancel")) { | 582 | if (equal_Command(cmd, "bmed.accept") || equal_Command(cmd, "cancel")) { |
583 | iSidebarWidget *d = findWidget_App("sidebar"); | 583 | iAssert(startsWith_String(id_Widget(editor), "bmed.")); |
584 | iSidebarWidget *d = findWidget_App(cstr_String(id_Widget(editor)) + 5); /* bmed.sidebar */ | ||
584 | if (equal_Command(cmd, "bmed.accept")) { | 585 | if (equal_Command(cmd, "bmed.accept")) { |
585 | const iString *title = text_InputWidget(findChild_Widget(editor, "bmed.title")); | 586 | const iString *title = text_InputWidget(findChild_Widget(editor, "bmed.title")); |
586 | const iString *url = text_InputWidget(findChild_Widget(editor, "bmed.url")); | 587 | const iString *url = text_InputWidget(findChild_Widget(editor, "bmed.url")); |
@@ -719,6 +720,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
719 | if (d->mode == bookmarks_SidebarMode && item) { | 720 | if (d->mode == bookmarks_SidebarMode && item) { |
720 | setFlags_Widget(w, disabled_WidgetFlag, iTrue); | 721 | setFlags_Widget(w, disabled_WidgetFlag, iTrue); |
721 | iWidget *dlg = makeBookmarkEditor_Widget(); | 722 | iWidget *dlg = makeBookmarkEditor_Widget(); |
723 | setId_Widget(dlg, format_CStr("bmed.%s", cstr_String(id_Widget(w)))); | ||
722 | iBookmark *bm = get_Bookmarks(bookmarks_App(), item->id); | 724 | iBookmark *bm = get_Bookmarks(bookmarks_App(), item->id); |
723 | setText_InputWidget(findChild_Widget(dlg, "bmed.title"), &bm->title); | 725 | setText_InputWidget(findChild_Widget(dlg, "bmed.title"), &bm->title); |
724 | setText_InputWidget(findChild_Widget(dlg, "bmed.url"), &bm->url); | 726 | setText_InputWidget(findChild_Widget(dlg, "bmed.url"), &bm->url); |
@@ -800,6 +802,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
800 | if (isCommand_Widget(w, ev, "feed.entry.edit")) { | 802 | if (isCommand_Widget(w, ev, "feed.entry.edit")) { |
801 | setFlags_Widget(w, disabled_WidgetFlag, iTrue); | 803 | setFlags_Widget(w, disabled_WidgetFlag, iTrue); |
802 | iWidget *dlg = makeBookmarkEditor_Widget(); | 804 | iWidget *dlg = makeBookmarkEditor_Widget(); |
805 | setId_Widget(dlg, format_CStr("bmed.%s", cstr_String(id_Widget(w)))); | ||
803 | setText_InputWidget(findChild_Widget(dlg, "bmed.title"), &feedBookmark->title); | 806 | setText_InputWidget(findChild_Widget(dlg, "bmed.title"), &feedBookmark->title); |
804 | setText_InputWidget(findChild_Widget(dlg, "bmed.url"), &feedBookmark->url); | 807 | setText_InputWidget(findChild_Widget(dlg, "bmed.url"), &feedBookmark->url); |
805 | setText_InputWidget(findChild_Widget(dlg, "bmed.tags"), &feedBookmark->tags); | 808 | setText_InputWidget(findChild_Widget(dlg, "bmed.tags"), &feedBookmark->tags); |