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 20 Sep 2018, 14:09
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GtkDialog - tips
Post new topic   Reply to topic View previous topic :: View next topic
Page 93 of 95 [1420 Posts]   Goto page: Previous 1, 2, 3, ..., 91, 92, 93, 94, 95 Next
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1617
Location: Japan

PostPosted: Fri 15 Jun 2018, 00:05    Post subject:  

disciple wrote:
It seems the solution doesn't work if I try to use it with xdg-open
Works perfectly here.
Please check your xdg-open script. Mine accepts only 1 argument ($1), which in your case would be the URL..

[Edit]: Hmm..I tried to let xdg-open accept '>/dev/null' as an argument and trigger your error message. No success. Whatever I do your code just works Crying or Very sad
I don't think that bash would treat any redirection operator as a command argument (unless you pass is literally as a string).
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6840
Location: Auckland, New Zealand

PostPosted: Fri 15 Jun 2018, 02:15    Post subject:  

Ah, sorry, my mistake. It didn't just affect xdg-open - I'd got my test system mixed up and was using the early version of gtkwialog, which didn't have gtkdialog compatibility.

But thanks for testing, and would you be able to confirm whether you have a Puppy xdg-open or the "real" freedesktop.org version? I don't have the Puppy version here, and I'm keen to be sure I'm compatible with it!

Thanks.

_________________
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1617
Location: Japan

PostPosted: Fri 15 Jun 2018, 02:40    Post subject:  

Puppy xdg-open
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 938
Location: not Bulgaria

PostPosted: Fri 15 Jun 2018, 03:37    Post subject:  

disciple wrote:
Ah, sorry, my mistake. It didn't just affect xdg-open - I'd got my test system mixed up and was using the early version of gtkwialog, which didn't have gtkdialog compatibility.


Yes, I thought you must be using gtkwialog (in -a or -b mode) rather than legacy gtkdialog. And, yes, with newest gtkwialog it will work with your example without any changes (since in legacy gtkdialog mode by default).

Should you be using either gtkwialog -a or -b modes, you have to remember no /bin/sh (or any other shell) is being used to execute the command (which is instead being fork/exec more directly), which means neither redirection nor job control with & will be in operation since these facilities are provided by a shell. So if you want redirection and job control you either have to use gtkwialog in default legacy gtkdialog mode or if using -a or -b modes, you need to start up a shell to process your command as follows (note that I prefer turning off stdout rather than just redirecting to /dev/null device since the latter is less efficient):

Code:
#!/bin/sh

export HELP_DIALOG="
<window>
<vbox>
  <button>
   <label>Open murga link in browser</label>
   <action>sh -c \"xdg-open http://www.murga-linux.com/puppy/viewtopic.php?p=149208#149208 1>&- &\"</action>
  </button>
  <button ok>
  </button>
</vbox>
</window>
"

MAINGUI="`gtkwialog -b -p HELP_DIALOG`"

echo "hello"

gtkwialog -b -p HELP_DIALOG

echo "goodbye"

exit 0


wiak
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6840
Location: Auckland, New Zealand

PostPosted: Fri 15 Jun 2018, 03:42    Post subject:  

Thanks guys, I switched the latest version of gtkwialog back in when I realised.
I think gtkwialog is great, but I'm still writing for gtkdialog, as that is what everybody has at the moment.
BTW, are you still going to release the gtkwialog source?

_________________
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 938
Location: not Bulgaria

PostPosted: Fri 15 Jun 2018, 03:57    Post subject:  

disciple wrote:
Thanks guys, I switched the latest version of gtkwialog back in when I realised.
I think gtkwialog is great, but I'm still writing for gtkdialog, as that is what everybody has at the moment.
BTW, are you still going to release the gtkwialog source?


Yes, as I have stated, I will be releasing the gtkwialog source code. It will be guaranteed kept backwards compatible with legacy gtkdialog and also with its existing -a and -b alternative modes. However, as mentioned in its new dev thread, I am currently adding some further functionality on top of these and, following the forum issues I ran into the last time when I put up a for-testing-only-binary (which I have lost permission to delete), the newest version won't be released until I have fully tested it by myself. Thereafter, which may take quite a while, it will be published to DebianDog Organisation gtkwialog repository (not as a test binary only, but, yes, with GPL source). I don't work from the github repository, however, so nothing will appear there until my testing is complete. I'm enjoying programming it though since system level C program was always my own favorite computing pastime! Smile

