| Author |
Message |
Argolance

Joined: 06 Jan 2008 Posts: 1381 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Sat 05 Nov 2011, 09:44 Post subject:
Problem converting gtkdialog3 script to gtkdialog4 (Solved) |
|
Hello,
I am trying to convert a gtkdialog3 script into gtkdialog4 (to take advantage of the great enhancements cooked by Thunor!) but something is going wrong and xerrs.log sends: | Quote: | (gtkdialog4:14229): GLib-GObject-WARNING **: gsignal.c:2267: signal `icon-press' is invalid for instance `0x8a25978'
(gtkdialog4:14229): GLib-GObject-WARNING **: gsignal.c:2267: signal `icon-release' is invalid for instance `0x8a25978' |
I think something is deprecated but don't see exactly what. I thought it was <visible>...</visible> tags I changed into <sensitive>...</sensitive>, but error message stays!
Thank you for your attention.
Cordialement.
_________________

Last edited by Argolance on Fri 11 Nov 2011, 12:20; edited 1 time in total
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1381 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Sun 06 Nov 2011, 08:35 Post subject:
|
|
Hello,
I found the same error message while testing this script inside the gtkdialog svn repository (gtkdialog-read-only/examples/progressbar/progressbar_test): | Quote: | #!/bin/sh
GTKDIALOG=gtkdialog #gtkdialog renamed as gtkdialog4 for testing => /usr/sbin/gtkdialog4
progress() {
for i in $(seq 0 10 100); do
echo $i
[ "$i" -le 30 ] && echo "Start..."
[ "$i" -le 60 -a "$i" -gt 30 ] && echo "Middle..."
[ "$i" -gt 60 ] && echo "End..."
sleep 0.3
done;
echo ready
}; export -f progress
progress_fast() {
for i in $(seq 0 1 10000); do
echo $((i/100))
[ "$i" -le 3000 ] && echo "Start..."
[ "$i" -le 6000 -a "$i" -gt 3000 ] && echo "Middle..."
[ "$i" -gt 6000 ] && echo "End..."
#sleep 0.1
done;
echo ready
}; export -f progress_fast
export BAR_DIALOG='
<variable>BAR_DIALOG</variable>
<vbox>
<frame Progress>
<text>
<label>Some text describing what is happening.</label>
</text>
<progressbar>
<variable>PROGRESS_BAR</variable>
<label>Some Text</label>
<input>progress_fast</input>
<action type="refresh">ENTRY</action>
<action type="closewindow">BAR_DIALOG</action>
<action>echo ready</action>
</progressbar>
</frame>
<hbox>
<button cancel>
<action type="closewindow">BAR_DIALOG</action>
</button>
</hbox>
</vbox>
'
export MAIN_DIALOG='
<vbox>
<entry>
<variable>ENTRY</variable>
<input>date</input>
</entry>
<hbox>
<button cancel></button>
<button>
<label>Launch</label>
<action type="launch">BAR_DIALOG</action>
</button>
<button>
<label>Close</label>
<action type="exit">CLOSE</action>
</button>
</hbox>
</vbox>
'
case $1 in
-d | --dump) echo "$MAIN_DIALOG" ;;
*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac |
Nobody interesting in this issue?
Cordialement.
_________________

|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3018 Location: Oregon
|
Posted: Sun 06 Nov 2011, 10:13 Post subject:
|
|
I just tried the script you posted as well as the one, "progressbar_test", in the examples for gtkdialog rev 8.
If I do not Close after the first time I click the Launch button, and instead click on the Launch button again, I get an error of:
** ERROR **: gtkdialog: Error in line 41, near token 'string': syntax error
So some setup is not being made for a repeat of Launching the child window.
I have not examined the code fully. But it looks like an error to me.
Also, just changing the script back to gktdialog3 gets it to run consistently with no errors.
So It looks like you have found a reportable bug.
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1381 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Sun 06 Nov 2011, 10:31 Post subject:
|
|
Hello 8-bit,
Thanks for replying!
| Quote: | | So It looks like you have found a reportable bug. |
Was not sure but it's what I thought...
Now, where should this expected 'bug' be reported?
| Quote: | Also, just changing the script back to gktdialog3 gets it to run consistently with no errors.
|
...In any case I give up for my own script!
Cordialement.
_________________

