diff options
author | Colomban Wendling <[email protected]> | 2023-11-15 15:10:11 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2024-02-04 18:37:58 +0100 |
commit | 62fabfc793b545250dafaf37f75650cbfdce095f (patch) | |
tree | 813bd86b3926f24be1f17a1830f2f3d65fd4ec8a /mate-panel/button-widget.c | |
parent | f98be9734446e1b620312b69dc8fa8ed0f0997d9 (diff) | |
download | mate-panel-62fabfc793b545250dafaf37f75650cbfdce095f.tar.bz2 mate-panel-62fabfc793b545250dafaf37f75650cbfdce095f.tar.xz |
Reduce scope of variables
Mostly found by cppcheck.
origin commit was:
https://github.com/mate-desktop/mate-panel/commit/96c7ebc
Diffstat (limited to 'mate-panel/button-widget.c')
-rw-r--r-- | mate-panel/button-widget.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mate-panel/button-widget.c b/mate-panel/button-widget.c index 43d432a9..00753b99 100644 --- a/mate-panel/button-widget.c +++ b/mate-panel/button-widget.c @@ -161,8 +161,6 @@ button_widget_unset_surfaces (ButtonWidget *button) static void button_widget_reload_surface (ButtonWidget *button) { - GdkDisplay *display; - gint scale; button_widget_unset_surfaces (button); button->priv->needs_move = FALSE; @@ -170,7 +168,9 @@ button_widget_reload_surface (ButtonWidget *button) return; if (button->priv->filename != NULL && button->priv->filename [0] != '\0') { - char *error = NULL; + GdkDisplay *display; + gint scale; + char *error = NULL; /* icons findable in the icon theme can be handled by gtk directly*/ display = gdk_display_get_default (); scale = gtk_widget_get_scale_factor (GTK_WIDGET (button)); |