aboutsummaryrefslogtreecommitdiff
path: root/src/dialog.cc
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2011-07-29 20:19:08 -0400
committerJorge Arellano Cid <jcid@dillo.org>2011-07-29 20:19:08 -0400
commitb67fe8dc3de773aa251556003074ac0d721ed270 (patch)
tree7e69adfeaf14f6671a84d7e86e0840c0b9856b9e /src/dialog.cc
parentd4e3caf23b1639103cba50c20282cc2e647e3771 (diff)
Added better error handling for the web search dialog (search_url)
Diffstat (limited to 'src/dialog.cc')
-rw-r--r--src/dialog.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/dialog.cc b/src/dialog.cc
index 85121c63..15e5d7a9 100644
--- a/src/dialog.cc
+++ b/src/dialog.cc
@@ -89,7 +89,6 @@ public:
if (e == FL_KEYBOARD &&
(Fl::event_key() == FL_Enter || Fl::event_key() == FL_Down) &&
(Fl::event_state() & (FL_SHIFT|FL_CTRL|FL_ALT|FL_META)) == 0) {
- MSG("CustChoice: ENTER\n");
return Fl_Choice::handle(FL_PUSH);
}
return Fl_Choice::handle(e);
@@ -164,7 +163,7 @@ const char *a_Dialog_input(const char *msg)
for (int i = 0, j = 0; i < n_it; i++) {
char *label, *url, *source;
source = (char *)dList_nth_data(prefs.search_urls, i);
- if (a_Misc_parse_search_url(source, &label, &url) < 0)
+ if (!source || a_Misc_parse_search_url(source, &label, &url) < 0)
continue;
pm[j++].label(FL_NORMAL_LABEL, strdup(label));
}
@@ -191,12 +190,10 @@ const char *a_Dialog_input(const char *msg)
window->show();
while (window->shown())
Fl::wait();
- _MSG("a_Dialog_input answer = %d\n", input_answer);
if (input_answer == 1) {
/* we have a string, save it */
dFree(input_str);
input_str = dStrdup(c_inp->value());
- MSG("a_Dialog_input value() = %d\n", ch->value());
prefs.search_url_idx = ch->value();
}
delete window;