Various (needed?) windows-related changes

mETz <[email protected]>
Newsgroups gmane.comp.gnome.apps.gkrellm
Message-ID <[email protected]>
Hiho,

I'm currently preparing gkrellm 2.3.1 for windows and ran over a few
problems so far.

First one is a small problem with the strftime-formats proposed by
gkrellm. According to
http://www.cplusplus.com/reference/clibrary/ctime/strftime.html
and
http://msdn2.microsoft.com/en-us/library/fe06s4ak(VS.71).aspx
the default clock and cal formats contain unsupported placeholders. Both
"%l" and "%e" are in neither of the docs stated above and they don't
show up on win32.

As a solution I'm now using two different sets of formats now:

--- Windows:
"%#I:%M <span foreground=\"$A\"><small>%S</small></span>"
"%#I:%M <span foreground=\"$A\"><small>%p</small></span>"	
"%#H:%M <span foreground=\"$A\"><small>%S</small></span>"
"%a <span foreground=\"$A\"><big><big>%#d</big></big></span> %b"
"<big>%a %b <span foreground=\"$A\">%#d</span></big>"
"%a <span foreground=\"cyan2\"><span
font_desc=\"16.5\"><i>%#d</i></span></span> %b"

--- other OSes:
"%l:%M <span foreground=\"$A\"><small>%S</small></span>"
"%l:%M <span foreground=\"$A\"><small>%p</small></span>"	
"%k:%M <span foreground=\"$A\"><small>%S</small></span>"
"%a <span foreground=\"$A\"><big><big>%e</big></big></span> %b"
"<big>%a %b <span foreground=\"$A\">%e</span></big>"
"%a <span foreground=\"cyan2\"><span
font_desc=\"16.5\"><i>%e</i></span></span> %b"

I hope this is ok with everybody as I don't feel like adding support for
unsupported formatting chars on windows :)



Next is a bit more complex. Unfortunately GTK >= 2.12.2 seems to have a
regression regarding GtkCombo (see
http://bugzilla.gnome.org/show_bug.cgi?id=503326). One solution would be
to ship GTK 2.10.x with the windows binaries and recommend that version
for people who want to install GTK+ system-wide but I dislike shipping
outdated GTK+ versions.
As GtkCombo is deprecated for a long time I'm currently porting GKrellM
to use GtkComboBox. The downside of this is that GKrellM will need at
least GTK+ 2.4 which might cause problems on platforms that GKrellM
supports but lack a GTK+ >= 2.4.
Another problem is assertions I see with GTK+ 2.12 when closing the
preferences dialog. I don't know yet if these occur on non-win32 as well:
(gkrellm.exe:1208): GLib-GObject-CRITICAL **: g_object_ref: assertion
`G_IS_OBJECT (object)' failed
(gkrellm.exe:1208): Gtk-CRITICAL **: gtk_widget_destroy: assertion
`GTK_IS_WIDGET (widget)' failed



The last one is rather cosmetic. I never really liked the preferences
dialog that much, it looks quite crowded and "techy". New users I
recommended GKrellM to often were confused by the amount of tabs and
pages so I first had to explain quite a few things to them.
As a first start I'm thinking about the following changes:

- remove the extra groupbox inside every tab, there's a border around
the tabwidget anyway
- provide fileselector buttons for command-fields so people can select
an application to start. At least on windows this is needed because
applications usually aren't found in $PATH. The best way for unix would
be to display the apps found in /usr/share/applications, i.e. parse all
these desktop files. I fear that this will pull in a lot of library
dependencies.
- move all the information from the "Info" tabs into an external help
(maybe docbook based?) and into tooltips. The tab approach is not very
helpful because you need to switch forth and back between the settings-
and the info-tab when you're unfamiliar with the substitution variables

I'd volunteer to do most of this myself but I wanted to discuss this
before wasting hours of time creating huge patches :)


Bye,
Stefan aka mETz

______________________________________________
Gkrellm mailing list
[email protected]
Read archives-join-leave-set RSS feed:
http://archive.lists.netservicesgroup.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.