[gnome-panel/gnome-3-8] panel: fix check_resize_function
- From: Philipp Kaluza <phk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/gnome-3-8] panel: fix check_resize_function
- Date: Tue, 8 Jul 2014 17:52:41 +0000 (UTC)
commit 4511f4466df0b163906794b4a32196226ccf90f3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Oct 7 12:32:42 2013 +0300
panel: fix check_resize_function
gnome-panel/panel-toplevel.c | 15 ++++++---------
gnome-panel/panel-widget.c | 8 --------
2 files changed, 6 insertions(+), 17 deletions(-)
---
diff --git a/gnome-panel/panel-toplevel.c b/gnome-panel/panel-toplevel.c
index b1b6f80..5f93a2a 100644
--- a/gnome-panel/panel-toplevel.c
+++ b/gnome-panel/panel-toplevel.c
@@ -2679,7 +2679,6 @@ static void
panel_toplevel_check_resize (GtkContainer *container)
{
GtkAllocation allocation;
- GtkAllocation widget_allocation;
GtkRequisition requisition;
GtkWidget *widget;
@@ -2688,17 +2687,15 @@ panel_toplevel_check_resize (GtkContainer *container)
if (!gtk_widget_get_visible (widget))
return;
- requisition.width = -1;
- requisition.height = -1;
-
gtk_widget_get_preferred_size (widget, &requisition, NULL);
- gtk_widget_get_allocation (widget, &widget_allocation);
+ gtk_widget_get_allocation (widget, &allocation);
- if (widget_allocation.width != requisition.width ||
- widget_allocation.height != requisition.height)
- return;
+ if (allocation.width != requisition.width || allocation.height != requisition.height)
+ {
+ allocation.width = requisition.width;
+ allocation.height = requisition.height;
+ }
- allocation = widget_allocation;
gtk_widget_size_allocate (widget, &allocation);
}
diff --git a/gnome-panel/panel-widget.c b/gnome-panel/panel-widget.c
index b598779..faa9798 100644
--- a/gnome-panel/panel-widget.c
+++ b/gnome-panel/panel-widget.c
@@ -1286,14 +1286,6 @@ panel_widget_size_request(GtkWidget *widget, GtkRequisition *requisition)
}
}
-
- if (!panel->packed) {
- if (panel->orient == GTK_ORIENTATION_HORIZONTAL)
- requisition->width = panel->size;
- else
- requisition->height = panel->size;
- }
-
dont_fill = panel->packed && panel->nb_applets_size_hints != 0;
if (panel->orient == GTK_ORIENTATION_HORIZONTAL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]