[Goodies-commits] r3845 - xfce4-fsguard-plugin/trunk/panel-plugin
Brian J. Tarricone
bjt23 at cornell.edu
Thu Jan 24 00:01:55 CET 2008
Hey Mike,
Mike Massonnet wrote:
> Modified: xfce4-fsguard-plugin/trunk/panel-plugin/fsguard.c
> ===================================================================
> --- xfce4-fsguard-plugin/trunk/panel-plugin/fsguard.c 2008-01-23 21:49:27 UTC (rev 3844)
> +++ xfce4-fsguard-plugin/trunk/panel-plugin/fsguard.c 2008-01-23 22:22:41 UTC (rev 3845)
> @@ -71,7 +71,7 @@
> {
> XfcePanelPlugin *plugin;
> gboolean seen;
> - gint icon_id;
> + volatile gint icon_id;
You're almost certainly not using 'volatile' correctly here. I don't
see any use of that var in your code that would require it, and you're
only damaging the compiler's ability to do optimisation by using it.
Why do you think you need it?
> fsguard->icon_id = id;
> - size = xfce_panel_plugin_get_size (fsguard->plugin);
> - size -= 2 * MAX (fsguard->btn_panel->style->xthickness,
> - fsguard->btn_panel->style->ythickness);
> + size = xfce_panel_plugin_get_size (fsguard->plugin);
> + size -= 2 + 2 * MAX (fsguard->btn_panel->style->xthickness,
> + fsguard->btn_panel->style->ythickness);
Better would be to figure out what other gtk style property is causing
the extra padding and figure that into your calculations. We of course
have no idea what other themes/theme engines might do while drawing. My
guess would be that, in looking at the thickness of the button, you're
forgetting to also look at any padding added around the button (like in
the button's container). These sizing things are so annoying :-( .
-brian
More information about the Xfce4-dev
mailing list