From e663fbaeba760003b4088e567af0883534891e59 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 28 Jan 2024 02:53:56 +0100 Subject: Revert "Reduce scope of variables" This reverts commit 96c7ebc6dc9e8b8327db04a9570054ee78743353. --- mate-panel/panel-widget.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mate-panel/panel-widget.c') diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c index 9a9ce829..dd8f6d11 100644 --- a/mate-panel/panel-widget.c +++ b/mate-panel/panel-widget.c @@ -1504,6 +1504,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation) AppletData *ad = list->data; GtkRequisition chreq; const char *id; + AppletInfo *info; int position = ad->pos; PanelObjectEdgeRelativity edge_relativity = PANEL_EDGE_START; gboolean right_stuck = FALSE; @@ -1525,7 +1526,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation) id = mate_panel_applet_get_id_by_widget (ad->applet); if (id) { - AppletInfo *info = mate_panel_applet_get_by_id (id); + info = mate_panel_applet_get_by_id (id); position = g_settings_get_int (info->settings, PANEL_OBJECT_POSITION_KEY); edge_relativity = g_settings_get_enum (info->settings, @@ -1671,8 +1672,10 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation) if (ad->expand_major) { const char *id; + AppletInfo *info; PanelObjectEdgeRelativity edge_relativity = PANEL_EDGE_START; gboolean right_stuck; + AppletData *pad; int prior_space; int following_space; int additional_space; @@ -1680,7 +1683,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation) id = mate_panel_applet_get_id_by_widget (ad->applet); if (id) { - AppletInfo *info = mate_panel_applet_get_by_id (id); + info = mate_panel_applet_get_by_id (id); edge_relativity = g_settings_get_enum (info->settings, PANEL_OBJECT_RELATIVE_TO_EDGE_KEY); right_stuck = g_settings_get_boolean (info->settings, @@ -1690,7 +1693,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation) prior_space = ad->constrained; if (list->prev) { - AppletData *pad = list->prev->data; + pad = list->prev->data; prior_space -= pad->constrained + pad->min_cells; } -- cgit v1.2.1