summaryrefslogtreecommitdiff
path: root/applets/notification_area/na-grid.c
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2023-11-15 15:10:11 +0100
committerLuke from DC <[email protected]>2023-11-21 20:19:58 +0000
commit96c7ebc6dc9e8b8327db04a9570054ee78743353 (patch)
tree5d600712c7b3c035dbe78045641cdad9e358b91a /applets/notification_area/na-grid.c
parent7632b4fe9bb81a440bdde64c8cc45b15e07b1de8 (diff)
downloadmate-panel-96c7ebc6dc9e8b8327db04a9570054ee78743353.tar.bz2
mate-panel-96c7ebc6dc9e8b8327db04a9570054ee78743353.tar.xz
Reduce scope of variables
Mostly found by cppcheck.
Diffstat (limited to 'applets/notification_area/na-grid.c')
-rw-r--r--applets/notification_area/na-grid.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/applets/notification_area/na-grid.c b/applets/notification_area/na-grid.c
index 9698be6c..9a4c45d9 100644
--- a/applets/notification_area/na-grid.c
+++ b/applets/notification_area/na-grid.c
@@ -317,8 +317,6 @@ na_grid_realize (GtkWidget *widget)
NaGrid *self = NA_GRID (widget);
GdkScreen *screen;
GdkDisplay *display;
- GtkOrientation orientation;
- NaHost *tray_host;
GSettings *settings;
GTK_WIDGET_CLASS (na_grid_parent_class)->realize (widget);
@@ -328,6 +326,9 @@ na_grid_realize (GtkWidget *widget)
screen = gtk_widget_get_screen (GTK_WIDGET (self));
if (GDK_IS_X11_DISPLAY (display))
{
+ GtkOrientation orientation;
+ NaHost *tray_host;
+
orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (self));
tray_host = na_tray_new_for_screen (screen, orientation);
g_object_bind_property (self, "orientation",