|
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 2422
|
Posted: Sun 06 Nov 2011, 12:04 Post subject:
|
|
Looks like something in the refresh command:
| Code: |
<actiontype="refresh">ENTRY</action>
|
edit: you can update the date from another button in MAIN:
| Code: |
<button>
<label>REFRESH</label>
<action>refresh:ENTRY</action>
</button>
|
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3018 Location: Oregon
|
Posted: Sun 06 Nov 2011, 16:10 Post subject:
|
|
The date/time is part of the script that would as placed show original time vs ending time for the progress bar to complete.
As to why gtkdialog3 handles it and gtkdialog doesn't when the Launch button is pressed twice evidently has something to do with the progressbar widget.
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6180 Location: Auckland, New Zealand
|
Posted: Sun 06 Nov 2011, 18:29 Post subject:
|
|
| Argolance wrote: | | Now, where should this expected 'bug' be reported. |
Gtkdialog has a bug tracker at http://code.google.com/p/gtkdialog/, or you could probably post in the "gtkdialog development" thread here.
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 342 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sun 06 Nov 2011, 19:29 Post subject:
Re: gtkdialog3 script into gtkdialog4 problem... |
|
| Argolance wrote: | ...
| Quote: | (gtkdialog4:14229): GLib-GObject-WARNING **: gsignal.c:2267: signal `icon-press' is invalid for instance `0x8a25978'
(gtkdialog4:14229): GLib-GObject-WARNING **: gsignal.c:2267: signal `icon-release' is invalid for instance `0x8a25978' |
... |
Hi Argolance
So the only problem is that you are seeing these messages?
The "icon-press" and "icon-release" signals require GTK+ >= 2.16.0, therefore support for these signals will be compiled-in to the gtkdialog binary if the person who compiled it had GTK+ >= 2.16.0.
I've tried your script on lupu-520 with GTK+ 2.20.0 and a self compiled gtkdialog 0.8.1 and I don't see these messages. Is anyone else seeing these messages?
Since these signals are only connected-up for the entry widget, you should be able to reproduce these messages by simply creating an app with just one entry widget.
You need to tell us which version of GTK+ you are using etc.. You can get your GTK+ version number from /usr/include/gtk-2.0/gtk/gtkversion.h.
Regards,
Thunor
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1381 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Mon 07 Nov 2011, 07:56 Post subject:
|
|
Hello,
Thanks for replying.
| Quote: | | So the only problem is that you are seeing these messages? | This seems to be...
| Quote: | | You need to tell us which version of GTK+ you are using etc.. You can get your GTK+ version number from /usr/include/gtk-2.0/gtk/gtkversion.h. |
Sorry! I am running Toutou/Puppy 4.31, GTK+ version 2 and a self compiled gtkdialog 0.8.1 from svn repository.
Scripts I converted that have no 'entries' don't send any errors messages.
So, the problem appears to be 'virtually' solved...
Thanks thunor for your great work that is surely contributing to make Puppy much better and... attractive!
Regards.
_________________

|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 342 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Mon 07 Nov 2011, 09:13 Post subject:
|
|
| Argolance wrote: | ...I am running Toutou/Puppy 4.31, GTK+ version 2 and a self compiled gtkdialog 0.8.1 from svn repository.
Scripts I converted that have no 'entries' don't send any errors messages.
So, the problem appears to be 'virtually' solved...
... |
Toutou/Puppy 4.31 = GTK+ 2.14.7
Therefore if you compiled gtkdialog on your computer then GObject shouldn't be complaining about "icon-press" and "icon-release" because the code for these signals wouldn't have been compiled-in.
http://code.google.com/p/gtkdialog/source/browse/trunk/src/widgets.c#797
http://code.google.com/p/gtkdialog/source/browse/trunk/src/widget_spinbutton.c#289
I'm guessing that those messages came from a prebuilt gtkdialog binary package that was compiled on a machine with a version of GTK+ >= 2.16.0 i.e. gtkdialog4 and you are running it with a 2.14.7 GLib-GObject (is that possible? I don't know) and when gtkdialog connects the "icon-press" and "icon-release" signals to entry widgets your GObject doesn't know what these signals are so it displays error messages.
You can run this and post the output if you'd like to investigate this further:
| Code: | #!/bin/sh
GTKDIALOG=gtkdialog
GTKVERSION="find /usr/include -name gtkversion.h"
$GTKDIALOG -v
$GTKVERSION
cat `$GTKVERSION` | grep "define GTK_M"
export MAIN_DIALOG='
<window title="Argolance - Signal Issue" resizable="false">
<vbox border-width="50">
<entry></entry>
<spinbutton></spinbutton>
<hseparator></hseparator>
<button ok></button>
</vbox>
<action signal="hide">exit:Exit</action>
</window>
'
$GTKDIALOG --program=MAIN_DIALOG
|
Regards,
Thunor
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1381 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Tue 08 Nov 2011, 06:58 Post subject:
|
|
Hello Thunor! | Quote: | | You can run this and post the output if you'd like to investigate this further: |
Yes, I would like!
| Quote: | gtkdialog version 0.8.1 (C) 2003-2007 Laszlo Pere, 2011 Thunor
/usr/include/gtk-2.0/gtk/gtkversion.h
#define GTK_MAJOR_VERSION (2)
#define GTK_MINOR_VERSION (14)
#define GTK_MICRO_VERSION (7)
(gtkdialog4:1444): GLib-GObject-WARNING **: gsignal.c:2267: signal `icon-press' is invalid for instance `0x891d028'
(gtkdialog4:1444): GLib-GObject-WARNING **: gsignal.c:2267: signal `icon-release' is invalid for instance `0x891d028'
(gtkdialog4:1444): GLib-GObject-WARNING **: gsignal.c:2267: signal `icon-press' is invalid for instance `0x892d010'
(gtkdialog4:1444): GLib-GObject-WARNING **: gsignal.c:2267: signal `icon-release' is invalid for instance `0x892d010'
EXIT="OK"
Script completed hit RETURN to close window.
|
Sorry, I understand now that I had to give you the 3 MAJOR MINOR MICRO numbers as shown above...
Regards.
_________________

