[EDIT] Updated 20110621-18:38seaside wrote:There is one item missing from Gtkdialog - the ability to do multiple selection of items.
Hi seaside
Implemented in SVN r12
See this post for syntax and example code.
Regards,
Thunor
Code: Select all
#! /bin/bash
# -----------------
# Functions
# -----------------
# --------------
# get pic info
# --------------
init_vars()
{
mypicsize=`stat --format=%s "$mypic"`
mypicinfo=`nconvert -info -quiet "$mypic"`
mypicinfo=`echo "$mypicinfo" | grep -v Success`
mypicbase=`basename $mypic`
mypicinfo=" Image : ""$mypicbase""$mypicinfo""
Size : $mypicsize"" bytes"
}
# --------------
# make pic gui
# --------------
make_pic_gui()
{
export show_pic='
<window title="PShowPic: '$mypicbase'" icon-name="gtk-refresh">
<vbox>
<frame>
<pixmap>
<input file>'$mypic'</input>
</pixmap>
</frame>
<hbox>
<button help>
<action>launch:show_pic_help</action>
</button>
</hbox>
</vbox>
</window>
'
}
# --------------
# make help gui
# --------------
make_help_gui()
{
export show_pic_help='
<window title="PShowPic Info" icon-name="gtk-about">
<vbox>
<frame>
<text use-markup="true">
<label>"<tt><b>'$mypicinfo'</b></tt>"</label>
</text>
</frame>
<hbox>
<button cancel>
<action>closewindow:show_pic_help</action>
</button>
</hbox>
</vbox>
</window>
'
}
# --------------
# display gui
# --------------
display_gui()
{
gtkdialog3 --program=show_pic --center
}
# -----------------
# End Functions
# -----------------
# -----------------
# Main
# -----------------
mypic="$1"
init_vars
make_pic_gui
make_help_gui
display_gui
# -----------------
# End Main
# -----------------
[EDIT] I have modified the code. Therefore [currently] animated gifs will scale but they'll stop animating. Viewnior manages to scale them so I just need to look into it.vovchik wrote:I just noticed that the latest patches prevent gtkdialog from showing animated gifs...
[EDIT] I have created a project page for gtkdialog and am in the process of setting it up.01micko wrote:How do we set up a sourceforge or google account for this? It's getting a bit hard to keep up! I compiled thunor's patches in and thought everything was rosy until I realised I forgot the Moose patch!
This makes me emotional.thunor wrote:I have created a project page for gtkdialog and am in the process of setting it up.
I love gtkdialog, if it can be extended, I'd love to help (if I can) and would LOVE to see the resultszigbert wrote:This makes me emotional.thunor wrote:I have created a project page for gtkdialog and am in the process of setting it up.
You're welcome. Scaling animated gifs and enabling different selection modes in the tree widget I am already tackling.01micko wrote:Thanks for setting up the project page thunor!
IMHO it assures the continuation of development for gtkdialog. I did a checkout and the animated gifs work fine for me if left unscaled. I'm sure that will please vovchik as well.
It makes updating and extending it so much more productive. I guess folk [from any distro] didn't have time to set it up before.zigbert wrote:This makes me emotional.
Hi sc0ttmansc0ttman wrote:I love gtkdialog, if it can be extended, I'd love to help (if I can) and would LOVE to see the results
Forgive me if this is already a working feature, but I dont know about it:
I'd like to ability to make non-editable comboboxes
<combobox editable="false">
or whatever
Code: Select all
<tree selection_mode="none"> or <tree selection-mode="0">
<tree selection_mode="single"> or <tree selection-mode="1">
<tree selection_mode="browse"> or <tree selection-mode="2">
<tree selection_mode="multiple"> or <tree selection-mode="3">
Code: Select all
#!/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.
GTKDIALOG=gtkdialog
function funcfiletreCreate() {
if [ -f $1 ]; then rm $1; fi
for ((f = 0; f < $2; f++)); do
echo "#$f This is selection_mode=\"$3\"" >> $1
done
}
function functreCreate() {
echo '<tree selection_mode="'$2'">
<variable>'$1'</variable>
<label>Items</label>
<width>300</width><height>200</height>
<input>cat file'$1'</input>
</tree>
<hbox homogeneous="true">
<button>
<label>" Delete "</label>
<action>echo "Deleting $'$1'"</action>
<action type="removeselected">'$1'</action>
</button>
<button>
<label>" Reload "</label>
<action>echo Reloading file'$1'</action>
<action type="refresh">'$1'</action>
</button>
</hbox>'
}
funcfiletreCreate filetreNone 3 none
funcfiletreCreate filetreSingle 3 single
funcfiletreCreate filetreBrowse 3 browse
funcfiletreCreate filetreMultiple 16 multiple
export MAIN_DIALOG='
<window title="treSelectionModes" resizable="false">
<vbox>
<frame tree widget selection modes>
<hbox>
<vbox>
'"$(functreCreate treNone none)"'
'"$(functreCreate treSingle single)"'
</vbox>
<vbox>
'"$(functreCreate treBrowse browse)"'
'"$(functreCreate treMultiple multiple)"'
</vbox>
</hbox>
</frame>
<hbox homogeneous="true">
<button ok></button>
</hbox>
</vbox>
<action signal="hide">exit:Exit</action>
</window>
'
$GTKDIALOG --center --program=MAIN_DIALOG
I would like to see a very high priority put into making backwards compatibility 100% stable..zigbert wrote:Hello thunor
It is amazing to see that you are improving the gtkdialog source.
...
I don't want to nag about new widgets or heavy new features.
Code: Select all
#!/bin/sh
export ok_box='
<window>
<vbox>
<text><label>press _enter_ to activate OK-button</label></text>
<hbox>
<button can-default="true" has-default="true" use-stock="true">
<input file icon="gtk-ok"></input>
<label>Ok</label>
</button>
</hbox>
</vbox>
</window>'
gtkdialog3 -p ok_box
Nothing, I wasn't saying people should avoid them - I love Xdialog.. Yad is nice too.. Haven't tried bacon, but I bet it's also nice.. But, for example, Yad requires a fairly new GTK, so GTK Dialog will work on systems where Yad does not..zigbert wrote:sc0ttman
What is wrong with using yad, bacon or xdialog?
Would just be nice if all the existing scripts we have in Puppy (many of which are no longer maintained by anyone in particular) still work as they are, that's all.zigbert wrote:regarding backwards compatibility, what is the problem with fixing the xml code in IPConfig or other. The big deal about gtkdialog (as I see it) is that