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 Sat 22 Nov 2014, 22:13
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Gtkdialog Development
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 46 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 44, 45, 46, 47, 48, ..., 53, 54, 55 Next
Author Message
EDDIE_THE_HEAD


Joined: 02 Dec 2012
Posts: 15
Location: Córdoba, Argentina

PostPosted: Wed 05 Dec 2012, 12:50    Post subject:  

technosaurus wrote:
in ubuntu /bin/sh is dash, so $() does not work, try changing it to backticks or the first line to #!/bin/bash

It looks like Thunor has fixed some bashisms in latest source


Yes, I get you, but that doesn't seem to be the problem. See this code:


Code:
#!/bin/bash

DIALOG='
<menubar>
  <menu>
    <menuitem>
      <label>open</label>
    </menuitem>
    <menuitem>
      <label>save</label>
    </menuitem>
    <menuitem>
      <label>quit</label>
      <action>EXIT:quit</action>
    </menuitem>
    <label>File</label>
  </menu>
</menubar>'

export DIALOG

gtkdialog -p DIALOG


There's no bashisms, no code that could cause any trouble. I could change the first line to #!/bin/sh but it wouldn't matter. I still get an empty dialog. Confused
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5785
Location: Valåmoen, Norway

PostPosted: Wed 05 Dec 2012, 13:34    Post subject:  

Any terminal output?
The problem does not seem to be related to gtkdialog.... works here (Puppy 5.3.3)

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
smokey01


Joined: 30 Dec 2006
Posts: 1842
Location: South Australia

PostPosted: Wed 05 Dec 2012, 14:45    Post subject:  

Works fine in Fatdog too.
_________________
Puppy Software <-> Distros <-> Puppy Linux Tips
Back to top
View user's profile Send private message Visit poster's website 
EDDIE_THE_HEAD


Joined: 02 Dec 2012
Posts: 15
Location: Córdoba, Argentina

PostPosted: Wed 05 Dec 2012, 15:39    Post subject:  

zigbert wrote:
Any terminal output?


Nope!

My guess would be that something's wrong with either my GTK+ library or Ubuntu.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Wed 05 Dec 2012, 15:49    Post subject:  

Maybe, what does ldd `which gtkdialog` output?

you could also try using a puppy built gtkdialog in ubuntu

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
EDDIE_THE_HEAD


Joined: 02 Dec 2012
Posts: 15
Location: Córdoba, Argentina

PostPosted: Wed 05 Dec 2012, 16:28    Post subject:  

technosaurus wrote:
Maybe, what does ldd `which gtkdialog` output?

you could also try using a puppy built gtkdialog in ubuntu


Here's the output:

