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 Tue 23 Oct 2018, 09:36
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
pWidgets 2.5.8
Post new topic   Reply to topic View previous topic :: View next topic
Page 215 of 215 [3216 Posts]   Goto page: Previous 1, 2, 3, ..., 213, 214, 215
Author Message
zigbert


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

PostPosted: Sun 01 Apr 2018, 15:23    Post subject:  

To get analog clock work I grabbed a lib from Puppy 4.3.1

/usr/lib/libpng12.so.0.22.0
/usr/lib/libpng12.so.0

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

Joined: 22 Mar 2016
Posts: 60

PostPosted: Sun 01 Apr 2018, 16:19    Post subject:  

Whereas the Calendar widget for April 2018 continues to show properly if Sunday is set as the first day of the week; that was far from true if the first day is set to Monday.

My thanks to Zigbert who has very kindly fixed my problem earlier today with his post near the bottom of page 214:
http://murga-linux.com/puppy/viewtopic.php?p=987345&sid=e9904f9762b0907c3d6cea674a0314a5#987345

The code shown there needed to replace the current code at:
/usr/local/pwidgets/widgets/scripts/Calendar
and the fix is as shown in the screen shot below.
image.png
 Description   
 Filesize   185.19 KB
 Viewed   343 Time(s)

image.png

Back to top
View user's profile Send private message 
davids45


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

PostPosted: Mon 02 Apr 2018, 20:17    Post subject: Calendar alignment
Subject description: Days 1 to 9
 

G'day,

I have a minor problem with the Calendar widget aligning the number dates beneath the day abbreviations.

I looks like the spacing is not including a notional '0' in front of the first 9 numbers so the first two lines are shortened losing alignment to the day headings (screenshot).

Having played with the fonts and font-sizes for the widget to no benefit, I think the problem is in the calendar script, presently:

Quote:
#! /bin/sh
# Added by MHHP for compliance with ISO 8601

cal_monday (){
LANG=C CAL=`cal`
echo -e "\n$CAL" | cut -c1-2 | grep -v "^ $" > $HOME/.pwidgets/tmp/cal1
echo "$CAL" | cut -c4- > $HOME/.pwidgets/tmp/cal2
paste -d ' ' $HOME/.pwidgets/tmp/cal2 $HOME/.pwidgets/tmp/cal1 > $HOME/.pwidgets/tmp/cal
}

today(){
DATE=`date +%d`
[ `echo $DATE | cut -c1` = 0 ] && DATE=`date +%d | cut -c2`
}
export -f today
case "$1" in
heading_month)
#build calender here to do it only once
if [ `cat $HOME/.pwidgets/widgets/Calendar | grep WEEK_FIRST_DAY | grep MONDAY` ]; then
cal_monday
else
cal > $HOME/.pwidgets/tmp/cal
fi
#---
head -n1 $HOME/.pwidgets/tmp/cal | awk '{print $1" "$2}'
;;
heading_days)
head -n2 $HOME/.pwidgets/tmp/cal | tail -n1
;;
passed)
today
grep -v '[a-zA-Z]' $HOME/.pwidgets/tmp/cal | grep '[0-9]' | awk -F$DATE ' BEGIN {i=0}
($1 == $0 && i==0) {print $1}($1 != $0 && i==0){i=i+1;print $1}';
;;
today)
today
echo $DATE;
;;
comes)
today
grep -v '[a-zA-Z]' $HOME/.pwidgets/tmp/cal | grep '[0-9]' | awk -F$DATE ' BEGIN {i=1}
(i==0) {print $0}($1 != $0 && i==1){i=i-1;print $2}';
;;
esac


The /tmp/cal file mentioned in the script is OK if viewed in geany (screenshot) but when copied (ctrl-c) comes up the same as the widget display:

Quote:
April 2018
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30


Complications:
I'm using pwidgets modified/beautified by forum member Moat although the calendar widget looks pristine (I added Osmo tasks to the TEXT section which displays below the calendar).
The widget files are stored on my data partition and most Pups' widgets just run via links to these files (such as the screenshot which is from a frugal bionicpup+12). Changing the config in one Pup then affects all the others sharing pwidgets.
This may be a part of my problem if no one else sees calendar mis-aligning in their pwidgets.
For the few Pups that have individually installed pwidgets (no shared links), the calendar is generally well set out and stable.

Thanks for any advice.

David S.
widget-calendar.jpg
 Description   mis-aligned first rows in calendar widget
 Filesize   113.73 KB
 Viewed   271 Time(s)

widget-calendar.jpg

tmp-cal-file-viewed-in-geany.png
 Description   
 Filesize   26.94 KB
 Viewed   263 Time(s)

tmp-cal-file-viewed-in-geany.png

Back to top
View user's profile Send private message 
zigbert


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

PostPosted: Wed 04 Apr 2018, 17:05    Post subject:  

David
I think you calendar-issue is related to fonts. It looks to me like the font in your screenshot is not monospace.

I just checked my latest calendar-widget in Bionic, and it looks great...

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


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

PostPosted: Wed 04 Apr 2018, 17:32    Post subject:  

Kernel info in the 'Puppylinux' widget may give alignment issues if string is too long. The info is grabbed by the uname -r command in /usr/local/pwidgets/widgets/configs/Puppylinux
Code:
# uname -r
4.9.92-lxpup-32-pae

to fix this, I have stripped the result
Code:
uname -r | cut -d'-' -f1

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


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

PostPosted: Thu 05 Apr 2018, 00:08    Post subject: Two fixes successful  

G'day zigbert,

Thanks for taking time to look at my pwidgets issues.

With your confirmation Calendar is good with the right font (monofont.ttf), I found, with all my recent "playing around" with fonts links, the monofont TF file was missing Embarassed .

I had a similar problem with pdingobats2 which also didn't seem to work in Pups on sda1 via a symlink of the font file from my data partition sda5.

Copying the complete/original ttf files to /usr/share/font/default/TTF in each Pup seems to fix the widget display.

And thank you mind-reading my un-posted concern ( Shocked ) about the long kernel text string in some Pups so the widget panel becomes a bit wide and untidy.

Your script edit works Very Happy .

David S.
PuppyLinuxWidgetFixed.jpg
 Description   PuppyLinux and Calendar widgets fixed (Bionic1804-1)
 Filesize   62.24 KB
 Viewed   217 Time(s)

PuppyLinuxWidgetFixed.jpg

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 215 of 215 [3216 Posts]   Goto page: Previous 1, 2, 3, ..., 213, 214, 215
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.0810s ][ Queries: 15 (0.0142s) ][ GZIP on ]