Running external Gtk programs under Tabs (fwd)
---------- Forwarded message ---------- Date: Wed, 27 Aug 2003 23:48:14 -0700 From: t <loveall@qwest.net> To: Jorge Arellano Cid <jcid@softhome.net> Subject: Running external Gtk programs under Tabs Jorge, Please forward this to the dillo/dev mailing list unless you think it is not appropriate. Nice job on dillo, guys! Have been using it since at least 0.2.1. Nice work on the tabs, Frank. They have added a whole new dimension to dillo. Recently, while working on a multi-media project, noticed that I had way too many instances of a text editor open. Couldn't easily find the desired file. About then Frank put up the tab/frame patch. Spent a day or so getting external Gtk apps to run in a tabbed window. This turned dillo into an MDI interface with built-in file picker and HTML help file viewer. This has been working for me in a stable manner, e.g. no seg faults, for about two weeks under heavy use. Which means it will only take someone else about 5 minutes to induce a failure:-). Have modified a file manager, my personal text editor and the erwin HTML editor to run as client Gtk apps, just like dillo. As a matter of fact, dillo can run itself as an external Gtk app in a tabbed window. The patch file for the tab/frame patched version of dillo is set up to do this as a working example. You can download it from: http://www.users.qwest.net/~loveall/xid8-patch.gz !!!! NOTE !!!! This patch is valid only on dillo-0.7.3 patched with Franks version 9 tab/frame patch: http://www.geocities.com/ikbenfrank/dillo-0.7.3-20030821-tabs.patch.gz To modify a typical Gtk app to act as a client requires just the following: In function main(), add these lines at the beginning just after the data declarations: guint32 xid = 0; int i = 1; if (i < argc-1 && !strcmp(argv[i++],"-x")){ xid = strtol(argv[i], NULL, 10); argc -= 2; argv += 2; if(xid == LONG_MIN || xid == LONG_MAX) xid = 0; } This requires that the first two args when calling dillo be '-x <Xid number>'. Find and replace the (typically) single line: main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); with: if(!xid) main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); else main_window = gtk_plug_new (xid); See also the working source which references 'xid' in dillo.c and interface.c. Thanks again, to the dillo crew. You guys are awesome. Regards, Terry Loveall
very cool ! :-D BIG SMILEY Jorge Arellano Cid wrote:
---------- Forwarded message ---------- Date: Wed, 27 Aug 2003 23:48:14 -0700 From: t <loveall@qwest.net> To: Jorge Arellano Cid <jcid@softhome.net> Subject: Running external Gtk programs under Tabs
Jorge,
Please forward this to the dillo/dev mailing list unless you think it is not appropriate.
Nice job on dillo, guys! Have been using it since at least 0.2.1.
Nice work on the tabs, Frank. They have added a whole new dimension to dillo.
Recently, while working on a multi-media project, noticed that I had way too many instances of a text editor open. Couldn't easily find the desired file.
About then Frank put up the tab/frame patch. Spent a day or so getting external Gtk apps to run in a tabbed window. This turned dillo into an MDI interface with built-in file picker and HTML help file viewer.
This has been working for me in a stable manner, e.g. no seg faults, for about two weeks under heavy use. Which means it will only take someone else about 5 minutes to induce a failure:-).
Have modified a file manager, my personal text editor and the erwin HTML editor to run as client Gtk apps, just like dillo. As a matter of fact, dillo can run itself as an external Gtk app in a tabbed window. The patch file for the tab/frame patched version of dillo is set up to do this as a working example. You can download it from: http://www.users.qwest.net/~loveall/xid8-patch.gz
!!!! NOTE !!!! This patch is valid only on dillo-0.7.3 patched with Franks version 9 tab/frame patch: http://www.geocities.com/ikbenfrank/dillo-0.7.3-20030821-tabs.patch.gz
To modify a typical Gtk app to act as a client requires just the following:
In function main(), add these lines at the beginning just after the data declarations:
guint32 xid = 0; int i = 1;
if (i < argc-1 && !strcmp(argv[i++],"-x")){ xid = strtol(argv[i], NULL, 10); argc -= 2; argv += 2; if(xid == LONG_MIN || xid == LONG_MAX) xid = 0; }
This requires that the first two args when calling dillo be '-x <Xid number>'.
Find and replace the (typically) single line:
main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
with: if(!xid) main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); else main_window = gtk_plug_new (xid);
See also the working source which references 'xid' in dillo.c and interface.c.
Thanks again, to the dillo crew. You guys are awesome.
Regards, Terry Loveall
_______________________________________________ Dillo-dev mailing list Dillo-dev@lists.auriga.wearlab.de http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
participants (2)
-
Jorge Arellano Cid
-
Lars Segerlund