Code:
ale@Linux:/$ ldd `which gtkdialog`
   linux-gate.so.1 =>  (0xb7791000)
   libgtk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0 (0xb7313000)
   libgdk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0 (0xb7264000)
   libgio-2.0.so.0 => /usr/lib/i386-linux-gnu/libgio-2.0.so.0 (0xb710c000)
   libgdk_pixbuf-2.0.so.0 => /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0 (0xb70eb000)
   libgobject-2.0.so.0 => /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb709c000)
   libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb6fa3000)
   libgthread-2.0.so.0 => /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 (0xb6fa0000)
   libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb6f84000)
   libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6dda000)
   libpangocairo-1.0.so.0 => /usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0 (0xb6dcd000)
   libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb6c99000)
   libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb6c93000)
   libatk-1.0.so.0 => /usr/lib/i386-linux-gnu/libatk-1.0.so.0 (0xb6c72000)
   libcairo.so.2 => /usr/lib/i386-linux-gnu/libcairo.so.2 (0xb6ba7000)
   libpangoft2-1.0.so.0 => /usr/lib/i386-linux-gnu/libpangoft2-1.0.so.0 (0xb6b7b000)
   libpango-1.0.so.0 => /usr/lib/i386-linux-gnu/libpango-1.0.so.0 (0xb6b31000)
   libfontconfig.so.1 => /usr/lib/i386-linux-gnu/libfontconfig.so.1 (0xb6afd000)
   libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb6ad0000)
   libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb6abe000)
   libXrender.so.1 => /usr/lib/i386-linux-gnu/libXrender.so.1 (0xb6ab4000)
   libXinerama.so.1 => /usr/lib/i386-linux-gnu/libXinerama.so.1 (0xb6ab0000)
   libXi.so.6 => /usr/lib/i386-linux-gnu/libXi.so.6 (0xb6aa0000)
   libXrandr.so.2 => /usr/lib/i386-linux-gnu/libXrandr.so.2 (0xb6a96000)
   libXcursor.so.1 => /usr/lib/i386-linux-gnu/libXcursor.so.1 (0xb6a8b000)
   libXcomposite.so.1 => /usr/lib/i386-linux-gnu/libXcomposite.so.1 (0xb6a87000)
   libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb6a83000)
   libgmodule-2.0.so.0 => /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0 (0xb6a7e000)
   libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb6a67000)
   libselinux.so.1 => /lib/i386-linux-gnu/libselinux.so.1 (0xb6a48000)
   libresolv.so.2 => /lib/i386-linux-gnu/libresolv.so.2 (0xb6a30000)
   libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb6a29000)
   libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb69ed000)
   librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb69e3000)
   /lib/ld-linux.so.2 (0xb7792000)
   libfreetype.so.6 => /usr/lib/i386-linux-gnu/libfreetype.so.6 (0xb6949000)
   libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb6928000)
   libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb6923000)
   libpixman-1.so.0 => /usr/lib/i386-linux-gnu/libpixman-1.so.0 (0xb688b000)
   libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb6860000)
   libxcb-shm.so.0 => /usr/lib/i386-linux-gnu/libxcb-shm.so.0 (0xb685c000)
   libxcb-render.so.0 => /usr/lib/i386-linux-gnu/libxcb-render.so.0 (0xb6852000)
   libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb6828000)
   libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb6823000)
   libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb681c000)
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Wed 05 Dec 2012, 17:49    Post subject:  

Quote:
libgtk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
yeah, ubuntu does some serious mysterious stuff, that should have a version number suffix, so it is possible that the libraries and the include headers don't match because the .so file is linked to a different (still installed) versioned library. fast way to tell would be to use a puppy compiled version, probably from lupu
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1536
Location: Maine, USA

PostPosted: Wed 05 Dec 2012, 18:34    Post subject: Unexpected output value from gtkdialog3/4  

thunor,
I am working with code that expects gtkdialog to output only valid commands, particularly assignment statements. It uses 'eval' to set the variables locally. However, the first value in the list of assignment statements is "OK", which gets rejected as an invalid command.

I cannot find the explanation of what to expect as output, so do not know whether the "OK" is intended by the developers of gtkdialog. If it is legitimate, what is the recommended way to process the output from gtkdialog to retrieve the variables set by gtkdialog?


Code:
+ eval OK 'AUTODHCP="true"' 'CURIP=""' 'CURSTAT="Not' Connected. '"' 'DNS1=""' 'DNS1LAB="DNS' Server '1"' 'DNS2=""' 'DNS2LAB="DNS' Server '2"' 'ENWIRE="true"' 'GATEWAY=""' 'GATEWAYLAB="Gateway"' 'IF=""' 'IGNORE="false"' 'IP=""' 'IPLAB="Static' IP 'Address"' 'SUBNET=""' 'SUBNETLAB="Subnet' 'Mask"' 'TABLE=""' 'EXIT="Exit-NOW"'
++ OK AUTODHCP=true CURIP= 'CURSTAT=Not Connected. ' DNS1= 'DNS1LAB=DNS Server 1' DNS2= 'DNS2LAB=DNS Server 2' ENWIRE=true GATEWAY= GATEWAYLAB=Gateway IF= IGNORE=false IP= 'IPLAB=Static IP Address' SUBNET= 'SUBNETLAB=Subnet Mask' TABLE= EXIT=Exit-NOW
/usr/local/bin/Frisbee: line 610: OK: command not found
+ [[ '' == \R\E\S\T\A\R\T ]]
The code for this trace is:
Code:
RETVALS=`gtkdialog3 --program=MAIN_DIALOG --center`

