gnome-power-manager r2776 - in trunk: . applets/inhibit
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-power-manager r2776 - in trunk: . applets/inhibit
- Date: Thu, 10 Apr 2008 15:32:46 +0100 (BST)
Author: rhughes
Date: Thu Apr 10 15:32:46 2008
New Revision: 2776
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=2776&view=rev
Log:
2008-04-10 Richard Hughes <richard hughsie com>
* applets/inhibit/inhibit-applet.c: (gpm_applet_check_size),
(gpm_applet_click_cb):
Watch the panel size in case we resize the panel and need to change the icon.
Patch from Ted Gould, many thanks.
Modified:
trunk/ChangeLog
trunk/applets/inhibit/inhibit-applet.c
Modified: trunk/applets/inhibit/inhibit-applet.c
==============================================================================
--- trunk/applets/inhibit/inhibit-applet.c (original)
+++ trunk/applets/inhibit/inhibit-applet.c Thu Apr 10 15:32:46 2008
@@ -244,12 +244,20 @@
gpm_applet_get_icon (applet);
gtk_widget_set_size_request (GTK_WIDGET(applet), applet->size, applet->icon_height + 2);
}
+ /* Adjusting incase the icon size has changed */
+ if (GTK_WIDGET(applet)->allocation.height < applet->icon_height + 2) {
+ gtk_widget_set_size_request (GTK_WIDGET(applet), applet->size, applet->icon_height + 2);
+ }
} else {
if (applet->size != GTK_WIDGET(applet)->allocation.height) {
applet->size = GTK_WIDGET(applet)->allocation.height;
gpm_applet_get_icon (applet);
gtk_widget_set_size_request (GTK_WIDGET(applet), applet->icon_width + 2, applet->size);
}
+ /* Adjusting incase the icon size has changed */
+ if (GTK_WIDGET(applet)->allocation.width < applet->icon_width + 2) {
+ gtk_widget_set_size_request (GTK_WIDGET(applet), applet->icon_width + 2, applet->size);
+ }
}
}
@@ -376,6 +384,7 @@
}
/* update icon */
gpm_applet_get_icon (applet);
+ gpm_applet_check_size (applet);
gpm_applet_update_tooltip (applet);
gpm_applet_draw_cb (applet);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]