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 Fri 25 Jul 2014, 04:58
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Pwidgets 2.4.1
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 201 of 205 Posts_count   Goto page: Previous 1, 2, 3, ..., 199, 200, 201, 202, 203, 204, 205 Next
Author Message
zigbert


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

PostPosted: Mon 05 Dec 2011, 04:28    Post_subject:  

davids45
Nice avatar Very Happy
The other day I collected the last flags from this season - 20cm snow. Your avatar makes me think of the spring when my feet can touch the bare ground for the first time. - That's heaven.....
Well, 1m powder snow, and I can 'fly' down the steepest hill, - that's heaven too. Very Happy

1) Tasmod as also noted, and will be fixed

2) 01micko made an improvement to support several CPUs. - Must in some way not work for you. Let's see if Mick is around...

3/4) Widget development is not on my priority list. - Sorry mate.


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
zigbert


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

PostPosted: Mon 05 Dec 2011, 08:09    Post_subject:  


_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
akash_rawal

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Mon 05 Dec 2011, 09:59    Post_subject:  

zigbert wrote:

JWM has been the bottleneck to get this going - until you come up with <window type-hint="7">.

Nice to know that you are already aware of it. The attribute type-hint="7" works properly with all WMs except JWM. (Some latest versions seem to have corrected this.)

Currently I am too busy with my entrance exam preparation. When I get time, I will attempt to rewrite at least 1 widget.

For transparency, all we need to do is to find a commandline image editing program capable of cropping images. If we know where to place a widget, we know from where we have to crop the image.

Anyways, the example widget works flawlessly after adding attribute type-hint="7" to its window. I use compiz as my window manager.
Back to top
View user's profile Send_private_message 
zigbert


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

PostPosted: Mon 05 Dec 2011, 14:33    Post_subject:  

Version 2.40
See main post

Changelog
- Activate gtkdialog widget support (thanks to akash_rawal)
- Make the gui scalable.
- Bugfix: Menu-labels were hardlinked to gtk-stock (thanks to tasmod/davids45)
- Bugfix: Do not allow more than one detected langauge. (thanks to shinobar)
- Bugfix: Sidebar plugin: preview icon.

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
01micko


Joined: 11 Oct 2008
Posts: 7782
Location: qld

PostPosted: Mon 05 Dec 2011, 16:28    Post_subject:  

davids45

With the weather plugin you need to enable UTF-8, then you get the degree symbol as expected. i don't see this as a major drama but I guess a note in the gui or a splash should be apparent informing the user.

There is a bug I found with the Cpu_bar widget, the default config had 2 entries ( Rolling Eyes ), so with a uniprocessor you would get an empty cpu bar below the working one... but that is fixed in the plugin script now. I don't know if it will fix your particualr issue as you said there is nothing displayed Confused James C did test it recently with 4 cores and it worked as expected. Try the patch please. (see attached)

akash_rawal..

Nice stuff! Sigmund, what we need is the pwidgets_background file to exist even when we don't have sidebar activated, that way there is always an image to reference in the correct dimensions (screen size) to process. Each individual widget will of course need the -G param to gtkdialog, and as akash said the only missing piece is a tool to crop the image. Maybe pnm suite can handle this? (Barry would know Wink edit... pamcut!!! Smile ). Already in Puppy..

Cheers
cpu_patch-001.pet
Description  fixes a uniprocessor issue
pet

 Download 
Filename  cpu_patch-001.pet 
Filesize  1.12 KB 
Downloaded  323 Time(s) 

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


Joined: 11 Oct 2008
Posts: 7782
Location: qld

PostPosted: Mon 05 Dec 2011, 20:59    Post_subject:  

Here we go.. the gtkdialog widget engine: (1st draft)

The boundaries are limitless! You could display all the conky stuff with progress bars, except dynamic graphs (for now.. maybe a refreshing pixmap?), You can display icons in gtkdialog, any size, you could have a slideshow, without the flicker, widgets can be i18n'd for localisation.. who needs/wants conky?.

Code:
#!/bin/sh

WIDGETNAME=`basename $0`

SCREEN=`xwininfo -root | grep ' \-geometry ' | tr -s ' ' | cut -f 3 -d ' ' | cut -f 1 -d '+' | tr 'x' ' '`
HEIGHT=`echo -n "$SCREEN" | cut -f 2 -d ' '`
WIDTH=`echo -n "$SCREEN" | cut -f 1 -d ' '`
YDIMENSION=150 #`echo $(($HEIGHT - 300))` #hard code for demo
XDIMENSION=$((${WIDTH} - 500))

