Thanks. Here are a few comments: - The gtk... namespace for widgets is reserved for the gtk toolkit itself, and should not be used for 3rd party widgets. (Yes, I have done the same mistake myself with my GtkImageViewer widget, but I promise that I will not repeat it!) - The gdk_draw_... functions are considered obsolete and you should use cairo for drawing instead. (I'm surprised that gtk_paint_polygon is still considered up-to-date though it does not use cairo.) Using cairo will also make the compass more aesthetic, as cairo uses anti-aliasing, which is very noticible for something like a compass that has a lot of angles other than 0 and 90°. - The contents of the publically viewable _GtkCompass class should preferably be hidden into a private instant.
(Personally I prefer using Gob2 or Vala for writing custom widgets, that take care of the latter issues quite transparently. Just write public or private in front of a field.) Regards, Dov On Mon, Jan 11, 2010 at 14:11, Leon Opit <[email protected]> wrote: > Dear All, > > Not sure if its acceptable list policy (excuse me if its not). > > Attached is a simple compass widget. I created this by modifying the dial > widget from the tutorial. > I created it for use on my little ketch Wind Roamer. It will be driven by > the NMEA app that collects all the boat data available on the NMEA buses > (wind direction, course, heading, AIS targets etc). These data will be > logged and and displayed on the fore and aft berths allowing the off-watch > crew member (there are only two of us!) to keep an eye on things when > resting. > > Hope its useful to others. > Thanks to the writers of the GTK tutorial. > > Leon > (S.V. Wind Roamer II) > > > > > _______________________________________________ > gtk-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/gtk-list > >
_______________________________________________ gtk-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtk-list
