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 Mon 20 Oct 2014, 06:06
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
pWidgets 2.5.5
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 207 [3099 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 205, 206, 207 Next
Author Message
zigbert


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

PostPosted: Wed 03 Dec 2008, 16:33    Post subject:  

I have already made the fix for the wallpaper setter, but I made the 'apply' button re-render the widgets. To me it feels more logical to 'apply' the changes rather than 'close' the window.
I'll make a note in the main post.

code start from line 238 in /usr/local/apps/wallpaper/AppRun. I have added the 2 lines in the middle.
Code:
     <button>
      <label>$LOC_APPLY</label>
      <input file stock=\"gtk-apply\"></input>
      <action>$APPDIR/slideshow -stop</action>
      <action>$APPDIR/set_bg \"\$IMAGE\"</action>
      <action>echo \"\$IMAGE\" > \$HOME/.config/wallpaper/bg_img</action>

<action>fixwidgets</action>
<action>cat /root/.config/tmp/bg_img</action>

      <action type=\"refresh\">TEXT</action>
     </button>

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


Joined: 05 May 2007
Posts: 10821
Location: Ontario Canada,Sydney Australia

PostPosted: Thu 04 Dec 2008, 02:31    Post subject:  

If you look back at my post, I made 2 versions
version 1 you click the "close" button and it restarts Pwidgets.
Version I added a button "Pwidgets Restart", you click that button and it restarts Pwidgets, Basically I think its the same way you did it Smile
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Wed 10 Dec 2008, 06:57    Post subject:  

Zigbert
01micko wrote
Quote:
What I did was write a script (WOW! my first script! Please point out to me what I could have done better, but it works Rolling Eyes ) that sleeps for 5 seconds to allow the window manager to load then moves the cursor a few pixels and left clicks the mouse. I edited /usr/sbin/fixwidgets to point it to the script and viola!

Yes, clock appears like magic.....
Hmmmmm, this fix is buggy if you move the cursor directly after hitting 'apply'. Problem is that if the fake mouse click happens over the open window near the edge next time you move the cursor the window resizes! Sad Or, the cursor may end up over an icon and initiate that process! Evil or Very Mad
Ok, what I need to do is find a vacant piece of real estate on the desktop and make sure the mouse click is generated there and nowhere else.
I cand send the cursor to an extreme edge or corner (I'm thinking top left) and make the click there. To make it look professional though I should send the cursor back to the centre of the screen. Will work on this and reupload a new script.
After I get this fix right I'll take a closer look at xonclock to find the bug and make a permanent fix.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
zigbert


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

PostPosted: Wed 10 Dec 2008, 08:36    Post subject:  

I will (when sparetime comes my way) rework the Pwidgets infrastructure to be more flexible to user-created mods and created widgets. Your fix is VERY welcome.

There is no hurry! If we could make a Pwidgets upgrade during Christmas it would be great.

Sigmund

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


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Thu 11 Dec 2008, 02:47    Post subject:  

zigbert wrote:
I will (when sparetime comes my way) rework the Pwidgets infrastructure to be more flexible to user-created mods and created widgets. Your fix is VERY welcome.

There is no hurry! If we could make a Pwidgets upgrade during Christmas it would be great.

Sigmund

No worries, I'll try to fine tune my fix, no pressure is good! I have plenty of time over Christmas and may even find time for a slide show widget. That would be cool, but I fear it will be too large to include as default. That is where the work you are doing on the infrastructure comes in.
Looking forward to it! Wink

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
zigbert


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

PostPosted: Thu 11 Dec 2008, 04:12    Post subject:  

A slideshow would be very cool !!! Smile

Why do you think it would be so huge? Have you looked at 'xli' (already installed with the conky package). I think it can crop/scale and place any image on the desktop.


Sigmund

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


Joined: 11 Jul 2006
Posts: 4441
Location: Lake Macquarie NSW Australia

PostPosted: Thu 11 Dec 2008, 06:34    Post subject:  

zigbert wrote:
I will (when sparetime comes my way) rework the Pwidgets infrastructure to be more flexible to user-created mods and created widgets. Your fix is VERY welcome.

There is no hurry! If we could make a Pwidgets upgrade during Christmas it would be great.

I plan to release a Puppy 4.2alpha by Christmas using the existing Pwidgets, but it would be great to have the revised version available for when we go to beta.

I am on holiday from 19 December until 12 January and somewhere in there I'll be building a few Puppy's, if my wife doesn't object too loudly. Razz

_________________
Actions speak louder than words ... and they usually work when words don't!
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Thu 11 Dec 2008, 06:59    Post subject:  

@zigbert
Really don't have much clue, do I? Embarassed Laughing Anyway, have found the xloadimage man page and am hoping most if not all the options have not been lost in the translation (from xloadimage to xli). Some seem to work fine. I think I will be able to do something with the slide show, will be a good project for me I think and I have a whole Puppy Community to draw from! When I make some advancements I may make a thread about it but that will be a week or two away yet.
Cheers,
Micko

PS,@WhoDo, woo her with flowers Wink

UPDATE: have a name for slideshow widget, 'xlideshow'. Did a google-linux and it doesn't exsist. Cool

_________________
Woof Mailing List | keep the faith Cool |

Last edited by 01micko on Sat 13 Dec 2008, 02:32; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Sat 13 Dec 2008, 01:20    Post subject:  

Now have a new 'wakeclock.sh' file for xonclock. It creates the mouseclick in the extreme topleft corner, then returns the cursor somewhere near the centre of screen. Only finds perfect centre on 1024x768. If you want perfect centre for a differrent resolution you must open the file as text and edit the third line.
Code:
sleep 0.1 ; xevent -a 512 384

Change "512 384" with half of the dimensions of your screen resolution.
eg: if your res is 800x600 substitute "512 384" with "400 300".
This will snap the cursor to the centre of the screen on boot or restarting Pwidgets if you use the analog clock.
Micko

Update: File 'wakeclock.sh.gz' removed. Still available further back in this thread however is not needed because it is included in the latest Pwidgets version.
Now if you want to return the cursor to centre and you have a different screen resolution to 1024x768, you must edit the last line in /usr/sbin/fixwidgets. Refer to code and instructions above.

_________________
Woof Mailing List | keep the faith Cool |

Last edited by 01micko on Fri 19 Dec 2008, 23:54; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Sat 13 Dec 2008, 07:28    Post subject:  

barry uses the following in pup_event_frontend_d to calculate screensize
Code:
SCRNXY="`xwininfo -root | grep -o '\-geometry .*' | tr -s ' ' | cut -f 2 -d ' ' | cut -f 1 -d '+'`"
SCRN_X="`echo -n "$SCRNXY" | cut -f 1 -d 'x'`"
SCRN_Y="`echo -n "$SCRNXY" | cut -f 2 -d 'x'`"

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Sat 13 Dec 2008, 13:06    Post subject:  

To get width and height of your screen:
Code:
SCREENX=`xscreensize | sed "s/ .*//"`
SCREENY=`xscreensize | sed "s/^[^ ]* //"`


You will need xscreensize, extract it in /usr/X11R7/bin/:
http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=7845

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Sat 13 Dec 2008, 19:50    Post subject:  

Thanks Will and Mark.
Don't really understand too much about code yet, still a 'puppy' when it comes to that! lol, but I'll try to use your suggestions to save any newbies uncomfortable with editing, getting their paws dirty!
Cheers,
Micko

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
zigbert


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

PostPosted: Sun 14 Dec 2008, 07:48    Post subject:  

The /usr/sbin/iconswitcher should update widgets when restarting rox. End of file will look like this:
Code:
 rox -p=/root/Choices/ROX-Filer/PuppyPin
 fixwidgets &
 jwm -restart
fi


###END###

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


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Tue 16 Dec 2008, 04:22    Post subject:  

Hi zigbert,
I have made small progress on 'xlideshow'.
What I need to know is the size of the widget. I'm guessing 140x140 like the clock. Not too sure if a transparent background will work, see what develops. Sqare is the go I think because some images are landscape and some portrait. I think 5 seconds is a good delay time.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
zigbert


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

PostPosted: Tue 16 Dec 2008, 06:24    Post subject:  

01micko
progress on 'xlideshow'. This is good news Smile

Could you set up 4 variables in the beginning of the script (height, width, delay, image_directory). This way I could easily rebuild it to fit the new structure, and user could easily configure it.


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 5 of 207 [3099 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 205, 206, 207 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
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.1022s ][ Queries: 12 (0.0181s) ][ GZIP on ]