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 24 Jul 2014, 19:10
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 46 of 63 Posts_count   Goto page: Previous 1, 2, 3, ..., 44, 45, 46, 47, 48, ..., 61, 62, 63 Next
Author Message
brokenman

Joined: 20 Oct 2011
Posts: 25

PostPosted: Thu 15 Mar 2012, 21:00    Post_subject:  

Quote:
find a file on your system something like /root/.config/gtk-2.0/gtkfilechooser.ini
In it there is a setting `ShowHidden=false`. Change it to true.


Yes. That's what i was looking for. Thanks very much. I didn't even realize a config file was created!
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3210
Location: Ontario

PostPosted: Sat 05 May 2012, 12:33    Post_subject: page full of script examples  

There's a single page full of script examples for beginners.
A very convenient resource. HERE

and the user manual is HERE


and stock icons are listed HERE



___________________________________________________
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3210
Location: Ontario

PostPosted: Sat 12 May 2012, 15:47    Post_subject: press the Enter key  

To explain how it is possible to press the Enter key to
input the data to your program I have written a little script.

Just look at the script and run it and you will
understand the method that Zigbert explains on the first page.

Decompress to obtain script.
_________________________________________________
demo_script.tar.gz
Description  Decompress to obtain script
gz

 Download 
Filename  demo_script.tar.gz 
Filesize  662 Bytes 
Downloaded  346 Time(s) 
Back to top
View user's profile Send_private_message 
glene77is


Joined: 17 Aug 2010
Posts: 112
Location: Memphis, TN, USA

PostPosted: Tue 22 May 2012, 09:36    Post_subject:  

Don 570,
Thanks for the demo script.
Just what I needed to begin with.
Resolved some myterious syntax that was killing my efforts.
Thanks. Very Happy
glene77is

_________________
Puppy Linux is more fun than a barrel of M$ monkeys Razz
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.
Back to top
View user's profile Send_private_message Visit_website 
don570


Joined: 10 Mar 2010
Posts: 3210
Location: Ontario

PostPosted: Sat 26 May 2012, 13:13    Post_subject:  

Porteus is getting behind the gtkdialog bandwagen Laughing

http://forum.porteus.org/viewtopic.php?f=94&t=1132

Some examples
http://puppy2.org/slaxer/Porteus/Gtkdialog_Examples_color.html

_________________________________________________________
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4277

PostPosted: Sat 26 May 2012, 18:17    Post_subject:  

did bigbass jump ship?
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3210
Location: Ontario

PostPosted: Tue 05 Jun 2012, 20:06    Post_subject:  

To show the selection of a folder by the two possible
methods Xdialog or gtkdialog. Compare each method
and decide which is best.

I wrote a simple script to compress a folder that the user selects.

The big difference is that Xdialog adds a slash at end of path.

compression-demo.tar.gz
Description 
gz

 Download 
Filename  compression-demo.tar.gz 
Filesize  1.32 KB 
Downloaded  291 Time(s) 

Edited_time_total
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3210
Location: Ontario

PostPosted: Sat 09 Jun 2012, 15:18    Post_subject:  

I wanted to show how it is possible to choose a folder and
enter data in another field at the same time.

To see the final application I created go HERE

Using the most recent version of gtkdialog this is possible
(See image) When the folder is choosen the time
to compress is calculated (using a simple estimate based on size)
and then displayed in box underneath.

Compare this with the old method where a
refresh button had to be clicked to make a calculation.

I've included two scripts to show the two methods.
Re quires the most recent version of gtkdialog


refresh button version...



___________________________________________________
Gtkdialog-demos.tar.gz
Description  two scripts to demonstrate calulating time
gz

 Download 
Filename  Gtkdialog-demos.tar.gz 
Filesize  1.85 KB 
Downloaded  287 Time(s) 
Back to top
View user's profile Send_private_message 
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Sat 16 Jun 2012, 16:51    Post_subject:  

