[gnome-calendar/calendar-editor] source-dialog: shrink dialog height when mode changes
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] source-dialog: shrink dialog height when mode changes
- Date: Wed, 25 Mar 2015 01:44:53 +0000 (UTC)
commit 4c900523f58b155c4c27d8a29c4797571f8582ca
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Mar 24 22:44:30 2015 -0300
source-dialog: shrink dialog height when mode changes
src/gcal-source-dialog.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 17d07d8..5022a27 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -630,6 +630,7 @@ gcal_source_dialog_set_mode (GcalSourceDialog *dialog,
{
GcalSourceDialogPrivate *priv = dialog->priv;
gboolean edit_mode;
+ gint window_width;
priv->mode = mode;
edit_mode = (mode == GCAL_SOURCE_DIALOG_MODE_EDIT);
@@ -660,6 +661,13 @@ gcal_source_dialog_set_mode (GcalSourceDialog *dialog,
G_BINDING_DEFAULT);
}
}
+
+ /*
+ * Resize the window to the smallest possible
+ * size.
+ */
+ gtk_window_get_size (GTK_WINDOW (dialog), &window_width, NULL);
+ gtk_window_resize (GTK_WINDOW (dialog), window_width, 1);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]