summaryrefslogtreecommitdiff
path: root/applets/notification_area
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2024-01-28 02:53:56 +0100
committerraveit65 <[email protected]>2024-02-04 18:37:58 +0100
commite663fbaeba760003b4088e567af0883534891e59 (patch)
treefd7b6805cc5d0e022f526e6343bb2539aa12f54e /applets/notification_area
parent6a9848eb8388807d13c38cdaceabfc143f6640aa (diff)
downloadmate-panel-e663fbaeba760003b4088e567af0883534891e59.tar.bz2
mate-panel-e663fbaeba760003b4088e567af0883534891e59.tar.xz
Revert "Reduce scope of variables"
This reverts commit 96c7ebc6dc9e8b8327db04a9570054ee78743353.
Diffstat (limited to 'applets/notification_area')
-rw-r--r--applets/notification_area/na-grid.c5
-rw-r--r--applets/notification_area/status-notifier/sn-host-v0.c3
-rw-r--r--applets/notification_area/status-notifier/sn-item-v0.c3
-rw-r--r--applets/notification_area/system-tray/na-tray-manager.c3
4 files changed, 8 insertions, 6 deletions
diff --git a/applets/notification_area/na-grid.c b/applets/notification_area/na-grid.c
index 9a4c45d9..9698be6c 100644
--- a/applets/notification_area/na-grid.c
+++ b/applets/notification_area/na-grid.c
@@ -317,6 +317,8 @@ 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);
@@ -326,9 +328,6 @@ 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",
diff --git a/applets/notification_area/status-notifier/sn-host-v0.c b/applets/notification_area/status-notifier/sn-host-v0.c
index 4ad6b359..64da5da9 100644
--- a/applets/notification_area/status-notifier/sn-host-v0.c
+++ b/applets/notification_area/status-notifier/sn-host-v0.c
@@ -193,6 +193,7 @@ register_host_cb (GObject *source_object,
GError *error;
SnHostV0 *v0;
gchar **items;
+ gint i;
error = NULL;
sn_watcher_v0_gen_call_register_host_finish (SN_WATCHER_V0_GEN (source_object),
@@ -223,7 +224,7 @@ register_host_cb (GObject *source_object,
items = sn_watcher_v0_gen_dup_registered_items (v0->watcher);
if (items) {
- for (gint i = 0; items[i] != NULL; i++)
+ for (i = 0; items[i] != NULL; i++)
add_registered_item (v0, items[i]);
}
diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c
index 9deab9d3..fd963c31 100644
--- a/applets/notification_area/status-notifier/sn-item-v0.c
+++ b/applets/notification_area/status-notifier/sn-item-v0.c
@@ -244,6 +244,7 @@ update (SnItemV0 *v0)
GtkImage *image;
SnTooltip *tip;
gint icon_size;
+ gboolean visible;
const gchar *icon_name;
SnIconPixmap **icon_pixmap;
@@ -361,7 +362,7 @@ update (SnItemV0 *v0)
/* TODO: hide "Passive" items with a setting? */
/*Special case mate-polkit*/
if (g_strcmp0 (v0->status, "password-dialog") != 0){
- gboolean visible = g_strcmp0 (v0->status, "Passive") != 0;
+ visible = g_strcmp0 (v0->status, "Passive") != 0;
gtk_widget_set_visible (GTK_WIDGET (v0), visible);
}
else
diff --git a/applets/notification_area/system-tray/na-tray-manager.c b/applets/notification_area/system-tray/na-tray-manager.c
index 2bb679d8..d4f27ff3 100644
--- a/applets/notification_area/system-tray/na-tray-manager.c
+++ b/applets/notification_area/system-tray/na-tray-manager.c
@@ -537,6 +537,7 @@ na_tray_manager_unmanage (NaTrayManager *manager)
{
#ifdef GDK_WINDOWING_X11
GdkDisplay *display;
+ guint32 timestamp;
GtkWidget *invisible;
GdkWindow *window;
@@ -555,7 +556,7 @@ na_tray_manager_unmanage (NaTrayManager *manager)
if (gdk_selection_owner_get_for_display (display, manager->selection_atom) ==
window)
{
- guint32 timestamp = gdk_x11_get_server_time (window);
+ timestamp = gdk_x11_get_server_time (window);
gdk_selection_owner_set_for_display (display,
NULL,
manager->selection_atom,