[gnome-control-center] user-accounts/crop-area: Enforce a minimum size
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts/crop-area: Enforce a minimum size
- Date: Wed, 7 Jan 2015 15:48:57 +0000 (UTC)
commit ca7421efa219632c13c65a27b92f30f4ca28e7c9
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Nov 28 19:38:32 2014 +0100
user-accounts/crop-area: Enforce a minimum size
Otherwise, since the dialog is resizable, users could resize us so
small that we'd crash inside gdk_pixbuf_scale() .
https://bugzilla.gnome.org/show_bug.cgi?id=740986
panels/user-accounts/cc-crop-area.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/panels/user-accounts/cc-crop-area.c b/panels/user-accounts/cc-crop-area.c
index 2ca8372..66bbd3d 100644
--- a/panels/user-accounts/cc-crop-area.c
+++ b/panels/user-accounts/cc-crop-area.c
@@ -681,6 +681,14 @@ cc_crop_area_button_release_event (GtkWidget *widget,
}
static void
+cc_crop_area_set_size_request (CcCropArea *area)
+{
+ gtk_widget_set_size_request (GTK_WIDGET (area),
+ area->priv->base_width,
+ area->priv->base_height);
+}
+
+static void
cc_crop_area_finalize (GObject *object)
{
CcCropArea *area = CC_CROP_AREA (object);
@@ -733,6 +741,8 @@ cc_crop_area_init (CcCropArea *area)
area->priv->base_width = 48;
area->priv->base_height = 48;
area->priv->aspect = 1;
+
+ cc_crop_area_set_size_request (area);
}
GtkWidget *
@@ -799,6 +809,8 @@ cc_crop_area_set_min_size (CcCropArea *area,
area->priv->base_width = width;
area->priv->base_height = height;
+ cc_crop_area_set_size_request (area);
+
if (area->priv->aspect > 0) {
area->priv->aspect = area->priv->base_width / (gdouble)area->priv->base_height;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]