summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-09-26 17:49:05 +0200
committerWolfgang Ulbrich <[email protected]>2015-09-26 17:49:05 +0200
commit47e68c0dc594e3d99e7955e569aa3c20f777e446 (patch)
treea0d8886717a48f9b7e973bc75bfc419cef472110
parentbac8cb18598416a7caaf3c3325f28e12563aab00 (diff)
parent23c9fb28d40b956c286da6a11ccc5ace5f36ec91 (diff)
downloadmate-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.c10
-rw-r--r--mate-panel/panel-toplevel.c2
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);