eval $RETVALS
if [[ "$EXIT" == "RESTART" ]] ; then


As a test, I coded:
Code:
RETVALS=`gtkdialog3 --program=MAIN_DIALOG --center | grep =`
which solves the problem. But I have not noticed any other gtkdialog result processing that does that.

I assume the the "OK" is only a confirmation that the invocation did not fail, but a failure would probably output a message to stderr. Or would it?
Richard
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: Thu 06 Dec 2012, 17:44    Post subject:  

EDDIE_THE_HEAD wrote:
Thunor, me again Rolling Eyes

So far the only widgets that have given me trouble are the menu, menubar and menuitems. My gtkdialog seems to be ignoring them completely. No matter how I define them, they won't appear in my dialogs.
...

Recently I had to stop using a gtk function that shows all of the widgets from the window down because it was causing strange artifacts, and I replaced it by micro-managing the showing and hiding individually and I've got a feeling that it's related to that.

It could be as simple as the widgets aren't being shown and I'm looking into it now -- I may have missed something.
Back to top
View user's profile Send private message Visit poster's website 
thunor


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

PostPosted: Thu 06 Dec 2012, 18:12    Post subject:  

@EDDIE_THE_HEAD

I'm looking at the code and I haven't seen anything obvious yet but I'm going to dump messages as the widgets are shown so I can see if anything is missing.

You could try this, a modified version of your example:
Code:
DIALOG='
<menubar>
  <menu>
    <menuitem>
      <label>open</label>
      <action signal="show">echo showing open</action>
      <action signal="realize">echo realizing open</action>
    </menuitem>
    <menuitem>
      <label>save</label>
      <action signal="show">echo showing save</action>
      <action signal="realize">echo realizing save</action>
    </menuitem>
    <menuitem>
      <label>quit</label>
      <action signal="show">echo showing quit</action>
      <action signal="realize">echo realizing quit</action>
      <action>EXIT:quit</action>
    </menuitem>
    <label>File</label>
    <action signal="show">echo showing File</action>
    <action signal="realize">echo realizing File</action>
  </menu>
  <action signal="show">echo showing menubar</action>
  <action signal="realize">echo realizing menubar</action>
</menubar>'

export DIALOG

gtkdialog -p DIALOG

If you run it, click File and then select quit you should get this in the terminal:
Code:
# ./_dev/EDDIE_THE_HEAD-menu-issue
showing open
showing save
showing quit
showing File
showing menubar
realizing menubar
realizing File
realizing open
realizing save
realizing quit
EXIT="quit"
#

Also, what happens when you wrap everything with a window widget, or a vbox and a window widget? Is the behaviour the same?

Cheers.

Last edited by thunor on Thu 06 Dec 2012, 18:32; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
thunor


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

PostPosted: Thu 06 Dec 2012, 18:22    Post subject:  

While I'm here, I committed something interesting today (r488), a new break action function that you can use to break out of a list of actions in combination with the recently added condition attribute. There's an example in examples/miscellaneous/break.

I got the idea from the fact that launching another dialog never returns to the list of actions that it was launched from.

You could have an action with a condition that tests something and if true would execute the break and terminate the processing of further actions, otherwise the actions underneath would be executed.
Back to top
View user's profile Send private message Visit poster's website 
thunor


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

PostPosted: Thu 06 Dec 2012, 20:00    Post subject:  

Hi again EDDIE_THE_HEAD

I believe that I've found the problem and I've likely fixed it in r489. Are you compiling this yourself from SVN or from a source package?

I'll just explain the SVN route so you can try it for me/us/everyone Smile

Open a terminal somewhere and type:
Code:
svn checkout http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog
cd gtkdialog
./autogen.sh
make

If you want to install to /usr/bin instead of /usr/local/bin you can pass --prefix=/usr to autogen.sh like you normally would to configure.

The compiled gtkdialog binary will be in the src subdirectory or you can sudo make install.

Let me know if the issue is resolved please.

