diff options
author | Wolfgang Ulbrich <[email protected]> | 2015-09-26 17:49:05 +0200 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2015-09-26 17:49:05 +0200 |
commit | 47e68c0dc594e3d99e7955e569aa3c20f777e446 (patch) | |
tree | a0d8886717a48f9b7e973bc75bfc419cef472110 | |
parent | bac8cb18598416a7caaf3c3325f28e12563aab00 (diff) | |
parent | 23c9fb28d40b956c286da6a11ccc5ace5f36ec91 (diff) | |
download | mate-panel-47e68c0dc594e3d99e7955e569aa3c20f777e446.tar.bz2 mate-panel-47e68c0dc594e3d99e7955e569aa3c20f777e446.tar.xz |
Merge pull request #351 from dnk/warnings
eliminate criticals
-rw-r--r-- | mate-panel/button-widget.c | 10 | ||||
-rw-r--r-- | mate-panel/panel-toplevel.c | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/mate-panel/button-widget.c b/mate-panel/button-widget.c index 904ecbe6..57294d44 100644 --- a/mate-panel/button-widget.c +++ b/mate-panel/button-widget.c @@ -654,6 +654,11 @@ button_widget_get_preferred_width (GtkWidget *widget, { ButtonWidget *button_widget = BUTTON_WIDGET (widget); + if (button_widget->priv->pixbuf == NULL ) { + *minimal_width = *natural_width = 1; + return; + } + *minimal_width = *natural_width = gdk_pixbuf_get_width (button_widget->priv->pixbuf); } @@ -664,6 +669,11 @@ button_widget_get_preferred_height (GtkWidget *widget, { ButtonWidget *button_widget = BUTTON_WIDGET (widget); + if (button_widget->priv->pixbuf == NULL ) { + *minimal_height = *natural_height = 1; + return; + } + *minimal_height = *natural_height = gdk_pixbuf_get_height (button_widget->priv->pixbuf); } #else diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c index d8ea8205..acdeb36e 100644 --- a/mate-panel/panel-toplevel.c +++ b/mate-panel/panel-toplevel.c @@ -3095,7 +3095,7 @@ panel_toplevel_realize (GtkWidget *widget) panel_struts_set_window_hint (toplevel); gdk_window_set_group (window, window); - gdk_window_set_geometry_hints (window, NULL, GDK_HINT_POS); + gdk_window_set_geometry_hints (window, NULL, 0); panel_toplevel_initially_hide (toplevel); |