Out of interest: is that a standard option, or does it involve some trickery?

not standard, but the principle is straightforward - change the main() for each program to program_main() and make a new main() that calls the appropriate program_main() based on the basename of agv[0] (the /path/name of the binary as executed) or argv[1] if for instance the first arg is busybox - see the latest release of mupdf for an example that I contributed to (mubusy).

Now this is also applicable to scripts, but using $0 instead of argv[0]
for example

Code:

cdplayer(){
: code here
}

processinfo(){
: code here
}

multicall(){
$@
}

mycommand=`basename $0`
$mycommand $@

(this will run the function cdplayer if you run the script as ./cdplayer or multicall cdplayer, and is much more compressible than several small files)_________________Web Programming - Pet Packaging 100 & 101

Oh, so you're actually doing it to reduce the number of executables, rather than to avoid compiling multiple copies of shared code?
Do you need to post the modified source?
What license is it under?_________________DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!

Main purpose of doing mcb is to reduce total size...
I do not know about the license stuff and if source must be shipped along with the binary but as always source is available upon request. I seldom ship the modified source code as only very few seems interested in that...

The purpose of making the demos is to exercise gtkdialog1 and find missing features etc. The gtkrdesktop is a launcher for the remote desktop application rdesktop, used to connect to various windows desktops. I would have liked to include possibilities for saving/loading profiles but are missing some features in the gtkdialog1 like setting status of checkboxes via script/variable and the append action to comboboxes - added to the TODO list in first post.

I seldom ship the modified source code as only very few seems interested in that...

What if someone comes along in future who wants it, but you're not around anymore? Your effort would have been wasted, as someone else would need to redo it.
I know of a case where someone released a couple of Windows builds of a program that they were working on based on a GPL library, promising to release the source when it was "finished" (a number of people want it, mostly to build on Linux). But then they disappeared from the forum it was released on, without providing the source. There are still people finding it years later, but all we can do is use the binary with Wine

Please provide it. Thanks
...
What if someone comes along in future who wants it, but you're not around anymore? Your effort would have been wasted, as someone else would need to redo it.
...

Is a patch OK?

The mcb is more a technique and it is described other places in this forum - but as it involves some specific new code for every binary you apply it too - I guess you are right - and I do see your point

Actually, I think I wasn't 100% correct when I said you need to post the source with the binary. You need to either post the source or a written offer to provide the source to anyone who has the binary. (I also saw someone say that the source needs to be distributed with the binary, but not necessarily by you, and that if you provided a link to the original source that would suffice, along with patches for any changes. I'm not sure how true this is.)
Anyway, I think technically we should be distributing source with every .pet, in which case the GPL compliance around here is terrible. Providing patches should make most people happy though._________________DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!

Attached another demo: gtkman
Find man pages present on your system and text-format them for view in edit-widget. Need original man - busybox man will not work - so static build of man-1.6e also included.

Here is a static build with my musl toolkit (all pixbuff loaders are working except tiff ,... but only because it is kindof irrelevant here), I modified stringman.c to speed up the file search - you can now just export GTKDIALOG_PIXMAP_DIR and it will look there.

Thanks for the patch for the find_pixmap!
Did you use the last source of gtkdialog1 (GtkDialog1-1.1)? Your binary has some problems with setting the wmclass I think - app name wont show in window title which make the app crash if you move mouse over jwm buttonbar. Might just be my jwm that has the problem - its P412 std jwm.
The button images also seems odd - no right margin.
Below same script running with your bin left and mine right.
A second thought: I think the wmclass is gdk/gtk/tinyX11 related. I think I made a hack for it - try look into my gdk/gtk-sources and search for wmclass...

It was probably just a badly patched toolchain - I left out some extra utf8 stuff from tinyX11 and probably hacked something to make it compile. (I lost patience after fixing most of the compile errors and warnings in gdk, so the gtk side just got quick, hacky patches)
Btw, you can make the static gdk_pixbuf easier to work with by doing:

Code:

ar x *.a (on the loaders)

and then adding those objects to libgdk_pixbuf.a with

Code:

ar cru libgdk_pixbuf.a *.o

Side note: the gdk-pixbuf stuff reminded me that rox-1.2.2 can use imlib if available, it should work pretty similar. (the vfs stuff was interesting too)_________________Web Programming - Pet Packaging 100 & 101

Techonosaurus, "rox-1.2.2 can use imlib if available" The older rox-1.0.0 used only imlib, but I didn't even know that 1.2.2 could use it. It may speed up loading of desktop icons and/or improve their rendering. Have you noticed either of these?

"the vfs stuff was interesting too" -Did you get this working? I always wanted it but couldn't get it to work.

About your patch to find_pixmap, There is a note in the TODO file about this function. What we really need there is to be using the users' chosen theme, if available. We now have gtkrc file being read, so 'themedir' gets set(hopefully).
The original code:

Code:

snprintf(tmp, 127, "/usr/share/icons/Bluecurve/16x16/stock/%s",

should be getting 'themedir' from the rc file and subsituting that name for the original 'Bluecurve'.

I think it's okay to be able to set the environmental variable GTKDIALOG_PIXMAP_DIR and use that first if set. But, next it should try to use the themedir from the rc file. We now can specify the rcfile on the command-line, so that should be the second choice. Otherwise, the users' default ~/.gtkrc should be read. If themedir has still not been set, then it should look under /usr/share/pixmaps or /usr/share/mini-icons. Common practice would have only *.xpm images under /usr/share/pixmaps and only *.png (or *.svg) under /usr/share/mini-icons.

@amigo - imlib and gdkpixbuf are much better suited to a shared library toolchain, so I have been trying to avoid them lately while playing with my static musl toolchain. However the way the modules work reduces the memory footprint significantly in a traditional shared library system (on par with the static builds) if you want to support multiple image types. ...btw before I forget ...
@goingnuts - do you still have the pre-gdk_pixbuf sources for gtkdialog 1?
Re: VFS in ROX-Filer, I did get it to work in the 2.X series - never tried it in 1.X IIRC it needed fuse, libavfs and lib{x,t}ar and was missing support for a widely used format (don't remember which)
Re:Themedir: I _think_ glade does that too ... I will check, it may be a simple cut/paste job.

Coming back to the gtk-swallow-widget - present source below. Needs window ID of the window to swallow passed as argument - at the moment found by using xwininfo. Attached image of static mplayer (diet build found here) playing 2001-A_Space_Odyssey.avi and swallowed by the gtk-app.
Main problem now is to have the swallow-widget to launch the program you want to swallow and swallow it. Code below mainly produced by technosaurus:

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum