From 0df75e6a18ef70fcd87f819e0c022b2cd9b381aa Mon Sep 17 00:00:00 2001 From: corvid Date: Wed, 17 Feb 2010 23:10:05 +0000 Subject: dialog recombine make/show_text_window The function had been split up in June 08 so that I could put an unref_buf() between them. Now that view source is a dpi, it's no longer necessary. --- src/dialog.cc | 14 +++----------- src/dialog.hh | 3 +-- src/uicmd.cc | 4 +--- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/dialog.cc b/src/dialog.cc index c02ee223..47af9921 100644 --- a/src/dialog.cc +++ b/src/dialog.cc @@ -121,9 +121,9 @@ char *a_Dialog_open_file(const char *msg, } /* - * Make a new window with the provided text + * Show a new window with the provided text */ -void *a_Dialog_make_text_window(const char *txt, const char *title) +void a_Dialog_text_window(const char *txt, const char *title) { //int wh = 600, ww = 650, bh = 30; int wh = prefs.height, ww = prefs.width, bh = 30; @@ -159,15 +159,7 @@ void *a_Dialog_make_text_window(const char *txt, const char *title) window->resizable(td); window->end(); - return window; -} - -/* - * Show a window. - */ -void a_Dialog_show_text_window(void *vWindow) -{ - ((Window *)vWindow)->show(); + window->show(); } /*--------------------------------------------------------------------------*/ diff --git a/src/dialog.hh b/src/dialog.hh index d82eb0cc..440e9bba 100644 --- a/src/dialog.hh +++ b/src/dialog.hh @@ -23,8 +23,7 @@ const char *a_Dialog_select_file(const char *msg, const char *pattern, const char *fname); char *a_Dialog_open_file(const char *msg, const char *pattern, const char *fname); -void *a_Dialog_make_text_window(const char *txt, const char *title); -void a_Dialog_show_text_window(void *vWindow); +void a_Dialog_text_window(const char *txt, const char *title); #ifdef __cplusplus } diff --git a/src/uicmd.cc b/src/uicmd.cc index bc0eb47c..a93daa25 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -1012,9 +1012,7 @@ void a_UIcmd_view_page_bugs(void *vbw) BrowserWindow *bw = (BrowserWindow*)vbw; if (bw->num_page_bugs > 0) { - void *vWindow = a_Dialog_make_text_window(bw->page_bugs->str, - "Detected HTML errors"); - a_Dialog_show_text_window(vWindow); + a_Dialog_text_window(bw->page_bugs->str, "Detected HTML errors"); } else { a_Dialog_msg("Zero detected HTML errors!"); } -- cgit v1.2.3