Pete's Log: life is fun when...
Entry #805, (Coding, Hacking, & CS stuff)(posted when I was 22 years old.)
you get booted off the OIT modem pool because you've been connected for 8 hours... and then spend another hour coding after reconnecting...
I've finally been able to really dive back into pgtc again. I'm kinda re-architecting the entire program from scratch. The old one was buggy in various odd ways. And it wasn't very well-designed. So I'm having fun. I'm borrowing a lot of code from the old pgtc, of course. But a lot is being rewritten. So the biggest change: pgtc is gonna come in two flavors: pgtc, which will now be a regular gnome application, and pgtc-applet, which will be a gnome panel applet. Both will share a lot of code. So far today I've written up a good amount of code:
- a function that returns the idle time of the x display.
This code was actually primarily stolen from gaim (credit given, etc... yay GPL!) and is very simple (maybe 20 lines or so). But I had a pgtc user request a feature where one can set an idle punchout time so that after a certain idle period the user will be punched out automatically. - about dialog box. mainly stolen from old pgtc. important stuff
- pgtc application window with menus
this is all new code. I was quite impressed with how easy it is to create menus in gnome apps these days. I remember long ago creating menus by hand like a fool. Then I discovered the gtk itemfactorys or whatever they were called. and now this, which is even cooler. it's so easy. - pgtc preferences system
preferences are saved and loaded using gnome_config, and can be edited through a gnome property dialog window. some of this code stolen from old pgtc.
as I write this, there's been yet another download of pgtc 0.2.0.
ok, maybe another 30-60 minutes of coding, then it's sleepy time.