diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-05-18 17:52:45 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-05-18 17:52:45 +0200 |
commit | 2ea9718c0a3297ff91c1219b3e011a8a3367461f (patch) | |
tree | 64ea43d63fa8f91dd3080e26475204ddb11fab04 /src/uicmd.cc | |
parent | e949bbc7ed966ed47bebba5798756501bd285917 (diff) |
add support for --xid command line option
The --xid option is used by a plugin for the claws mail client
(http://www.claws-mail.org/) to embed the dillo window into the mailer
application to display HTML mails.
Diffstat (limited to 'src/uicmd.cc')
-rw-r--r-- | src/uicmd.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc index 4aa0da8f..c6954652 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -28,6 +28,7 @@ #include "timeout.hh" #include "menu.hh" #include "dialog.hh" +#include "xembed.hh" #include "bookmark.h" #include "history.h" #include "msg.h" @@ -387,10 +388,11 @@ void a_UIcmd_send_event_to_tabs_by_wid(int e, void *v_wid) * Create a new UI and its associated BrowserWindow data structure. * Use style from v_ui. If non-NULL it must be of type UI*. */ -BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh, const void *vbw) +BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh, uint32_t xid, const void *vbw) { BrowserWindow *old_bw = (BrowserWindow*)vbw; BrowserWindow *new_bw = NULL; + Xembed *win; if (ww <= 0 || wh <= 0) { // Set default geometry from dillorc. @@ -398,7 +400,8 @@ BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh, const void *vbw) wh = prefs.height; } - Window *win = new Window(ww, wh); + win = new Xembed(ww, wh); + win->shortcut(0); // Ignore Escape if (prefs.buffered_drawing != 2) win->clear_double_buffer(); @@ -417,6 +420,8 @@ BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh, const void *vbw) DilloTabs->add(new_ui); DilloTabs->resizable(new_ui); DilloTabs->window()->resizable(new_ui); + if (xid) + win->embed(xid); DilloTabs->window()->show(); if (old_bw == NULL && prefs.xpos >= 0 && prefs.ypos >= 0) { @@ -472,7 +477,7 @@ static BrowserWindow *UIcmd_tab_new(const void *vbw) // WORKAROUND: limit the number of tabs because of a fltk bug if (ui->tabs()->children() >= 127) return a_UIcmd_browser_window_new(ui->window()->w(), ui->window()->h(), - vbw); + 0, vbw); // Create and set the UI UI *new_ui = new UI(0, 0, ui->w(), ui->h(), DEFAULT_TAB_LABEL, ui); |