[ ! -d /tmp/pwidgets ] && mkdir /tmp/pwidgets
cp -af /root/.pwidgets/Pwidgets_background /tmp/pwidgets/ #do it each time incase change bg
IMAGE=/tmp/pwidgets/Pwidgets_background #this is .png, makes life easier! It's the one we cut
NEWIMAGE=/tmp/pwidgets/${WIDGETNAME}_background #this is the result
BGHEIGHT=`file $IMAGE| cut -d ' ' -f6|tr -d ','`
BGWIDTH=`file $IMAGE| cut -d ' ' -f4`
NEWIMAGEPATH=/tmp/pwidgets #pixmap_path
IMAGEFILE=${WIDGETNAME}_background #_${WIDGETNAME} #our widget background

#hard coded for demo #we can do a quick dummy run and get the info from xwininfo if geometry \
#is a variable
X=356
Y=78

#code based on /usr/sbin/background_reshape BK
CROPLEFT=${XDIMENSION}
CROPTOP=${YDIMENSION}

#the magic #crop image using pamcut
pngtopnm $IMAGE | pamcut -left=${CROPLEFT} -top=${CROPTOP}  -height=$Y -width=$X | pnmtopng > $NEWIMAGE
# -right=${CROPRIGHT}

echo 'pixmap_path "'"$NEWIMAGEPATH"'"
style "widget-background"
{
   engine "pixmap"
   {
        image
        {
                function = FLAT_BOX
                file = "'"${IMAGEFILE}"'"
                border = {0, 0, 0, 0}
                detail = "base"
                stretch = FALSE
        }
   }
}
class "GtkWindow" style "widget-background" ' >/tmp/gtkwidgetrc
export GTK2_RC_FILES=/tmp/gtkwidgetrc

export gui='<window title="pwidget" type-hint="7">
   <vbox>
   <text use-markup="true"><label>"<span color='"'white'"'>This window can behave like a</span>"</label></text>
   <text use-markup="true"><label>"<span color='"'yellow'"'>WIDGET</span>"</label></text>
   <button ok></button>
   </vbox>
</window>'
gtkdialog -p gui -G ${X}x${Y}+${XDIMENSION}+${YDIMENSION}


Notes:

**** there is plenty of hard coded crap in there so needs work

**** pamcut is perfect!

**** you must have sidebar activated for the above demo to work

*many thanks akash_rawal for opening our collective eye Wink

EDIT: The xwininfo code at the top is unnecessary as the size of Pwidgets_background is already the exact screen size and I found this easily with the 'file' command. I had little time this morning but will have some later to improve the code, maybe integrate the engine and make it useful, been awhile and I forget how the func file works Laughing
widget.png
 Description   I deliberately used a very colorful image as the background
 Filesize   182.1 KB
 Viewed   1175 Time(s)

widget.png


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

Joined: 05 Aug 2007
Posts: 1669
Location: Baltimore, Maryland USA

PostPosted: Tue 06 Dec 2011, 01:49    Post_subject: Error  

When I install pwidgets in Fluppy13 I can not access the program from the icon in the desktop area. Entering pwidgets from the command line gives me:

/usr/local/pwidgets/pwidgets: line 26: type: gtkdialog4: not found
/usr/local/pwidgets/pwidgets: line 209: gtkdialog: command not found


When I remove pwidigts 2.40 I see this:

pwidgits 2.38

Thom
Back to top
View user's profile Send_private_message Visit_website 
davids45


Joined: 26 Nov 2006
Posts: 627
Location: Chatswood, NSW

PostPosted: Tue 06 Dec 2011, 03:02    Post_subject:  

G'day,

Pwidgets-2.4.0 and 01micko's post seem to fix the problems I raised in my previous post, except the Cpu_bar widget that, once Applied, still has a config file with nothing after TEXT so nothing shows. 01micko's pet did not appear to fix the loss of TEXT. This computer has dual processors.

However, I'm happy to fix this by amalgamating the RAM_bar and CPU_bar widget text entries with the Space_Puppy widget config so in the one widget I can see the file space, the RAM use, and how the two CPUs are running, all in bar format.

Opting for ticking the UTF-8 box of the start-up dialog removed the unwanted A from the temperature display of the weather widget.

Thanks all.

David S.
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Tue 06 Dec 2011, 09:12    Post_subject:  

Dear akash_rawal,

