Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 17 Apr 2014, 11:25
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
[SOLVED] Snap2 under different versions of gtkdialog
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [23 Posts]   Goto page: 1, 2 Next
Author Message
peebee


Joined: 21 Sep 2008
Posts: 1272
Location: Malvern, Worcs, UK

PostPosted: Sat 01 Dec 2012, 12:57    Post subject:  [SOLVED] Snap2 under different versions of gtkdialog  

The assistance of gtkdialog experts would be appreciated....

Trying to get the very useful Snap2 backup utility working on upcoming Puppies but I get 3 different outcomes with the same source depending on which version of gtkdialog is implemented.

Snap2 Version 4.25 is being tested. http://murga-linux.com/puppy/viewtopic.php?t=50402

The main dialogue code is attached - the gtkdialog call is on line 659 and the initial startup window is defined on line 515

If I run snap2 in a terminal in Upup Precise 54x4 with gtkdialog version 0.8.3 r473M (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor Built with additional support for: Glade.....
I get the following errors and the main dialogue window does not open
Code:
widget_entry_refresh(): <label> not implemented for this widget.
widget_entry_refresh(): <label> not implemented for this widget.
widget_entry_refresh(): <label> not implemented for this widget.
widget_combobox_input_by_command(): <input> not implemented for this widget.


If I run it in a terminal in Slacko 5.3.9.5 with gtkdialog version 0.8.2 r455M (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor Built with additional support for: Glade, VTE.....
I get the same errors but the main dialogue window does appear and seems to work.

If I run it in a terminal in Puppy Precise 5.4.2 or Slacko 5.3.3 with gtkdialog version 0.8.0 (C) 2003-2007 Laszlo Pere, 2011 Thunor...........
then the errors do not appear.

Can anybody suggest what gtkdialog constructs might have changed between the different versions that I might need to look at to track down this problem - many thanks.

Cheers
peebee
snap2.gz
Description  open as text
gz

 Download 
Filename  snap2.gz 
Filesize  62.45 KB 
Downloaded  255 Time(s) 

_________________
LxPup-14.03 = Puppy + LXDE

Last edited by peebee on Sun 16 Dec 2012, 03:45; edited 1 time in total
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Sat 01 Dec 2012, 13:37    Post subject:  

Dear peebee,

Why not checkout gtkdialog from google code and compile it? Great way to find out what might be missing.....

With kind regards,
vovchik
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 10 Dec 2012, 18:45    Post subject: Re: Snap2 different under different versions of gtkdialog  

peebee wrote:
...
If I run snap2 in a terminal in Upup Precise 54x4 with gtkdialog version 0.8.3 r473M (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor Built with additional support for: Glade.....
I get the following errors and the main dialogue window does not open
Code:
widget_entry_refresh(): <label> not implemented for this widget.
widget_entry_refresh(): <label> not implemented for this widget.
widget_entry_refresh(): <label> not implemented for this widget.
widget_combobox_input_by_command(): <input> not implemented for this widget.


If I run it in a terminal in Slacko 5.3.9.5 with gtkdialog version 0.8.2 r455M (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor Built with additional support for: Glade, VTE.....
I get the same errors but the main dialogue window does appear and seems to work.

If I run it in a terminal in Puppy Precise 5.4.2 or Slacko 5.3.3 with gtkdialog version 0.8.0 (C) 2003-2007 Laszlo Pere, 2011 Thunor...........
then the errors do not appear.

Can anybody suggest what gtkdialog constructs might have changed between the different versions that I might need to look at to track down this problem - many thanks.
...

Hi peebee

I saw this "widget_entry_refresh(): <label> not implemented for this widget." message recently with examples/miscellaneous/fileselect_deprecated.

I've been refactoring the code and moving stuff that was everywhere into its own file based on a template. If a widget doesn't support a directive then you'll get a warning message but it's just a warning. In this case the fileselect function is using the entry widget's label directive to store the text that's displayed in the title of the fileselect dialog, but that was the old way to do it and it's still supported although the template isn't compensating for that which I only recently noticed. Technically the entry widget does not support the label directive so I'd rather leave it as is because there is a better and more consistent way to store the text which is with the fs-title custom tag attribute.

If you want to remove these warnings then:
Move the "Select a Directory" text at line 478 into the entry tag using fs-title=\"Select a Directory\" and delete the <label></label>.
Do the same at lines 500 and 517.

The combobox warning message is interesting. The combobox widget does not support the input directive and in fact there is an example in examples/combobox/combobox_input which states this -- maybe it was going to be implemented and an example was created for it but it wasn't -- and within the snap2 code at line 631 is "<input>ls</input>" which I'm guessing was copied and pasted from the broken example so just remove it. It was never implemented but warning messages are a new feature therefore the original developer simply left it in because I guess he forgot it was there.

I don't like the fact that the window doesn't show on Upup Precise 54x4 with gtkdialog version 0.8.3 r473. I suggest checking out the latest gtkdialog version from SVN which is now at r493. I'm going to try it myself.
Code:
svn checkout http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog
cd gtkdialog
./autogen.sh
make

Edit snap2 and point to the gtkdialog binary that will be in the src subdirectory or move the binary somewhere else.

Regards,
Thunor

P.S. The snap2.gz download above is actually the source with a gz extension, it's not gzipped.
Back to top
View user's profile Send private message Visit poster's website 
pemasu


Joined: 08 Jul 2009
Posts: 5458
Location: Finland

PostPosted: Mon 10 Dec 2012, 19:52    Post subject:  

Upup Precise will have this gtkdialog version in next build:
# gtkdialog --version
gtkdialog version 0.8.3 r491M (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with additional support for: Glade.

I noticed that pdvdrsab didnt work with previous gtkdialog version either. I hope this version is more compliant.

The development is so fast that keeping up with new revisons is real race....lol....nice race though.
Thanks Thunor.
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 10 Dec 2012, 23:05    Post subject:  

pemasu wrote:
...
I noticed that pdvdrsab didnt work with previous gtkdialog version either. I hope this version is more compliant.
...

Hi pemasu

I'm currently playing with Upup Precise 54X4 (which is very nice so thank you) and pdvdrsab shows but there's no DVD drive listed although I do have one at /dev/sr0 (CD/DVD Drive Wizard also agrees). The code that is responsible for this is at line 103 and it won't result in anything because it's grepping for "cd-*rom" when probedisk isn't outputting text like that. There are also four dialogs in there which are launched with missing variable directives and the closewindow code is invalid so the quit buttons don't work. I haven't tried ripping anything. I think that the application requires some maintenance. Is anyone maintaining it? These issues are application issues, they are not gtkdialog issues.

snap2 shows for me. I get an initial small dialog saying "Warning: there are missing programs..." and then I get the main dialog so I've tested it to show which is what I wanted.

Regards,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
pemasu


Joined: 08 Jul 2009
Posts: 5458
Location: Finland

PostPosted: Tue 11 Dec 2012, 01:55    Post subject:  

Quote:
Until now that is. The next Puppy4 release will have Pdvdrsab, which is jason's next-generation DVD "rip, shrink, author, burn" (rsab) GUI application.

Quote:
Jason (plinej in the forum)

Quote from Barry`s blog. Plinej is still around. I could pm him about your findings.
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Tue 11 Dec 2012, 10:02    Post subject:  

pemasu wrote:
Quote:
Until now that is. The next Puppy4 release will have Pdvdrsab, which is jason's next-generation DVD "rip, shrink, author, burn" (rsab) GUI application.

Quote:
Jason (plinej in the forum)

Quote from Barry`s blog. Plinej is still around. I could pm him about your findings.

I've found Pdvdrsab-0.1 - a gtkdialog dvd rip/shrink/author/burn gui so I'll explain it in there.

[EDIT] plinej posted on Sun 28 Jun 2009 "I'm pretty much done with this code and anyone is free to expand on it to fix bugs and add features. I just don't have the time anymore."

Also it seems as though a chap called Rocket has already found these issues and fixed them, so we're obviously not using Rocket's fixed version.

It sure would make life a lot easier if somebody would create a repository for Puppy apps so that folk can fix these things at source. Then Puppy releases would simply take the source from the repository rather than having modified gzipped apps, patch files and code posted in threads that may or may not get somebody's attention. It could be a great deal easier to maintain this stuff -- just a suggestion, I'm not being critical.

Anway, Rocket's version of pdvdrsab works fine, I've just ripped 100MB of a DVD to test and there are no compliancy issues so I'm going away now Smile

Cheers,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 1272
Location: Malvern, Worcs, UK

PostPosted: Tue 11 Dec 2012, 12:18    Post subject: Re: Snap2 different under different versions of gtkdialog  

thunor wrote:
If you want to remove these warnings then:
Move the "Select a Directory" text at line 478 into the entry tag using fs-title=\"Select a Directory\" and delete the <label></label>.
Do the same at lines 500 and 517.

The combobox warning message is interesting. The combobox widget does not support the input directive and in fact there is an example in examples/combobox/combobox_input which states this -- maybe it was going to be implemented and an example was created for it but it wasn't -- and within the snap2 code at line 631 is "<input>ls</input>" which I'm guessing was copied and pasted from the broken example so just remove it.


Hi Thunor

Many thanks for the patches which I can confirm get rid of the warning messages.

However they unfortunately don't make snap2 work on Upup Precise 5.4.X.4

The difference with Slacko 5.4 where Snap2 4.25 does work correctly is that a warning box appears instead of the main window when Snap2 is started and when the warning box is closed the main window opens but on tab #2 and if tab #1 is clicked the warning box reappears.

So Snap2 4.25 is still behaving inconsistently on 2 modern Puppies both with modern but different versions of gtkdialog....

I haven't tried your even newer version of gtkdialog yet....maybe pemasu can see how Snap2 works on his new Upup Precise 5.4.X.n - or I can test when he uploads it.

Thanks for your interest and suggestions
Cheers
PeeBee

_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Tue 11 Dec 2012, 14:52    Post subject: Re: Snap2 different under different versions of gtkdialog  

peebee wrote:
...
However they unfortunately don't make snap2 work on Upup Precise 5.4.X.4

The difference with Slacko 5.4 where Snap2 4.25 does work correctly is that a warning box appears instead of the main window when Snap2 is started and when the warning box is closed the main window opens but on tab #2 and if tab #1 is clicked the warning box reappears.

So Snap2 4.25 is still behaving inconsistently on 2 modern Puppies both with modern but different versions of gtkdialog....

I haven't tried your even newer version of gtkdialog yet...

What is the text within the initial warning box?

There are six tabs within the main window and they all have text on them, so it's not possible to identify what you mean by tab #2 and tab #1. What is the text on tab #2? What is the text on tab #1?

What is the text within the warning box that shows when clicking tab #1?
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 1272
Location: Malvern, Worcs, UK

PostPosted: Tue 11 Dec 2012, 15:35    Post subject: Re: Snap2 different under different versions of gtkdialog  

thunor wrote:
What is the text within the initial warning box?

There are six tabs within the main window and they all have text on them, so it's not possible to identify what you mean by tab #2 and tab #1. What is the text on tab #2? What is the text on tab #1?

What is the text within the warning box that shows when clicking tab #1?


Hi Thunor

Screenie 1 shows the warning box

Reading from the left on the main window - screenie 2 -

tab#1 = DIRECTORIES TO BACKUP
tab#2 = BACKUP STORAGE

After closing the initial warning box, tab#2 is selected and displayed.

Clicking tab#1 bring up an identical warning box - i.e screenie 1 again.

Cheers
PeeBee
capture17973.png
 Description   screenie 1
 Filesize   6.87 KB
 Viewed   493 Time(s)

capture17973.png

capture18745.png
 Description   screenie 2
 Filesize   41.67 KB
 Viewed   495 Time(s)

capture18745.png


_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
pemasu


Joined: 08 Jul 2009
Posts: 5458
Location: Finland

PostPosted: Tue 11 Dec 2012, 17:40    Post subject:  

The central repository system for woof builders is the official repos updated by Barry Kauler. That is the place where bug fixed pets should end.

I posted about your finding and fixed pdvdrsab script to the Barry`s blog:
http://bkhome.org/blog2/?viewDetailed=00064
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Tue 11 Dec 2012, 19:37    Post subject:  

@peebee

Thanks for that. I've installed snap2 v4.25 from here and I've started it up in Upup Precise 54x4 with gtkdialog version 0.8.3 r493 and I don't see that message box.

I've looked through the snap2 code and I've read your post to lstandish.

As I've said before, all the gtkdialog code has been gradually moving across to using a new template that warns developers if they use directives that aren't supported for certain widgets which is a good thing because it helps to catch things like that unsupported combobox <input>ls</input> sitting there dormant waiting to explode when I implement <input> for that widget (I won't though because it's too old and deprecated). This is fine except that I have seen developers using:
Code:
eval `gtkdialog -p MAIN_DIALOG`

or similar which evaluates everything sent to stdout which could be anything from anywhere. I can see that the following code:
Code:
I=$IFS; IFS=""
for STATEMENTS in  $($GTKDIALOG --program=MSG_DIALOG); do
   eval $STATEMENTS
done
IFS=$I

is being used in several places within the snap2 source code so I would recommend modifying that at least for you to test. You should try adding " | grep =" to the end of the GKDIALOG part so that you'll get something like:
Code:
for STATEMENTS in  $($GTKDIALOG --program=MSG_DIALOG | grep =); do

Have a go with that. There are seven of them, search for "eval".

@pemasu
Excellent.

Regards,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 1272
Location: Malvern, Worcs, UK

PostPosted: Wed 12 Dec 2012, 06:39    Post subject:  

thunor wrote:
Code:
for STATEMENTS in  $($GTKDIALOG --program=MSG_DIALOG | grep =); do

Have a go with that. There are seven of them, search for "eval".

Hi Thunor

Made the changes you suggested - did not change behaviour on Upup Precise 54x4......still warning and not possible to select tab#1

Is there any diagnostic info I can add / generate to help track down where the problem is?

Thanks for your interest and efforts.
Cheers
PeeBee

_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
pemasu


Joined: 08 Jul 2009
Posts: 5458
Location: Finland

PostPosted: Wed 12 Dec 2012, 08:26    Post subject:  

Quote:
I haven't tried your even newer version of gtkdialog yet....maybe pemasu can see how Snap2 works on his new Upup Precise 5.4.X.n - or I can test when he uploads it.


Why not try with latest gtkdialog revision. It might make the difference. I am going to update to the latest revision anyway.
Back to top
View user's profile Send private message 
peebee


Joined: 21 Sep 2008
Posts: 1272
Location: Malvern, Worcs, UK

PostPosted: Wed 12 Dec 2012, 10:23    Post subject:  

pemasu wrote:
Quote:
I haven't tried your even newer version of gtkdialog yet....maybe pemasu can see how Snap2 works on his new Upup Precise 5.4.X.n - or I can test when he uploads it.


Why not try with latest gtkdialog revision. It might make the difference. I am going to update to the latest revision anyway.


Hi Pemasu

I guess I was feeling that that was a bit beyond my capabilities....

Thunor gave me some pointers above:
Code:
svn checkout http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog
cd gtkdialog
./autogen.sh
make

Edit snap2 and point to the gtkdialog binary that will be in the src subdirectory or move the binary somewhere else.

but I assume I would need to download the devx for this to work?

Thanks
peebee

_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [23 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0974s ][ Queries: 13 (0.0039s) ][ GZIP on ]