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.
much more remains to be done. I'm very happy with the preferences system now, it works rather well, and I actually spent the time to read a good deal of gnome and gtk docs to figure out the right way to set this up. Of course, there's only two configurable options right now. But I think I may have more later.

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.