Closed GoogleCodeExporter closed 8 years ago
Hi
perhaps add decorated="false|true"
<input>640x480:false|true</input>
http://developer.gnome.org/gtk/2.24/GtkWindow.html#gtk-window-set-decorated
in order to make full screen ...
Original comment by frafas...@gmail.com
on 25 Aug 2011 at 10:22
just an idea ...
perhaps add some widget can change their size with action
<input size>64x64</input>
Original comment by frafas...@gmail.com
on 27 Aug 2011 at 2:09
Hi,
in fact it may well do that with xdotool
example:
#!/bin/bash
GTKDIALOG=gtkdialog3
#http://www.semicomplete.com/projects/xdotool/
echo 0 >/tmp/windowsize-inputfile
function FCT_windowsize()
{
WID="$(xdotool search "^Test_windowsize$" | head -1)"
xdotool windowactivate --sync $WID
xdotool windowsize $WID $1 $2
}
export -f FCT_windowsize
export MAIN_DIALOG='<window height_request="1" width_request="1"
border-width="0" spacing="0" window_position="0" title="Test_windowsize">
<vbox>
<notebook show_tabs="false" show-border="false" page="0" labels="0|1">
<vbox>
<text use-markup="true" selectable="true">
<label>"Gtkdialog (or gtkdialog) is a small utility for fast and easy GUI
building. It can be used to create dialog boxes for almost any interpreted and
compiled programs which is a very attractive feature since the developer does
not have to learn various GUI languages for the miscellaneous programming
languages., which is cool."</label>
</text>
<hbox>
<button>
<variable>activ_tab_1</variable>
<label>tab1</label>
<input file stock="gtk-jump-to"></input>
<action>echo 1 >/tmp/windowsize-inputfile</action>
<action>bash -c "FCT_windowsize 130 130"</action>
<action>refresh:tab</action>
</button>
</hbox>
</vbox>
<vbox>
<checkbox>
<label>checkbox 1</label>
</checkbox>
<checkbox>
<label>checkbox 2</label>
</checkbox>
<checkbox>
<label>checkbox 3</label>
</checkbox>
<hbox>
<button>
<variable>activ_tab_0</variable>
<label>tab0</label>
<input file stock="gtk-jump-to"></input>
<action>echo 0 >/tmp/windowsize-inputfile</action>
<action>bash -c "FCT_windowsize 600 400"</action>
<action>refresh:tab</action>
</button>
</hbox>
</vbox>
<variable>tab</variable>
<input file>/tmp/windowsize-inputfile</input>
</notebook>
<hbox>
<button>
<variable>quit</variable>
<label>Quit</label>
<input file stock="gtk-quit"></input>
<action>exit:tab</action>
</button>
</hbox>
</vbox>
<action signal="show">bash -c "FCT_windowsize 600 400"</action>
</window>'
$GTKDIALOG --program=MAIN_DIALOG
exit 0
Original comment by frafas...@gmail.com
on 15 Sep 2011 at 12:36
Hummm
I just try again with wmctrl
it is much faster than xdotool
Replace:
WID="$(xdotool search "^Test_windowsize$" | head -1)"
by:
WID="$(wmctrl -l | grep " Test_windowsize$" | awk '{print $1}')"
Original comment by frafas...@gmail.com
on 16 Sep 2011 at 8:58
I enjoy all thanks to your new job:)
Another example to resize a window ...
it is installed and wmctrl xdotool
#! /bin/bash
chemin="$(cd "$(dirname "$0")";pwd)/$(basename "$0")";
dossier="$(dirname "$chemin")"
export chemin dossier
cd "${dossier}"
GTKDIALOG=gtkdialog3
#Default tree
echo "gtk-go-forward|Unfold the window" >/tmp/inputfile-tree
#Default tab
echo "0" >/tmp/windowsize-inputfile
function FCT_windowsize()
{
WID="$(wmctrl -l | grep " Test_windowsize$" | awk '{print $1}')"
xdotool windowactivate --sync $WID
xdotool windowsize $WID $1 $2
echo "$3" >/tmp/windowsize-inputfile
if [ "$4" = "1" ]; then
echo "gtk-go-down|back window" >/tmp/inputfile-tree
echo "Debug: $1 $2 $3 $4 $(cat /tmp/inputfile-tree)"
elif [ "$4" = "2" ]; then
echo "gtk-go-forward|Unfold the window" >/tmp/inputfile-tree
echo "Debug: $1 $2 $3 $4 $(cat /tmp/inputfile-tree)"
fi
}
export -f FCT_windowsize
function FCT_create_tree()
{
echo -e '<hbox>
<text width_request="420" use-underline="true">
<label>_</label>
</text>
<tree exported-column="0" headers_visible="false" space-expand="false">
<variable>tree</variable>
<height>24</height>
<input file stock-column="0">/tmp/inputfile-tree</input>
<action signal="button-press-event">bash -c "FCT_windowsize '$1' '$2' '$3'
'$4'"</action>
<action signal="button-press-event">refresh:tab</action>
<action signal="button-press-event">refresh:tree</action>
</tree>
</hbox>'
}
export MAIN_DIALOG='<window width_request="600" height_request="90"
window_position="0" title="Test_windowsize">
<vbox>
<notebook show_tabs="false" show-border="false" page="0" labels="0|1">
<vbox>
<text use-markup="true" selectable="true">
<label>"Gtkdialog, which is cool."</label>
</text>
'"$(FCT_create_tree 600 220 1 1)"'
<hbox>
<button>
<variable>quit</variable>
<label>Quit</label>
<input file stock="gtk-quit"></input>
<action>exit:tab</action>
</button>
</hbox>
</vbox>
<vbox>
<text use-markup="true" selectable="true">
<label>"Gtkdialog, which is cool."</label>
</text>
'"$(FCT_create_tree 600 90 0 2)"'
<text use-markup="true" selectable="true">
<label>"Gtkdialog (or gtkdialog) is a small utility for fast and easy GUI
building. It can be used to create dialog boxes for almost any interpreted and
compiled programs which is a very attractive feature since the developer does
not have to learn various GUI languages for the miscellaneous programming
languages., which is cool."</label>
</text>
<hbox>
<button>
<variable>quit</variable>
<label>Quit</label>
<input file stock="gtk-quit"></input>
<action>exit:tab</action>
</button>
</hbox>
</vbox>
<variable>tab</variable>
<input file>/tmp/windowsize-inputfile</input>
</notebook>
</vbox>
</window>'
$GTKDIALOG --program=MAIN_DIALOG
exit 0
Original comment by frafas...@gmail.com
on 25 Sep 2011 at 11:02
I'm currently working on the window widget now.
There is one piece of data that the window deals with and that is the "title",
therefore I am going to support <input>, <input file>, clear, refresh and save
for the title.
Original comment by thunor...@hotmail.com
on 3 Aug 2012 at 2:04
<input>, <input file>, refresh, save and clear for "title" are done in r330
It would be possible to create a "resize" action function in the future so I'll
add that to issue 44
Original comment by thunor...@hotmail.com
on 4 Aug 2012 at 5:10
Original issue reported on code.google.com by
frafas...@gmail.com
on 25 Aug 2011 at 10:09