EDIT: Whether anyone is actually planning to adopt it, I'm not sure, and it doesn't matter (other than I'm in no hurry when no-one but myself may use it anyway!) - I will be using it myself from now on though since my own legacy gtkdialog apps need converted for use under dash system shells too and I find this by far the easiest way with my own programs in practice and I'll also be able to add in some new InterProcessComms optional functionality (simple without adding any detrimental bloat really), which I've long wished was available.

wiak
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2765
Location: South Australia :-(

PostPosted: Tue 17 Jul 2018, 04:42    Post subject:  

Is it possible to limit the list displayed by a combobox? See screeny. I would like to only display about 10 items.

Is there a better way to do this in gtkdialog, maybe with another widget?

Thanks
combobox.jpg
 Description   
 Filesize   70.03 KB
 Viewed   230 Time(s)

combobox.jpg


_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 5145
Location: Ontario

PostPosted: Tue 17 Jul 2018, 19:52    Post subject:  

Quote:
Is it possible to limit the list displayed by a combobox?


A programmer made a patch that allows a search in comboboxtext and
comboboxentry
https://github.com/oshazard/gtkdialog/issues/43

Quote:
comboboxtext:
User presses a key, the next item that begins with that case insensitive char
is selected and it'll wrap back to the first.

_____________________________________________
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1661

PostPosted: Wed 18 Jul 2018, 14:52    Post subject:  

smokey01 wrote:
Is it possible to limit the list displayed by a combobox? See screeny. I would like to only display about 10 items.

Is there a better way to do this in gtkdialog, maybe with another widget?

Thanks

Hey Smokey

The closest thing I've found is wrap-width property for comboboxtext, with which you can at least use multiple columns.

Greetings!
wrap-width.jpg
 Description   
 Filesize   38.08 KB
 Viewed   166 Time(s)

wrap-width.jpg


_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4832
Location: Kingwood, TX

PostPosted: Wed 18 Jul 2018, 15:40    Post subject:  

smokey01 wrote:
Is it possible to limit the list displayed by a combobox? See screeny. I would like to only display about 10 items.

Is there a better way to do this in gtkdialog, maybe with another widget?

Thanks
You can always use programming to limit the entries to X and have an additional entry for next X and/or previous X.
_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
seaside

Joined: 11 Apr 2007
Posts: 919

PostPosted: Wed 18 Jul 2018, 17:20    Post subject:  

smokey01 ,

You might consider List -
Code:
   <list  vscrollbar-policy="0">


This would not be a dropdown, but would prevent the choice items from dropping below the window.

Cheers,
s
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2765
Location: South Australia :-(

PostPosted: Wed 18 Jul 2018, 18:04    Post subject:  

don570 wrote:
A programmer made a patch that allows a search in comboboxtext and
comboboxentry
https://github.com/oshazard/gtkdialog/issues/43

Quote:
comboboxtext:
User presses a key, the next item that begins with that case insensitive char
is selected and it'll wrap back to the first.

_____________________________________________


Thanks don570 but I'm not sure how this will help if everyone's system is not patched. Not sure if this will do what I want.

Cheers

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
smokey01


Joined: 30 Dec 2006
Posts: 2765
Location: South Australia :-(

PostPosted: Wed 18 Jul 2018, 18:06    Post subject:  

SFR wrote:
smokey01 wrote:
Is it possible to limit the list displayed by a combobox? See screeny. I would like to only display about 10 items.

Is there a better way to do this in gtkdialog, maybe with another widget?

Thanks

Hey Smokey

The closest thing I've found is wrap-width property for comboboxtext, with which you can at least use multiple columns.

Greetings!

Thanks. Probably a good method to remember for future activities but not ideal for my situation.

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
smokey01


Joined: 30 Dec 2006
Posts: 2765
Location: South Australia :-(

PostPosted: Wed 18 Jul 2018, 18:07    Post subject:  

technosaurus wrote:
smokey01 wrote:
Is it possible to limit the list displayed by a combobox? See screeny. I would like to only display about 10 items.

Is there a better way to do this in gtkdialog, maybe with another widget?

Thanks
You can always use programming to limit the entries to X and have an additional entry for next X and/or previous X.


@technosaurus, sounds very interesting. Can you provide a working example so I can see what you mean.

Thanks

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
smokey01


Joined: 30 Dec 2006
Posts: 2765
Location: South Australia :-(

PostPosted: Wed 18 Jul 2018, 18:27    Post subject:  

seaside wrote:
smokey01 ,

You might consider List -
Code:
   <list  vscrollbar-policy="0">


This would not be a dropdown, but would prevent the choice items from dropping below the window.

Cheers,
s


The combobox will keep the list contained within the height of screen where the comboboxtext over shoots the screen and looks quite untidy.

I am considering a tree widget as it is quite neat which I guess is similar to the list widget. The only problem with tree and list widgets they take up a lot of real estate. My issue with the combobox is people can edit the selected data which can break things.

See attached for a sneak preview of what I'm working on. It will be in the August newsletter.
vlc-rec-gui.png
 Description   
 Filesize   101.08 KB
 Viewed   133 Time(s)

vlc-rec-gui.png


_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 93 of 95 [1420 Posts]   Goto page: Previous 1, 2, 3, ..., 91, 92, 93, 94, 95 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.1145s ][ Queries: 12 (0.0343s) ][ GZIP on ]