Please try my picscale for scaling pngs (it is tiny - around 42k) and will scale your png files - and many other image types - without any additional dependencies http://bkhome.org/blog/?viewDetailed=02375. And picscale preserves transparency, which is why I wrote it in the first place.

Concerning your additon to the gtk rc file, I get the following message:

Code:
/root/.gtkrc.mine:31: Background image options specified without filename


I did supply a fully qualified filename (e.g. /root/my-documents/backgrounds/blank-128.png". DO you know why gtk cannot find it?

With kind regards,
vovchik
Back to top
View user's profile Send_private_message 
askanthea

Joined: 24 Jun 2008
Posts: 38

PostPosted: Tue 06 Dec 2011, 09:30    Post_subject: Pwidgets - addition of facebook and twitter
Sub_title: has anyone written these widgets or plugins yet
 

I've had a good look and nothing about these - lots of clock and temp gauges etc, i just wondered if anyone had attempted it? Ive got a java one i use in a local html window at the moment?

Cheers

Andy x
Back to top
View user's profile Send_private_message 
01micko


Joined: 11 Oct 2008
Posts: 7782
Location: qld

PostPosted: Tue 06 Dec 2011, 09:35    Post_subject:  

Hello vovchik

Quote:
I did supply a fully qualified filename (e.g. /root/my-documents/backgrounds/blank-128.png". DO you know why gtk cannot find it?


However, you have to set the "pixmap_path" in order for gtk to find the image. (see my above example)

HTH

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


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Tue 06 Dec 2011, 10:15    Post_subject:  

Thanks 01micko!

It all works. The rc file wants pixmap_path first and then just the pic filename later in that widget construct. Got it!

With kind regards,
vovchik

Edited_time_total
Back to top
View user's profile Send_private_message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Tue 06 Dec 2011, 10:28    Post_subject:  

Vovchik
Please come and post some of your gems, and update your Bacon posts at puppylinux.info

/aside
Others....don't be shy, we're still going, humming along nicely, with improvements being made all the time Very Happy
Why not come and test Joe's bb2bbpress script that enables easy transfer of murga-linux posts to puppylinux.info
It is a work-in-progress, but we've set up a scratchpad to try it
http://puppylinux.info/topic/translate-my-murga-code-to-pupplinuxinfo
Sorry for the interruption....carry on Wink

thanks

Aitch Smile
Back to top
View user's profile Send_private_message 
akash_rawal

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Tue 06 Dec 2011, 12:55    Post_subject:  

01micko wrote:

Here we go.. the gtkdialog widget engine

Great job 01micko. The only concerned thing is a considerable overhead during startup ... but that can be minimized by using single window to draw all widgets. We can draw entire sidebar using a single window aligned at the edge, and then widgets inside it (goodbye ROX-Filer). It would be easier to write widgets too, as there's no need to write full gtkdialog code and GTK will manage positions of widgets in the sidebar.

But I have found a problem with xonclock:

Clicking on xonclock makes gtkdialog widget invisible, don't know why.

Also, in some puppies, pamcut is actually pnmcut.
Back to top
View user's profile Send_private_message 
01micko


Joined: 11 Oct 2008
Posts: 7782
Location: qld

PostPosted: Tue 06 Dec 2011, 17:34    Post_subject:  

Hi akash_rawal

Yes, I see your point. Of course 1 gtkdialog process would be much more efficient but I do see a problem with the analog clock. You know it's probably possible to write a gtkdialog clock as we can refresh gui with the timer widget and have angled text in the latest gtkdialog by thunor. The only problem would be the clock face background which could be overcome by blending the clock face into the wallpaper/sidebar background.

I have actually integrated the transparent Search_files widget into Pwidgets not without it's problems though, but I'm getting close. It is an easy one though as the gtkdialog code for it is static in that no variables have to be parsed to get the widget on screen. I have added to /usr/local/pwidgets "func_gtk_trans", modified "func" and the widget config and script, and modified /usr/sbin/fixwidgets to kill process cleanly.. I'll post a tarball later.

Also, the Search_file widget inherits the gtktheme we set up, which is kind of cool, but maybe not wanted.

To be honest I think this is worthy of a new project.
sidebar.png
 Description   
 Filesize   85.78 KB
 Viewed   1030 Time(s)

sidebar.png


_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 201 of 205 Posts_count   Goto page: Previous 1, 2, 3, ..., 199, 200, 201, 202, 203, 204, 205 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:  

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.1589s ][ Queries: 13 (0.0634s) ][ GZIP on ]