Gtkdialog Development
Found a way to do it; a createchecklist function within a scrollable vbox.
http://murga-linux.com/puppy/viewtopic. ... 3&start=56
I would have liked to use an array with the variable, but couldn't find a way. A hack like STAT$i isn't as clean. To read it later, I needed something like
http://murga-linux.com/puppy/viewtopic. ... 3&start=56
I would have liked to use an array with the variable, but couldn't find a way. A hack like STAT$i isn't as clean. To read it later, I needed something like
Code: Select all
eval echo "\$STAT${i}"
Window Icons
Right now you can only set a gtkdialog's window dialog icon with a "gtk-stock-item" such as this-
It would be really great to provide a customized icon with any pixmap that would show as the window icon as well as minimized in a tray.
Having this feature would give gtkdialog programs a nice professional and polished look.
Cheers,
s
Code: Select all
<window title="Example Window" icon-name="gtk-dialog-warning">
Having this feature would give gtkdialog programs a nice professional and polished look.
Cheers,
s
Dear seaside,
I agree with you fully. I requested that from thunor a while back and he has kindly listed that feature for inclusion (http://code.google.com/p/gtkdialog/issues/detail?id=48). It's pretty easy to do.
With kind regards,
vovchik
I agree with you fully. I requested that from thunor a while back and he has kindly listed that feature for inclusion (http://code.google.com/p/gtkdialog/issues/detail?id=48). It's pretty easy to do.
With kind regards,
vovchik
Re: Window Icons
Hi seaside,seaside wrote:Right now you can only set a gtkdialog's window dialog icon with a "gtk-stock-item" such as this-
It would be really great to provide a customized icon with any pixmap that would show as the window icon as well as minimized in a tray.Code: Select all
<window title="Example Window" icon-name="gtk-dialog-warning">
Having this feature would give gtkdialog programs a nice professional and polished look.
Cheers,
s
You can add your own icon, vovchik and I discussed it a few post back, if you have the icon you wish to use, place it in any of the folders in /usr/share/icons/hicolor/.
System links also work, then run this command in the terminal to refresh the icon cache,
Code: Select all
gtk-update-icon-cache -f -i /usr/share/icons/hicolor
Example:
Code: Select all
<window title="A GTKDialog" icon-name="games48" resizable="false" decorated="true">
Geoffrey
- Attachments
-
- shot-1.jpg
- icon on the GUI
- (5.41 KiB) Downloaded 1368 times
-
- shot-2.jpg
- icon on taskbar
- (3.5 KiB) Downloaded 1215 times
Geoffrey,
Just a great find. Many, many thanks.
Yes, I see you had this discussion over the holidays and I must have just missed it,
Since installing pets updates the cache, it would seem that (for Puppy at least) including that gtkdialog feature implementation of
Vovchik would have to comment on the merits between the two ways of showing icons, as I have no clue.
Regards,
s
(This should definitely be in the gtkdialog tips and tricks section)
Just a great find. Many, many thanks.
Yes, I see you had this discussion over the holidays and I must have just missed it,
Since installing pets updates the cache, it would seem that (for Puppy at least) including that gtkdialog feature implementation of
isn't necessary.gtk_window_set_icon(GTK_WINDOW(window), create_pixbuf("pixname.ext"));
Vovchik would have to comment on the merits between the two ways of showing icons, as I have no clue.
Regards,
s
(This should definitely be in the gtkdialog tips and tricks section)
Dear seaside,
The advantage of:
is that you can use any old pixmap - a special one for instance - that isn't registered in the GTK icon system. But Geoffrey's workaround is also very useful. I think the user-selected window pixmap will be implemented in due course. I also like the idea of a tray item. Yad does that very nicely, and I have done that with an unreleased radio stream player in BaCon. It's also not hard to implement, and it's nice to be able to choose the pixmap.
With kind regards,
vovchik
The advantage of:
Code: Select all
gtk_window_set_icon(GTK_WINDOW(window), create_pixbuf("pixname.ext"));
With kind regards,
vovchik
GtkDialog-Feature? !
I would like to refer to the following.
http://murga-linux.com/puppy/viewtopic. ... 119#596119
My thought would be to create something in the style of <tree "selection_mode="3"> that gives back a tree like shown in the attached image.
Perhaps it could be tree also, but with selection_mode="5" (f.e.). I know, it seems to be easy to "hack" things like that (if you are familiar with bash), but it would be very useful for all non-bash-familiar-users/programmers, to handle this one just as easy as <tree selection_mode="3">
I am very familiar with pascal programming (older version, another OS) and I would surely be able to code stuff like that - if i could use "my" pascal system! Unfortunately, i can't.
As i see the code, you do have already everything to set this up.
Would you please "hack" this out to easy use for all non-bash-familiar-users/programmers?
Thank you!
RSH
I would like to refer to the following.
http://murga-linux.com/puppy/viewtopic. ... 119#596119
My thought would be to create something in the style of <tree "selection_mode="3"> that gives back a tree like shown in the attached image.
Perhaps it could be tree also, but with selection_mode="5" (f.e.). I know, it seems to be easy to "hack" things like that (if you are familiar with bash), but it would be very useful for all non-bash-familiar-users/programmers, to handle this one just as easy as <tree selection_mode="3">
I am very familiar with pascal programming (older version, another OS) and I would surely be able to code stuff like that - if i could use "my" pascal system! Unfortunately, i can't.
As i see the code, you do have already everything to set this up.
Would you please "hack" this out to easy use for all non-bash-familiar-users/programmers?
Thank you!
RSH
- Attachments
-
- checkbox-tree.jpg
- (66.63 KiB) Downloaded 1145 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
- Argolance
- Posts: 3767
- Joined: Sun 06 Jan 2008, 22:57
- Location: PORT-BRILLET (Mayenne - France)
- Contact:
Hello,
Am I silly?
These are the code lines:
Cordialement.
This is what I get!
Am I silly?
These are the code lines:
Code: Select all
#!/bin/sh
GTKDIALOG=gtkdialog
export MAIN_DIALOG='
<window title="Example Window" icon-name="gtk-dialog-warning">
<vbox>
<frame Question:>
<text>
<label>How could I get stock icons ("gtk-dialog-warning" for example) and... others working?</label>
</text>
</frame>
<hbox>
<button ok></button>
<button cancel></button>
</hbox>
</vbox>
</window>
'
case $1 in
-d | --dump) echo "$MAIN_DIALOG" ;;
*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac
This is what I get!
- Attachments
-
- gtk_window.png
- (9.19 KiB) Downloaded 1117 times
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
You'll find that and a lot more here:
http://www.murga-linux.com/puppy/viewtopic.php?t=38608
http://www.murga-linux.com/puppy/viewtopic.php?t=38608
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
- Argolance
- Posts: 3767
- Joined: Sun 06 Jan 2008, 22:57
- Location: PORT-BRILLET (Mayenne - France)
- Contact:
Hello,
Thank you for replying.
I already know this great topic, and learned a lot while looking at zigbert tips!!! But I didn't find the answer to my question. I know how to display my own icon in the window title bar but don't how to display some gtk stock icons like gtk-dialog-info or gtk-dialog-warning for example (which could be useful and used without having to add copies manually to /usr/share/icons/hicolor) though it curiously works quite well with gtk-preferences...
I was wondering if something like icon-stock-name=... would exist?
This was just a question...
Cordialement.
Thank you for replying.
I already know this great topic, and learned a lot while looking at zigbert tips!!! But I didn't find the answer to my question. I know how to display my own icon in the window title bar but don't how to display some gtk stock icons like gtk-dialog-info or gtk-dialog-warning for example (which could be useful and used without having to add copies manually to /usr/share/icons/hicolor) though it curiously works quite well with gtk-preferences...
I was wondering if something like icon-stock-name=... would exist?
This was just a question...
Cordialement.
- Attachments
-
- gtk_stock_icons_test.png
- (8.05 KiB) Downloaded 984 times
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
It's in zigbert's first post, just search for stock
http://www.murga-linux.com/puppy/viewto ... 035#274035
http://www.murga-linux.com/puppy/viewto ... 035#274035
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
- Argolance
- Posts: 3767
- Joined: Sun 06 Jan 2008, 22:57
- Location: PORT-BRILLET (Mayenne - France)
- Contact:
Hello,
Thank you for your patience.
I red the topic as seriously as I could: nada! For menuitem and buttons icons, no problem, solutions are there, and I know them...
But for window title bar icon, I tried to adapt several things... without success and din't see anything directly telling about!
No matter.
Have a good Sunday!
Regards.
Thank you for your patience.
I red the topic as seriously as I could: nada! For menuitem and buttons icons, no problem, solutions are there, and I know them...
But for window title bar icon, I tried to adapt several things... without success and din't see anything directly telling about!
No matter.
Have a good Sunday!
Regards.
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
yeah sorry, I was misreading your post, the way I have always hacked it was make a symlink of my program to the name of the icon with no extension
Code: Select all
ln -s gtkdialog gtk-dialog-warning
#need an icon in jwm's icon path named gtk-dialog-warning.png (or xpm)
gtk-dialog-warning -P ....
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
I switched out the find_pixmap code in my compile with this - speeds up not finding missing images with locate (especially if it is missing) and gives a convenient way to tell where the global gtkdialog images are (using an environment variable - GTKDIALOG_PIXMAP_DIR) - better suggestions welcome though
char *find_pixmap(char *filename)
{
char tmp[128];
static char *line = NULL;
static uint length = 0;
FILE *locate;
if (access(filename, R_OK) == 0)
return filename;
//snprintf(tmp, 127, "/usr/share/icons/Bluecurve/16x16/stock/%s",
snprintf(tmp, 127, "/usr/share/pixmaps/%s", filename);
tmp[127] = '\0';
if (access(tmp, R_OK) == 0)
return strdup(tmp);
snprintf(tmp, 127, "/usr/share/mini-icons/%s", filename);
tmp[127] = '\0';
if (access(tmp, R_OK) == 0)
return strdup(tmp);
snprintf(tmp, 127, "%s/%s",getenv("GTKDIALOG_PIXMAP_DIR"), filename);
tmp[127] = '\0';
if (access(tmp, R_OK) == 0)
return strdup(tmp);
return 0;
}
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
gtkdialog-C-example
The site http://code.google.com/p/gtkdialog/ wasn't updated for a long time.
Can be here will on a subject.
gtkdialog has many good examples bash-script.
The author Laszlo Pere has given possibility to do the program and in C-language, but an example of such program only one (and very small).
Program possibilities gtkdialog in this case are much poorer, than at bash-script.
Some users can write on bash-script worse, than on C-language (as I for example).
Considering it I has made an example in C-language.
Designs gtkdialog for C-language don't allow for example such things:
<window window_position = "1" title = "System Tools">
Or:
<action when = "file-activated"> echo File: $FILE </action>
It managed to be bypassed in such a way:
"<action> cat [echo $FILE] | zenity - text-info - width=720 - height=400 - title $FILE </action>"
But even with such restrictions it was interesting to me to make the program which doesn't demand heavy libraries (so I anyway think).
If will consider it possible add my example in/gtkdialog/examples/
Can be here will on a subject.
gtkdialog has many good examples bash-script.
The author Laszlo Pere has given possibility to do the program and in C-language, but an example of such program only one (and very small).
Program possibilities gtkdialog in this case are much poorer, than at bash-script.
Some users can write on bash-script worse, than on C-language (as I for example).
Considering it I has made an example in C-language.
Designs gtkdialog for C-language don't allow for example such things:
<window window_position = "1" title = "System Tools">
Or:
<action when = "file-activated"> echo File: $FILE </action>
It managed to be bypassed in such a way:
"<action> cat [echo $FILE] | zenity - text-info - width=720 - height=400 - title $FILE </action>"
But even with such restrictions it was interesting to me to make the program which doesn't demand heavy libraries (so I anyway think).
If will consider it possible add my example in/gtkdialog/examples/
- Attachments
-
- gtkdialog-c-lang.png
- (89.2 KiB) Downloaded 1217 times
-
- gtkdialog-C-example-32bit.tar.gz
- gtkdialog example code C-language
- (95.22 KiB) Downloaded 395 times
Hello Everyone,
I made me a notebook like menu for Manna OS, but iI have one problem that I need help with.
When I hit a button the menu stays open. How do I close it after hitting a button?
Code.
thanks
I made me a notebook like menu for Manna OS, but iI have one problem that I need help with.
When I hit a button the menu stays open. How do I close it after hitting a button?
Code.
Any ideas?#! /bin/bash
export MAIN_DIALOG='
<window title="Manna Menu" icon-name="Bible">
<vbox>
<notebook labels="Bible Software|Books|Dictionaries">
<frame>
<hbox>
<button>
<input file>/usr/share/icons/hicolor/48x48/apps/bibletime.png</input>
<label>bibletime</label>
<action type="exec">bibletime</action>
</button>
<vbox>
<text wrap="true" width-chars="50"><label>An excellent stand alone program. There are a lot of books one can get for this and maps as well.</label></text>
</vbox>
</hbox>
<hbox>
<button>
<input file>/usr/share/pixmaps/75DE_BibleAnalyzer4.0.png</input>
<label>BibleAnalyzer</label>
<action type="exec">bibleanalyzer4.sh</action>
</button>
<vbox>
<text wrap="true" width-chars="50"><label>An excellent program to disect the Word and get more out of it. It has many ways in which one can do this. This has others resources one can buy.</label></text>
</vbox>
</hbox>
<hbox>
<button>
<input file>/usr/share/pixmaps/esword.png</input>
<label>e-sword</label>
<action type="exec">/usr/bin/e-Sword.sh</action>
</button>
<vbox>
<text wrap="true" width-chars="50"><label>There is a lot of free Bibles and other resources plus you can get step books (examples) as well. There is also bibles and books you can buy too.</label></text>
</vbox>
</hbox>
<hbox>
<button>
<input file>/usr/share/pixmaps/CB2C_theword.0.png</input>
<label>theWord</label>
<action type="exec">theword.sh</action>
</button>
<vbox>
<text wrap="true" width-chars="50"><label>This program is one in which you can open up more than just one book, bible or any other window. There is a lot of resources for this program on line to get.</label></text>
</vbox>
</hbox>
</frame>
<frame>
<vbox>
<text wrap="true" width-chars="50"><label>Books will be coming soon.</label></text>
</vbox>
</frame>
<frame>
<vbox>
<text wrap="true" width-chars="50"><label>Dictionaries will be coming soon as well. There will be more stuff added as time goes by.</label></text>
</vbox>
</frame>
</notebook>
<hbox>
<button cancel></button>
<button ok></button>
</hbox>
</vbox>
</window>
'
gtkdialog --program=MAIN_DIALOG
thanks