|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 342 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Thu 10 Nov 2011, 07:09 Post subject:
|
|
As I've shown above, the code for these signals isn't compiled-in unless you have GTK+ >= 2.16.0 so at the moment this makes no sense
I can't trace this myself so this is what you could do next:
* Change into your /tmp directory and check-out gtkdialog from SVN.
* Edit widget_spinbutton.c and uncomment "//#define DEBUG_TRANSITS" at the top.
* ./autogen.sh && make but don't install it.
* Copy the following script into the src folder and run it.
* Post the output.
| Code: | #!/bin/sh
GTKDIALOG=./gtkdialog
export MAIN_DIALOG='
<window title="Argolance - Signal Issue2" resizable="false">
<vbox border-width="50">
<spinbutton></spinbutton>
<hseparator></hseparator>
<button ok></button>
</vbox>
<action signal="hide">exit:Exit</action>
</window>
'
$GTKDIALOG --program=MAIN_DIALOG
|
Regards,
Thunor
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1381 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Fri 11 Nov 2011, 07:04 Post subject:
|
|
Hello Thunor,
Don't know exactly what's' happening under-the-hood but I strictly and stupidly did what you say.
Note: my svn gtkdialog was not downloaded in the /tmp folder but in the /root folder. Don't know if it is important?
Then, while running the command './autogen.sh && make' in console after modifying widget_spinbutton.c, I got 2 errors. Please see the attached text file.
Question:
Is it right uncommented?
| Quote: | [...]
/* Defines */
//#define DEBUG_CONTENT
define DEBUG_TRANSITS
[...] |
At last when I ran the script in console, I got: | Quote: | /root/gtkdialog/src/sans titre: line 16: ./gtkdialog: Aucun fichier ou répertoire de ce type
Script completed hit RETURN to close window. |
Did I forget something?
Regards.
| Description |
|

Download |
| Filename |
terminal.tar |
| Filesize |
23.5 KB |
| Downloaded |
77 Time(s) |
_________________

|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 342 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Fri 11 Nov 2011, 08:53 Post subject:
|
|
| Argolance wrote: | ...
| Quote: | [...]
/* Defines */
//#define DEBUG_CONTENT
define DEBUG_TRANSITS
[...] |
... |
It should be
| Code: | /* Defines */
//#define DEBUG_CONTENT
#define DEBUG_TRANSITS
|
Type make again and then run the script I gave you and show me the output
Thanks,
Thunor
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1381 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Fri 11 Nov 2011, 10:22 Post subject:
|
|
Hello Thunor,I said 'stupidly'...
So, this time all ran as well as possible! . No error.
Output is :
| Code: | widget_spinbutton_create(): Entering.
widget_spinbutton_create(): Exiting.
widget_spinbutton_refresh(): Entering.
widget_spinbutton_refresh(): Exiting.
EXIT="OK"
Script completed hit RETURN to close window.
|
Regards.
_________________

|
|
Back to top
|
|
 |
|