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 Jan 2019, 06:41
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Gtkdialog calendar widget - sort of
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1748
Location: Japan

PostPosted: Sun 13 Jan 2019, 05:55    Post subject:  Gtkdialog calendar widget - sort of  

Recent threads here and here covered the (busybox) cal command and attempts to replace this tool or find a meaningful purpose for it. I always wondered why this little tool even exists as I could never see a reason to use this CLI calendar. I finally do.

There are plenty of GUI based calendars and most of them use the GtkCalendar widget. Dialog programs like Xdialog and yad support it with their --calendar options. Not so gtkdialog. Though most standard dialogs like file chooser, font chooser and color picker are implemented, the calendar dialog is not.

I therefore tried to construct a gtkdialog based calendar, as a replacement for igucal, the program that pops up when I click on the clock in the JWM tray. Igucal is a variant of minixcal. Both are stable, simple and boring. I need a calendar that can be customized with additional functions.

Below is a barebone version of this exercise. The calendar does nothing more that show the current day and can be used as a first step for a more sophisticated version. It is designed to be opened and closed by clicking on the JWM clock but of course can be opened in any other way. It basically displays the output of the cal command. The script does not use tmp files. All tmp values are kept in hidden text widgets. The script also uses no button widgets, instead makes use of entry widgets and their primary/secondary buttons. Finally I restricted the mark for the current day on the current month/year. In GtkCalendar the day keeps marked even when month or year are changed. I find this odd.
mm_cal.gz
Description  To run script: Unzip script and make executable
gz

 Download 
Filename  mm_cal.gz 
Filesize  1.48 KB 
Downloaded  36 Time(s) 
tray_calendars.png
 Description   
 Filesize   43.58 KB
 Viewed   207 Time(s)

tray_calendars.png

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

Joined: 17 Jan 2013
Posts: 94

PostPosted: Sun 13 Jan 2019, 08:00    Post subject:  

MM: I had a hunch/hope you would implement a calendar in GTKDIALOG. We need that.

Perhaps also a dropdown/notebook-calendar -variant.

I will take a look at the proto/barebone
---
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 915

PostPosted: Sun 13 Jan 2019, 16:27    Post subject:  

For inspiration: I played with the calendar widget and posted source here.
Source is gtk1 though... Smile
Back to top
View user's profile Send private message Visit poster's website 
wiak

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

PostPosted: Mon 14 Jan 2019, 01:06    Post subject:  

goingnuts wrote:
For inspiration: I played with the calendar widget and posted source here.
Source is gtk1 though... Smile


I wish I hadn't found myself just downloading that source code... I'm worried I will decide not to retire from further programming afterall. The problem is, I feel that Puppy Linux in particular tends to use little C programs that are not otherwise well-maintained or supported, or only by their sole authors (such as JWM, ROX-Filer etc, mtpaint, and gtkdialog). I feel therefore that the more Puppy members that take the time to learn a bit C programming (with some, but not a lot Gtk-related knowledge) the better - but... so much effort goes into bash-only (with gtkdialog/yad scripting for gui); if only some of these scripters would put in even a little of their time to mastering a bit C/gtk then they could help future-proof these efficient little C/gtk programs (I'm sure some of these quite expert scripters could be equally good at C/GTK fiddling). I did a little core C-related stuff, but could (should?) have done more, whilst I was able (in terms of maintaining the C skills required..., which I tend to forget over medium-short time alas). Still, I love seeing a bit activity in this C/gtk-related area continuing here on the forum; I notice from other post that work still being done on ROX-filer too, though only one contributer to that too it seems. Team projects naturally inspire more longterm confidence so many thanks to those Puppyists out their that keep the C-programming flags flying!

Anyway, I'm too happy to be out of the programming mindset - have much more time for other pursuits obviously; still, programming was a bit of a drug/stimulant (though feedback not always exactly complimentary or encouraging - some negative attitudes out there too sadly; why? Shouldn't really need encouragement, I suppose... Smile and some feedback very polite and encouraging anyway! Thanks, especially when my own efforts/results were often very much less than perfect... Wink ).

wiak
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
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.0477s ][ Queries: 12 (0.0199s) ][ GZIP on ]