Thanks a million. The glade problem is fixed! And the new combotext widget is great. I am now revising scripts to take advantage of it.

You're welcome. Storing binary files in shell variables is noted.

01micko wrote:

Seems `gtk_widget_get_realized' isn't introduced until gtk+-2.20 so the latest revision fails to compile in Puppy-431. (gtk+-2.14)

Any work around possible?

Yep, implemented and committed Also get the latest example as I've updated it.

BTW I've got an impression that some people might be checking-out the entire project everytime I make a revision. For those people (if there are any) all that's required is to type "svn update" from within the same folder whenever you feel like doing it and you'll be in sync with the repository I'll write it up on the first page.

According to the Gtk specs, the button widget has an "image-position" property which defines the position of the image relative to the text inside the button. The default is left and works, but as zigbert has mentioned, in gtkdialog it does not work for any other position unless it's a gtk-stock image.

This means you can't really put a caption above or below a button image where multiple button images are used in rows.

I was wondering if this is just a gtkdialog problem or if Gtk designed it only to be used with gtk-stock images.

According to the Gtk specs, the button widget has an "image-position" property which defines the position of the image relative to the text inside the button. The default is left and works, but as zigbert has mentioned, in gtkdialog it does not work for any other position unless it's a gtk-stock image.

This means you can't really put a caption above or below a button image where multiple button images are used in rows.

I was wondering if this is just a gtkdialog problem or if Gtk designed it only to be used with gtk-stock images.

Cheers,
s

This is how gtkdialog constructs a button: A GtkButton containing either a GtkLabel, a GtkImage or both packed inside a GtkHBox.

The key point here is that if it's a stock image it's managed by GTK, but an image file with a label goes into an hbox; that's the way the original author designed it. Anything that gets hardcoded can be made a choice via a tag attribute. I agree that it would be nice to have images from files placed atop labels so I'll add a feature request for it.

Thanks for taking the time to explain why this doesn't work. Many of us know what doesn't work, but really don't know why, and have no avenue to actually find out - except, of course, by having a resident expert

Hi guys,
Do you have any idea if it would be feasible to enable gtkdialog to display an image from standard input (perhaps I'm not using this term correctly - see my explanation below)?

Here's a simple example of what I mean:
If a jpeg file has an exif thumbnail I can use the jhead command to extract this to a file. I can also extract it to standard output (-) like this `jhead -st - /24543.jpg`
So do you think it would be possible to enable the use of something like this?:

Code:

<pixmap>
<input command>jhead -st - /24543.jpg</input>
</pixmap>

Don't worry, I'm not thinking of writing a gtkdialog gui for all the command line image editors... although that would be interesting

disciple,

I think this could work. I don't have jhead, so can't check.

Code:

<pixmap>
<input file>$(jhead -st - /24543.jpg)</input>
</pixmap>

Cheers,
s

I'm creating some feature requests for a few things people have been asking about.

I'm wondering why you would want to pipe images into gtkdialog when you can load them as files. Is it just so that you can get gtkdialog to run a command to extract the thumbnail instead of writing it into the XML with shell script? When you refresh the pixmap widget you'll need to do it on a signal likely connected to a button, and you can have two actions, the first extracting the thumbnail and the second refreshing the pixmap widget.

There already exists a directive for inputting data from a shell command - <input></intput> - so that could be used, but I still don't see what benefit it would be to implement it. Maybe I'm missing something

If hex data could be accomodated in the source, there could be a self-contained app. For time-critical applications - e.g. games - the pix data would be in the script, obviating a need for multiple disk reads. Just an idea.

I'm wondering why you would want to pipe images into gtkdialog when you can load them as files.

I would rather not create the files, that's all.

Quote:

Is it just so that you can get gtkdialog to run a command to extract the thumbnail

Yes.

Quote:

instead of writing it into the XML with shell script?

I'm not certain what you mean here - how can I write the thumbnail into the XML?

Quote:

When you refresh the pixmap widget you'll need to do it on a signal likely connected to a button, and you can have two actions, the first extracting the thumbnail and the second refreshing the pixmap widget.

I'm not so much interested in refreshing the widget. An example of what I would like to do could be modifying pmetatagger so that when it reads the tag of a jpeg or an mp3 it displays the exif thumbnail or the embedded album art, without saving it as a temporary file. Similarly, Pmusic could display embedded album art.

But there would be some seriously cool uses for it in combination with refreshing a widget - e.g. a gtkdialog photo browser could be written, which would display the embedded thumbnails for all the images in a directory, in a scrollable hbox (or vbox), and clicking on a thumbnail would display the full size image above (or to the right of) the hbox (or vbox). This would not be the best way to implement a photo browser, but it would be cool

Quote:

There already exists a directive for inputting data from a shell command - <input></intput> - so that could be used, but I still don't see what benefit it would be to implement it. Maybe I'm missing something

_________________If you have or know of a good gtkdialog application, please post a link here

It took me a bit to figure out how to use gtkbuilder, but I was able to tweak one of the vala/gtkbuilder examples to behave similar to glade+gtkdialog (after compiling to c)

It would display the GUI fine but I couldn't get the actions to run scripts functions like gtkdialog ... what code does that part? ... maybe we could use it to remove the optional (and deprecated) glade dependencies._________________Check out my github repositories. I may eventually get around to updating my blogspot.

Now all buttons with images can use the "image-position" tag attribute Use values of "0/1/2/3". Note that this is an existing GTK property that already worked with stock buttons but I have extended it to work with Gtkdialog's image buttons. If you use it in the custom sense then you can also pass "left/right/top/bottom".

Example:

Code:

#!/bin/sh

# NOTE: This example requires at least gtkdialog-0.7.21 (please visit
# http://code.google.com/p/gtkdialog/). Additionally if you are using
# Puppy Linux then you may find that an historical version of gtkdialog
# already exists in /usr/sbin, and if that is the case then you should
# modify the shell variable below to point to the new gtkdialog binary.

disciple: Yeah, I see the point about creating many thumbnails without the many temporary files to go with them BTW the Gtkdialog Application Index is a really great resource but I'm linking to it from the Gtkdialog project page and I have to login to view it. Is that right?

technosaurus wrote:

It took me a bit to figure out how to use gtkbuilder, but I was able to tweak one of the vala/gtkbuilder examples to behave similar to glade+gtkdialog (after compiling to c)

It would display the GUI fine but I couldn't get the actions to run scripts functions like gtkdialog ... what code does that part? ... maybe we could use it to remove the optional (and deprecated) glade dependencies.

glade_support.c is the interface between Glade and Gtkdialog. I had to update it to support the new comboboxtext widget, so it's something that has to be maintained even if there're only one or two application developers using it. Maybe we should specifically state that Glade support is deprecated.Last edited by thunor on Tue 05 Jul 2011, 17:30; edited 2 times in total

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