| Author |
Message |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Thu 25 Oct 2012, 00:04 Post subject:
|
|
| Code: | <entry>
<variable>ENTRY</variable>
<visible>password</visible>
</entry> |
I will look at the possibilities to add tooltips - at least to buttons if possible.
Update: Tooltip is quite easy to implement on buttons, radiobuttons, checkbox and entry. Atm. set for a syntax like:
| Code: | <button>
<label>Button with tooltip</label>
<tooltip>gtkdialog1 rocks!</tooltip>
</button> |
which seems different from the younger gtkdialog way of doing it...
Present patches for GtkDialog1-1.1 attached: | Quote: | Added tooltips to entry, button, radiobutton, checkbox and menu.
automaton.c - fix of LABPIX button missing right paddding.
widget.c added default - setting it to be first item in list in
fill_list_by_items |
Add 20121027: Working "hard" on making GtkDialog1 more compatible with the other gtkdialog versions. As an example the below action syntax is now supported:
| Code: | <action>Enable:ENTRY</action>
<action enable>ENTRY</action>
<action type="enable">ENTRY</action> | which should make more of the script running by default...Attached the present state as static build gtk1.2 - rename to gtkdialog1
| Description |
static build 20121027 - test version gtk1.2
|

Download |
| Filename |
gtkdialog1.gz |
| Filesize |
493.48 KB |
| Downloaded |
168 Time(s) |
| Description |
|

Download |
| Filename |
october_2012_patches.tar.gz |
| Filesize |
2.6 KB |
| Downloaded |
179 Time(s) |
| Description |
|
| Filesize |
22.69 KB |
| Viewed |
461 Time(s) |

|
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Sun 28 Oct 2012, 16:45 Post subject:
|
|
While back in GtkDialog1 I found my notes on the swallow widget and decided to give it another try. So attached static gtk1 version accepts the following script:
| Code: | #!/bin/sh
#swallow demo for GtkDialog1 - experimental...!
#20121028goingnuts
#launch the app and establish the window ID
APP="${1}"
${1} &
while :; do
if [ "$(wmctrl -l | grep -i "${APP}" | cut -d " " -f1)" = "" ]; then
usleep 50
else
WINID=$(wmctrl -l | grep -i "${APP}" | cut -d " " -f1)
break
fi
done
export MAIN_DIALOG='
<vbox>
<swallow>
<label>'${WINID}'</label>
</swallow>
<button ok></button>
</vbox>
'
gtkdialog1 --program=MAIN_DIALOG |
You will need the wmctrl which is also attached as a static build. It is huge as it needs glib-2 - but we might be able to reduce size by backport to glib-1 or eliminate the need for glib. Note that wmctrl also can show the pid of the windows (wmctrl -l -p) which might be a more secure way of finding the windows ID than the name used in above script (${APP} &) - then get the pid of the process and find the window ID with wmctrl -l -p (+ some grep/cut stuff)...
The widget still need some error checking/fix for resize and might fail to launch some applications. Not sure if it add value to gtkdialog1..
| Description |
example of running "swallow Links" |
| Filesize |
63.32 KB |
| Viewed |
419 Time(s) |

|
| Description |
gtkdialog1 gtk1 static build with support for swallow - experimental
|

Download |
| Filename |
gtkdialog1.gz |
| Filesize |
493.84 KB |
| Downloaded |
160 Time(s) |
| Description |
wmctrl-1.07 static build - fake .gz-file
|