zigbert wrote:

...
'mpg321 /dir/file' to play a audio-file.
If you use 'ffmpeg -i "/dir/file" -f au - | aplay -D plughw' it will play mp3, ogg, wma, flac, wav, ... without including more dependencies.
...


I tried -a 0:0, then -a :hw, then -a 'hw:0,0', then -a 0:hw:0, but now, i know the right word!
Finally, i've found the solution! Thanks!

-=Quirky Linux -1.40=-
mpg321 -a :plughw -o alsa /folder/file.mp3

OR:

mpg321 -a 0,0:plughw -o alsa /folder/file.mp3

To share sound card which has no hardware sound mixing:

aoss mpg321 -o alsa /folder/file.mp3

_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.

Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3210
Location: Ontario

PostPosted: Mon 18 Jun 2012, 17:18    Post_subject:  

To Zigbert

On the first page -----> scrolling text example

Is this line correct? Just one quote sign?

Code:
  while : ; do echo -e "x\n 100; sleep 0.5; done


_______________________________________________
Back to top
View user's profile Send_private_message 
zigbert


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

PostPosted: Wed 20 Jun 2012, 06:42    Post_subject:  

don570 wrote:
To Zigbert

On the first page -----> scrolling text example

Is this line correct? Just one quote sign?

Code:
  while : ; do echo -e "x\n 100; sleep 0.5; done


_______________________________________________

I guess it should be
Code:
  while : ; do echo -e "x\n 100"; sleep 0.5; done
Have you tested it?
_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
don570


Joined: 10 Mar 2010
Posts: 3210
Location: Ontario

PostPosted: Wed 20 Jun 2012, 19:36    Post_subject:  

Quote:
Have you tested it?


No I thought you tested it.

It's a bit too complicated for me Crying or Very sad

_________________________________
Back to top
View user's profile Send_private_message 
zigbert


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

PostPosted: Thu 21 Jun 2012, 11:44    Post_subject:  

don570 wrote:
No I thought you tested it.
Very Happy
_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
01micko


Joined: 11 Oct 2008
Posts: 7782
Location: qld

PostPosted: Fri 22 Jun 2012, 21:48    Post_subject:  

Scrolling text with <text> and <timer> widgets, added theme thrown in..
Code:
#!/bin/sh
# Scrolling text & embedded timer event illustration #2
# using text and timer widgets
FG=$1 BG=$2 MSG=$3
! [ "$1" -a "$2" -a "$3" ] && echo "usage: $0 fg-color bg-color \"string\"" &&\
FG=white BG=black MSG="This is a test... I repeat: This is a test... "

echo 'style "gtkdialog-prog"
{
   bg[NORMAL] = "'"$BG"'"
   fg[NORMAL] = "'"$FG"'"
}
widget "*prog" style "gtkdialog-prog"

class "*" style "gtkdialog-prog"' > /tmp/gtkrc_prog

export GTK2_RC_FILES=/tmp/gtkrc_prog:/root/.gtkrc-2.0

function scrolltext() {
  thestr="${1}"
  echo -en "${thestr:2}${thestr:0:2}"
}

export SCROLLMSG="$MSG"
export -f scrolltext

export GTKBOX='
<window title="Embedded Timer Event #2">
  <vbox width-request="300">
    <text>
      <variable>SCROLLMSG</variable>
      <input>scrolltext "$SCROLLMSG"</input>
    </text>
    <timer interval="1" visible="false">
      <action type="refresh">SCROLLMSG</action>
    </timer> 
  </vbox>
</window>'

gtkdialog4 -p GTKBOX -c
unset GTKBOX

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
disciple

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

PostPosted: Fri 22 Jun 2012, 23:25    Post_subject:  

A pity it can't refresh more often than once a second...
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 46 of 63 Posts_count   Goto page: Previous 1, 2, 3, ..., 44, 45, 46, 47, 48, ..., 61, 62, 63 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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