diff options
author | Colomban Wendling <[email protected]> | 2023-11-15 15:10:11 +0100 |
---|---|---|
committer | Luke from DC <[email protected]> | 2023-11-21 20:19:58 +0000 |
commit | 96c7ebc6dc9e8b8327db04a9570054ee78743353 (patch) | |
tree | 5d600712c7b3c035dbe78045641cdad9e358b91a /mate-panel/panel-widget.c | |
parent | 7632b4fe9bb81a440bdde64c8cc45b15e07b1de8 (diff) | |
download | mate-panel-96c7ebc6dc9e8b8327db04a9570054ee78743353.tar.bz2 mate-panel-96c7ebc6dc9e8b8327db04a9570054ee78743353.tar.xz |
Reduce scope of variables
Mostly found by cppcheck.
Diffstat (limited to 'mate-panel/panel-widget.c')
-rw-r--r-- | mate-panel/panel-widget.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c index dd8f6d11..9a9ce829 100644 --- a/mate-panel/panel-widget.c +++ b/mate-panel/panel-widget.c @@ -1504,7 +1504,6 @@ 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; @@ -1526,7 +1525,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation) id = mate_panel_applet_get_id_by_widget (ad->applet); if (id) { - info = mate_panel_applet_get_by_id (id); + AppletInfo *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, @@ -1672,10 +1671,8 @@ 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; @@ -1683,7 +1680,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation) id = mate_panel_applet_get_id_by_widget (ad->applet); if (id) { - info = mate_panel_applet_get_by_id (id); + AppletInfo *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, @@ -1693,7 +1690,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation) prior_space = ad->constrained; if (list->prev) { - pad = list->prev->data; + AppletData *pad = list->prev->data; prior_space -= pad->constrained + pad->min_cells; } |