PDA

View Full Version : Control Panel for Eee PC



jfbilodeau
April 26th, 2008, 12:26 AM
For anyone who is interested, I created a little control panel for an Eee PC running [eee][X|K]ubuntu that takes advantage of the eee kernel module (http://code.google.com/p/eeepc-linux/).

This is actually my first time using Gtk, Glade and creating a .deb package.

It's functional, but the code is not very clean (lack of constants and duplicate code). However, being new to Gtk, and not having a working Internet connection during most of the development work, I know there's plenty of room for improvement in the way I'm using Gtk.

Screenshots:
http://chronogears.com/eeectl/eeectl-tooltip.png
http://chronogears.com/eeectl/eeectl-control.png

Debian package:
http://chronogears.com/eeectl/eeectl_0.1-1_i386.deb
Source Tarball:
http://chronogears.com/eeectl/eeectl-0.1.tar.bz2

Hope you enjoy!

J-F

mike_g
April 26th, 2008, 02:00 PM
Nice :) I was thinking of making the same sort of thing, but it never got past being an idea. Been busy with other stuff lately. Anyway I'll have a play around with it later when I'm on my eee.

Can+~
April 26th, 2008, 09:48 PM
It's functional, but the code is not very clean (lack of constants and duplicate code).

I suggest you to use a configuration file for constants, something easy like, instead of the hard coded way.


constant1=value
constant2=value

Also, have you tried the latest Glade? It doesn't produce C any more, it just generates a .glade (which is on XML). It could tidy up all that mess of gtk library there. I recommend it, because I use glade+python.

Wish I had an EeePeeCee to try it :(.

jfbilodeau
April 27th, 2008, 01:12 AM
Also, have you tried the latest Glade? It doesn't produce C any more, it just generates a .glade (which is on XML). It could tidy up all that mess of gtk library there. I recommend it, because I use glade+python.

Thanks for the suggestions. I used Glade 3.4, which generated an XML file. The rest of the GTK code was to create a GtkStatusIcon which, as far as I can tell, cannot be defined in Glade. Also, correct me if I'm wrong, but the only way I could see to control the content of the Glade file is through the Gtk APIs.

As for the constants, I agree 100%. I would also want to look at gettext to ensure that it can easily be localized.

Thanks, and have a great day,

J-F