Re: dillo.cc cleanup and bugfix
123 <[email protected]>
| Newsgroups | gmane.comp.web.dillo.devel |
|---|---|
| Message-ID | <[email protected]> |
a_UIcmd_open_url and UIcmd_open_url_nbw are identical. Difference is in argument name and comment. Why not remove UIcmd_open_url_nbw and replace it with a_UIcmd_open_url? _______________________________________________ Dillo-dev mailing list [email protected] http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
openurl.patch
(text/plain, 1.3 KB)
diff -r c3f8d2d9831a src/uicmd.cc
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -626,6 +626,9 @@
*/
void a_UIcmd_open_url(BrowserWindow *bw, const DilloUrl *url)
{
+ /* When opening a new BrowserWindow (tab or real window) we focus
+ * Location if we don't yet have an URL, main otherwise.
+ */
if (url) {
a_Nav_push(bw, url, NULL);
BW2UI(bw)->focus_main();
@@ -636,20 +639,6 @@
}
}
-static void UIcmd_open_url_nbw(BrowserWindow *new_bw, const DilloUrl *url)
-{
- /* When opening a new BrowserWindow (tab or real window) we focus
- * Location if we don't yet have an URL, main otherwise.
- */
- if (url) {
- a_Nav_push(new_bw, url, NULL);
- BW2UI(new_bw)->focus_main();
- } else {
- BW2UI(new_bw)->focus_location();
- a_UIcmd_set_buttons_sens(new_bw);
- }
-}
-
/*
* Open a new URL in a new browser window
*/
@@ -661,7 +650,7 @@
a_UIcmd_get_wh(bw, &w, &h);
new_bw = a_UIcmd_browser_window_new(w, h, 0, bw);
- UIcmd_open_url_nbw(new_bw, url);
+ a_UIcmd_open_url(new_bw, url);
}
/*
@@ -672,7 +661,7 @@
BrowserWindow *bw = (BrowserWindow *)vbw;
BrowserWindow *new_bw = UIcmd_tab_new(BW2UI(bw)->tabs(),
bw ? BW2UI(bw) : NULL, focus);
- UIcmd_open_url_nbw(new_bw, url);
+ a_UIcmd_open_url(new_bw, url);
}
/*