Like I said earlier, I micro-manage showing widgets individually so I add them to a list. Most of this is automated but there are places where additional widgets are required and I found that the GtkMenuShell (the pop-up rectangle that contains the menuitems) wasn't being added to the show list so I have assumed that that is the cause. Obviously it was fine on Puppy and it doesn't make sense why the menubar isn't visible for you on Ubuntu, but we'll see how it goes. The menubar is definitely in the show list and so is the "File" part of the menu so it's all a bit strange.

Many thanks,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
EDDIE_THE_HEAD


Joined: 02 Dec 2012
Posts: 15
Location: Córdoba, Argentina

PostPosted: Fri 07 Dec 2012, 00:56    Post subject:  

thunor wrote:
@EDDIE_THE_HEAD


Thanks a lot for working on this.

I've run the code you provided:

Code:
DIALOG='
<menubar>
  <menu>
    <menuitem>
      <label>open</label>
      <action signal="show">echo showing open</action>
      <action signal="realize">echo realizing open</action>
    </menuitem>
    <menuitem>
      <label>save</label>
      <action signal="show">echo showing save</action>
      <action signal="realize">echo realizing save</action>
    </menuitem>
    <menuitem>
      <label>quit</label>
      <action signal="show">echo showing quit</action>
      <action signal="realize">echo realizing quit</action>
      <action>EXIT:quit</action>
    </menuitem>
    <label>File</label>
    <action signal="show">echo showing File</action>
    <action signal="realize">echo realizing File</action>
  </menu>
  <action signal="show">echo showing menubar</action>
  <action signal="realize">echo realizing menubar</action>
</menubar>'

export DIALOG

gtkdialog -p DIALOG



But the output is the following:

Code:
# ./_dev/EDDIE_THE_HEAD-menu-issue
ale@Linux:~/scripts$ ./menu
showing open
showing save
showing quit
showing File
showing menubar
realizing menubar
realizing File
showing menubar
EXIT="abort"   
#


And I get an empty dialog Confused (obviously aborting is the only way I have to exit the window).

After this I compiled r489 and tried again...but still nothing.

thunor wrote:
Let me know if the issue is resolved please.


Unfortunately no. But as you said, it is pretty weird as it happens (apparently) only in Ubuntu.

Is there any other Ubuntu user around here who can verify this?
Back to top
View user's profile Send private message 
EDDIE_THE_HEAD


Joined: 02 Dec 2012
Posts: 15
Location: Córdoba, Argentina

PostPosted: Fri 07 Dec 2012, 01:01    Post subject:  

thunor wrote:

Also, what happens when you wrap everything with a window widget, or a vbox and a window widget? Is the behaviour the same?

Cheers.


I had forgotten about this. Yes, I've tried wrapping the menubar with every container widget. Same results Sad
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: Fri 07 Dec 2012, 10:57    Post subject:  

EDDIE_THE_HEAD wrote:
...
Code:
...
showing open
showing save
showing quit
showing File
showing menubar
realizing menubar
realizing File
showing menubar
EXIT="abort"
#


And I get an empty dialog Confused (obviously aborting is the only way I have to exit the window).

After this I compiled r489 and tried again...but still nothing.
...

Yeah sorry, you can't click "File" Razz Doh! Here's what I get closing via the window manager:
Code:
showing open
showing save
showing quit
showing File
showing menubar
realizing menubar
realizing File
EXIT="abort"
#

So, you've got an extra "showing menubar" which is very strange. Also if a widget is shown and realized then you should be looking at it.

What you could do next is download the gtkdialog-0.8.2 source package and try that. It uses the old gtk_widget_show_all() method to show the widgets.

EDDIE_THE_HEAD wrote:
Is there any other Ubuntu user around here who can verify this?

I know somebody who's using it -- frafa/François - http://liveusb.info/dotclear/ -- I'll email him.

[EDIT] I'll email frafa/François after you've tested gtkdialog-0.8.2 if you don't mind. I need to know if gtk_widget_show_all() works.

Regards,
Thunor

Last edited by thunor on Fri 07 Dec 2012, 12:06; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 46 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 44, 45, 46, 47, 48, ..., 53, 54, 55 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.1460s ][ Queries: 13 (0.0222s) ][ GZIP on ]