Download |
| Filename |
wmctrl.gz |
| Filesize |
535.08 KB |
| Downloaded |
167 Time(s) |
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 28 Oct 2012, 17:32 Post subject:
|
|
sounds great - what exactly is it that wmctrl does? if it is just getting the window id, xwinifo can do that (IIRC there is also an port to xcb that compiles pretty small statically) | Code: | | eval `xwininfo -root -all -int |awk '/'$APPNAME'/{print "WINID="$1 }'` | here is the result from mupdf (just grepping the xwininfo output for mupdf - no awk): | Code: | | 10485769 "txtbk.pdf - 201/816 (161 dpi)": ("mupdf" "MuPDF") 1274x747+3+22 +3+22 |
windowID "title bar info" (class? name?) widthxheight+?+? +xoffset+yoffset
(I think the +3+22 has to do with the window border left and top)
later versions of gtkdialog use <TAG tooltip-text="tooltip text here"> though I prefer the <tooltip>tooltip text</tooltip> (seriously why even have an xml format if you aren't going to use it)
your method is much more extensible and readable
<tooltip>
<tooltip-text>.....</tooltip-text>
<tooltip-markup>.....</tooltip-markup>
<tooltip-font>.....</tooltip-font>
... any tags that can affect tooltips
</tooltip>
than trying to fit it all in the same tag and simplifies the parsing
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Mon 29 Oct 2012, 02:49 Post subject:
|
|
I actually planed to do no more with the tooltip-tag...thought that the styling should be done via rcfile:
| Code: | style "tooltips"
{
bg[NORMAL] = "#ffd000"
fg[NORMAL] = "#000000"
font = "-adobe-helvetica-medium-r-normal--*-140-*-*-*-*-*-*"
}
widget "gtk-tooltip*" style "tooltips" | ...I think the rcfile is like a css-file for the html-files...
wmctrl is used to get the window ID and anything, you can control to give you that, can be used. The swallow widget "only" needs the window ID passed (for now as a label tag).
Add: And the patches leading up to this attached. Found this which might be a solid way to get the window ID.
One problem remains with the swallow widget: Seems that the socket window is always on top - even when the gtkdialog1 window is minimized the swallow-window remains on top. Any solutions to this is very welcome!
| Description |
further patches...
|

Download |
| Filename |
october_2012_2_patches.tar.gz |
| Filesize |
6.8 KB |
| Downloaded |
156 Time(s) |
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Fri 02 Nov 2012, 12:36 Post subject:
|
|
Guess the swallow widget need some rest - tried a lot without getting one step further...
So started to add "drag-and-drop" support for widget edit, table(=tree) and list (that is dnd TO the gtkdialog widget for a starter). Got the edit working nicely so far...
Target is to get dnd for the relevant widgets without having to add anything in the gtk-dialog-script...
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1759
|
Posted: Sat 03 Nov 2012, 04:29 Post subject:
|
|
GN, I've downloaded the patches from just above. Are there others which are not included there since last release. I've been following the thread. I just haven't had anything to add as Coding Season has not started here yet...
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Sat 03 Nov 2012, 08:26 Post subject:
|
|
@amigo: I have posted to sets of patch lately:
october_2012_patches
and
october_2012_2_patches (the one above). They should represent my changes since we released GtkDialog1-1.1.
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1759
|
Posted: Sat 03 Nov 2012, 11:25 Post subject:
|
|
Thanks GN. Let me know if you need/want anything vis-a-vis a new release.
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Sat 03 Nov 2012, 16:09 Post subject:
|
|
Thanks amigo - atm I am just following up upon some ideas. Attached the next patch which gives simple drag and drop to widget edit, table(tree) and list. Also gives APPEND-action to table(tree) and repair a bug in PIXMAP causing gtk2 build to segfault.
The dnd thing is quite handy - just throw a bunch of files to a list/tree-widget to get them all included - or drag a file over the edit widget to get it loaded/shown...
| Description |
|

Download |
| Filename |
030_simple_dnd_added.diff.gz |
| Filesize |
13.7 KB |
| Downloaded |
153 Time(s) |
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Mon 05 Nov 2012, 14:52 Post subject:
|
|
Another patch which:
* Added drag and drop for widget entry.
* Added scrollable to widget NOTEBOOK (use scroll="any value" in notebook header) - handy if you have lots of pages.
* Added tab position to widget NOTEBOOK (use tabpos="top/bottom/left/right)" in notebook header),
* Fixed pixmap "error" in parser.y
If the notebook additions should be named otherwise input are welcome!
| Description |
|

Download |
| Filename |
031_notebook_div_dnd_entry.diff.gz |
| Filesize |
4.2 KB |
| Downloaded |
141 Time(s) |
| Description |
notebook running with: <notebook labels="Checkbox|Radiobutton|Tree|No 1|No 2|No 3|No 4" tabpos="left" scroll="yes"> |
| Filesize |
9.04 KB |
| Viewed |
282 Time(s) |

|
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Mon 19 Nov 2012, 14:29 Post subject:
|
|
* Added "-" as part of string in attributes to lexer.l.
* Added support for show-tabs="yes/no" and show-border="yes/no" to widget NOTEBOOK. Small changes to tabpos code as well...
* Added attribute "margin=" to vbox and hbox.
Patch for this attached...
| Description |
|
| Filesize |
11.4 KB |
| Viewed |
232 Time(s) |

|
| Description |
|

Download |
| Filename |
032_more_notebooks_tags_margin2hbox_vbox.diff.gz |
| Filesize |
5.43 KB |
| Downloaded |
129 Time(s) |
|
|
Back to top
|
|
 |
|