(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 21 Sep 2020, 20:23
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Gtkdialog Development
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 35 of 56 [839 Posts]   Goto page: Previous 1, 2, 3, ..., 33, 34, 35, 36, 37, ..., 54, 55, 56 Next
Author Message
8-bit


Joined: 03 Apr 2007
Posts: 3425
Location: Oregon

PostPosted: Tue 28 Aug 2012, 22:34    Post subject:
Subject description: Backup your slackosave file!
 

After I had installed the new version of gtkdialog, thanks 01micko,
I wanted to edit a PDF file and figured I would install pdfedit.
I installed it and it would not run because it needed some dependencies.
When I went to install the dependencies, gtkdialog again crashed.
To me this means that one has to use extreme caution in say installing a new game or utility that may hav dependencies that conflict with gtkdialog -v375.
I do not know if this is a case of gtkdialog being compiled with vte because when I tried to run a gtkdialog script without vte installed, nothing happened and when run from a terminal, gtkdialog reported it needed vte support.
Anyway, I wanted to pass that information along.
Also, as in the subject description, make sure you have a backup of your slackosave file to fall back on in case you mess up like I did.
Trying to remove a pet package you installed that crashed gtkdialog without the benefit of puppy package manager (requires gtkdialog) is an exercise in frustration! And this also goes for the SFS load on the fly utility not being accessible if gtkdialog has crashed.

I'll bet you never realized just how many things in Puppy depend on a working gtkdialog being present!
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1538
Location: Ukraine

PostPosted: Wed 29 Aug 2012, 06:21    Post subject:  

Dear Thunor,

In Lucid I changed to this in configure.in:
Code:
vte_lib="vte >= 0.23.5"

and VTE worked fine.

With kind regards,
vovchik

PS. Great work....Smile
Back to top
View user's profile Send private message 
zigbert


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

PostPosted: Wed 29 Aug 2012, 16:09    Post subject:  

I wonder if this behavior is intended or ?
the 3 lines
<action>echo $chk</action>
<action>activate:chk</action>
<action>echo $chk</action>

is not run in set order
Code:
#!/bin/sh
export win='
<window>
 <vbox>
  <togglebutton label="Toggle">
   <variable>chk</variable>
   <default>true</default>
   <action>if true echo I am true</action>
   <action>if false echo I am false</action>
  </togglebutton>
  <button label="activate Toggle">
   <action>echo $chk</action>
   <action>activate:chk</action>
   <action>echo $chk</action>
  </button>
 </vbox>
</window>'
gtkdialog --program=win

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


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

PostPosted: Wed 29 Aug 2012, 16:56    Post subject:  

Could <hbox><input file> import a file with gtkdialog xml-code?
_________________
Stardust resources
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 30 Aug 2012, 06:48    Post subject:  

Code:
vte_lib="vte >= 0.23.5"

Thanks vovchik, I've applied and commited that.

Sigmund, the activate behaviour is interesting. The "<action>echo $chk</action> " underneath the activate action: duplicate it several dozen times and run it again. The action list is iterated through in the signal-callback function for the signal related to that action. The activate action is a call to gtk-widget-activate(). I'm guessing that gtk is waiting until the signal-callback function containing the action list is exited before dealing with gtk-widget-activate(). Would it work instantly if run from another thread? I don't know, but anyway it looks as though the activate is animated to simulate the amount of time a user takes so attempting to read the target widget's variable from the source widget in that way I'd say is not something that could ever be relied upon.

Regarding "<hbox><input file>", I think you want to load-in i.e. parse another program and place it into the hbox? That would be cool. I've been working on the program loading/launching/parsing code quite a bit recently and I've discovered an issue with it that needs to be looked at: parsing another program -- such as when launching -- results in another call to gtk_main(). gtk_main() is the main loop and it can be entered multiple times but the timers are managed by gtk_main() and entering it again kills the timers. I've got that on my list of things to do, if it's even possible to solve. There are other issues too such as the action list in the source window that is launching the new window is prematurely terminated resulting in actions following a launch not being executed. The system feels like it's passing control rather than integrating.

I have thought already about creating widgets at application runtime which is an easy thing to do, but it is my opinion that gtkdialog wasn't designed for on-demand parsing; it looks and it feels like an afterthought. Possibly originally it was designed to be done once at the start and then that was it.

Last edited by thunor on Thu 30 Aug 2012, 18:39; edited 1 time 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 30 Aug 2012, 18:34    Post subject:  

Sigmund, I've refactored and slightly updated the table widget although I'm a bit worried about doing any more because the code is old, doing its own thing and its behaviour might be a result of that.

I've added tag attribute support so you can play with some properties and input file now works. I know that the signal handling is broken (it doesn't distinguish between <action> and <action signal="type"> although it could if I fixed it, but it would be nice if you could try it and let me know if it's still working as expected.

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


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

PostPosted: Fri 31 Aug 2012, 02:34    Post subject:  

Quote:
Sigmund, I've refactored and slightly updated the table widget
I am shaking of eager Very Happy

Trying to compile the latest
Code:
svn checkout http://gtkdialog.googlecode.com/svn/trunk/ gtkdialog
cd gtkdialog
./autogen.sh
make

Halts during 'make'

Code:
# make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /root/gtkdialog/missing --run autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
make[1]: Entering directory `/root/gtkdialog'
Making all in src
make[2]: Entering directory `/root/gtkdialog/src'
make  all-am
make[3]: Entering directory `/root/gtkdialog/src'
gcc -DHAVE_CONFIG_H -I. -I..    -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -pthread -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -DHAVE_GLADE_LIB=1  -DHAVE_VTE=0 -g -O2 -MT gtkdialog.o -MD -MP -MF .deps/gtkdialog.Tpo -c -o gtkdialog.o gtkdialog.c
mv -f .deps/gtkdialog.Tpo .deps/gtkdialog.Po
gcc -DHAVE_CONFIG_H -I. -I..    -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -pthread -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -DHAVE_GLADE_LIB=1  -DHAVE_VTE=0 -g -O2 -MT printing.o -MD -MP -MF .deps/printing.Tpo -c -o printing.o printing.c
mv -f .deps/printing.Tpo .deps/printing.Po
gcc -DHAVE_CONFIG_H -I. -I..    -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -pthread -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -DHAVE_GLADE_LIB=1  -DHAVE_VTE=0 -g -O2 -MT variables.o -MD -MP -MF .deps/variables.Tpo -c -o variables.o variables.c
variables.c:38:26: fatal error: widget_table.h: No such file or directory
compilation terminated.
make[3]: *** [variables.o] Error 1
make[3]: Leaving directory `/root/gtkdialog/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/gtkdialog/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/gtkdialog'
make: *** [all] Error 2

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


Joined: 23 Oct 2006
Posts: 1538
Location: Ukraine

PostPosted: Fri 31 Aug 2012, 03:44    Post subject:  

Dear thunor,

I get the same error as Zigbert Sad

Code:
widget_table.h: No such file or directory


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: Fri 31 Aug 2012, 07:00    Post subject:  

Ok, missing files commited (I forgot to "svn add" them) so it'll compile now.

I want to fix the signal managing code next. I'll do a commit for each part of the widget I work on so I can revert easily if needed.

The table widget is a GtkCList and I have found some functions you might be interested in:

gtk_clist_set_compare_func()
gtk_clist_set_sort_column()
gtk_clist_set_sort_type()
gtk_clist_sort()
gtk_clist_set_auto_sort()

Every single section of the API says "* is deprecated" but I can try things and we'll see what happens.
Back to top
View user's profile Send private message Visit poster's website 
zigbert


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

PostPosted: Fri 31 Aug 2012, 07:51    Post subject:  

Compiling version 388 worked fine.

This example script returns 'Segmentation fault' when trying to refresh:
I tested all other functions, and they seem to work as expected.
Code:
#! /bin/bash

echo -e '1|Row 1 Column 2 |Row 1 Column 3\n2|Row 2 Column 2 |Row 2 Column 3\n3|Row 3 Column 2 |Row 3 Column 3' > /tmp/input_table
export MAIN_DIALOG='
 <vbox>
  <table>
    <width>500</width><height>200</height>
    <variable>TABLE</variable>
    <label>Column 1|Column 2|Column 3</label>
    <input file>/tmp/input_table</input>
    <action>echo $TABLE</action>
  </table>
  <hbox>
   <button ok></button>
   <button>
       <label>refresh</label>
       <action>refresh:TABLE</action>
   </button>
  </hbox>
 </vbox>
'

gtkdialog --program=MAIN_DIALOG

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


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

PostPosted: Fri 31 Aug 2012, 07:56    Post subject:  

The sort functions of clist would be VERY handy.

I did not understand what I could expect of
gtk_clist_set_compare_func() Embarassed


Thanks a lot Exclamation
Sigmund

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


Joined: 23 Oct 2006
Posts: 1538
Location: Ukraine

PostPosted: Fri 31 Aug 2012, 07:57    Post subject:  

Dear Zigmund and thunor,

Zigmund's example works for me under Lucid....no segfault.

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


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

PostPosted: Fri 31 Aug 2012, 10:36    Post subject:  

doublecheck - Slacko 5.3.2.10

version 375 - OK (well, <input file> didn't work Wink )
version 388 - Segmentation fault
Code:
# ./table
./table: line 23:  3174 Segmentation fault      gtkdialog --program=MAIN_DIALOG

_________________
Stardust resources
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: Fri 31 Aug 2012, 12:54    Post subject:  

Thanks for testing guys Smile

I've just commited r390 and I've:
  • Fixed the table widget's signal and action handling issues.
  • Added "exported-column" support to the table widget.
  • Added initial "selection-mode" support to the table widget but not yet multiple selection mode.

[EDIT]
I won't interfere with its current behaviour. Refreshing currently adds items to the list and if you want to clear it beforehand then you can use the clear action. I won't interfere with the selected item on refresh either. I think it would be useful to have a tag attribute that enables the auto-selection of a particular row on refresh which will fire a select-row signal and you can disable that using block-function-signals. This way the current behaviour remains unaffected but you've got the option to modify it.

Using Sigmund's example code you can also try the "exported-column" and "selection-mode" tag attributes and add some buttons at the bottom for the clear and removeselected actions.

I'll code multiple selection mode later tonight.

Cheers.
Back to top
View user's profile Send private message Visit poster's website 
zigbert


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

PostPosted: Fri 31 Aug 2012, 18:59    Post subject:  

Testing r390 and
<action>refresh:TABLE</action>
works great.

What I don't understand is why the following input file gives a 'Segmentation fault'?
Can anyone try it and see how it works on your system?

Code:
#! /bin/bash

echo -e "

  pmusic_rating|M O S T   P L A Y E D   (last month)
  /mnt/sdb1/musikk/mp3/Ræva Rockers - Depp (LP).mp3|    Ræva Rockers - Depp (LP).mp3| 11
  /mnt/sdb1/musikk/mp3/Black sabbath - Heaven and hell.mp3|    Black sabbath - Heaven and hell.mp3| 9
  /mnt/home/mp3_streamripper/RadioLive.no_top40_Norway_192/Alexis Jordan - Hush Hush.mp3|    Alexis Jordan - Hush Hush.mp3| 8
  /mnt/sdb1/musikk/mp3/Saint deamon - My heart.mp3|    Saint deamon - My heart.mp3| 7
  /mnt/sdb1/musikk/mp3/Dimmu borgir - Vredesbyrd.mp3|    Dimmu borgir - Vredesbyrd.mp3| 7
  /mnt/sdb1/musikk/flac/Candlemass - At the gallows end.flac|    Candlemass - At the gallows end.flac| 7
  /mnt/sdb1/musikk/mp3/Halvdan Sivertsen - Lonesome Traveller.mp3|    Halvdan Sivertsen - Lonesome Traveller.mp3| 7
  /mnt/sdb1/musikk/mp3/Dimmu borgir - Burn in hell.mp3|    Dimmu borgir - Burn in hell.mp3| 7
  /mnt/sdb1/musikk/mp3/Twisted sister - The beast.mp3|    Twisted sister - The beast.mp3| 5
  /mnt/sdb1/musikk/mp3/TNT - 10.000 lovers (in one).mp3|    TNT - 10.000 lovers (in one).mp3| 5
  /mnt/home/mp3_streamripper/Radio3 Norge/Morten Harket - Lightning.mp3|    Morten Harket - Lightning.mp3| 5
  /mnt/home/mp3_streamripper/RadioLive.no_top40_Norway_192/Rihanna - Roc Me Out.mp3|    Rihanna - Roc Me Out.mp3| 4
  /mnt/sdb1/musikk/mp3/Rihanna - Rehab.mp3|    Rihanna - Rehab.mp3| 4
  /mnt/sdb1/musikk/mp3/Ræva Rockers - Lille Lenin (LP).mp3|    Ræva Rockers - Lille Lenin (LP).mp3| 4
  /mnt/sdb1/musikk/mp3/Morten Harket - Just believe it.mp3|    Morten Harket - Just believe it.mp3| 4
  /mnt/sdb1/musikk/mp3/Twisted sister - Love is for suckers.mp3|    Twisted sister - Love is for suckers.mp3| 3
  /mnt/home/mp3_streamripper/RadioLive.no_top40_Norway_192/Rihanna - Where You Been.mp3|    Rihanna - Where You Been.mp3| 3
  /mnt/sdb1/musikk/mp3/Judas priest - Parental guidance (LP).mp3|    Judas priest - Parental guidance (LP).mp3| 3
  /mnt/sdb1/musikk/mp3/Nightwish - Bye bye beautiful.mp3|    Nightwish - Bye bye beautiful.mp3| 3
  /mnt/sdb1/musikk/mp3/TNT - Everyone's a star.mp3|    TNT - Everyone's a star.mp3| 3
  /mnt/sdb1/musikk/mp3/TNT - Knights of the thunder.mp3|    TNT - Knights of the thunder.mp3| 3
  /mnt/sdb1/musikk/flac/Candlemass - Samarithan.flac|    Candlemass - Samarithan.flac| 3
  /mnt/home/mp3_streamripper/100HitRadio_top40_USA_128/Cher Lloyd - Want U Back.mp3|    Cher Lloyd - Want U Back.mp3| 3
  /mnt/sdb1/musikk/mp3/Morten Harket - Out of my hands.mp3|    Morten Harket - Out of my hands.mp3| 3
  /mnt/sdb1/musikk/mp3/Twisted sister - Destroyer.mp3|    Twisted sister - Destroyer.mp3| 2
  /mnt/sdb1/musikk/mp3/Nightwish - For the heart I once had.mp3|    Nightwish - For the heart I once had.mp3| 2
  /mnt/sdb1/musikk/mp3/Savatage - Dead winter dead.mp3|    Savatage - Dead winter dead.mp3| 2
  /mnt/sdb1/musikk/mp3/Bertine Zetlitz - Adore me.mp3|    Bertine Zetlitz - Adore me.mp3| 2
  /mnt/sdb1/musikk/mp3/TNT - Tell no tales.mp3|    TNT - Tell no tales.mp3| 2
  /mnt/home/mp3_streamripper/RadioLive.no_top40_Norway_192/Jenny Langlo - Million Dollar Signs.mp3|    Jenny Langlo - Million Dollar Signs.mp3| 2

" > /tmp/input_table
export MAIN_DIALOG='
 <vbox>
  <table>
    <width>500</width><height>200</height>
    <variable>TABLE</variable>
    <label>"Column 1|Column 2|Column 3|column 4                  |column 5                   "</label>
    <input file>/tmp/input_table</input>
    <action>echo $TABLE</action>
  </table>
  <hbox>
   <button ok></button>
   <button>
       <label>refresh</label>
       <action>clear:TABLE</action>
       <action>refresh:TABLE</action>
   </button>
  </hbox>
 </vbox>
'

gtkdialog --program=MAIN_DIALOG

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 35 of 56 [839 Posts]   Goto page: Previous 1, 2, 3, ..., 33, 34, 35, 36, 37, ..., 54, 55, 56 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. 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.1887s ][ Queries: 12 (0.1091s) ][ GZIP on ]