summaryrefslogtreecommitdiff
path: root/src/gpm-tray-icon.c
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-10-24 19:56:51 +0800
committerraveit65 <[email protected]>2023-11-06 12:56:20 +0100
commit688ec2f47167fcca1c3e14854b69640479422794 (patch)
tree4f4f2a806da2dca2bfc13aea2a74fa0a08fdb4a4 /src/gpm-tray-icon.c
parent9a8cfd772538539776654401d7a1293595405c90 (diff)
downloadmate-power-manager-688ec2f47167fcca1c3e14854b69640479422794.tar.bz2
mate-power-manager-688ec2f47167fcca1c3e14854b69640479422794.tar.xz
Remove compilation warning fix data type format error
Diffstat (limited to 'src/gpm-tray-icon.c')
-rw-r--r--src/gpm-tray-icon.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpm-tray-icon.c b/src/gpm-tray-icon.c
index d4055f1..607b762 100644
--- a/src/gpm-tray-icon.c
+++ b/src/gpm-tray-icon.c
@@ -338,6 +338,10 @@ gpm_tray_icon_create_menu (GpmTrayIcon *icon)
guint dev_cnt = 0;
GPtrArray *array;
UpDevice *device = NULL;
+ GtkStyleContext *context;
+ GtkWidget *toplevel;
+ GdkScreen *screen;
+ GdkVisual *visual;
/* show the primary device time remaining */
device = gpm_engine_get_primary_device (icon->priv->engine);
@@ -380,13 +384,12 @@ gpm_tray_icon_create_menu (GpmTrayIcon *icon)
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
/*Set up custom panel menu theme support-gtk3 only */
- GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (menu));
+ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (menu));
/* Fix any failures of compiz/other wm's to communicate with gtk for transparency in menu theme */
- GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(toplevel));
- GdkVisual *visual = gdk_screen_get_rgba_visual(screen);
+ screen = gtk_widget_get_screen(GTK_WIDGET(toplevel));
+ visual = gdk_screen_get_rgba_visual(screen);
gtk_widget_set_visual(GTK_WIDGET(toplevel), visual);
/* Set menu and its toplevel window to follow panel theme */
- GtkStyleContext *context;
context = gtk_widget_get_style_context (GTK_WIDGET(toplevel));
gtk_style_context_add_class(context,"gnome-panel-menu-bar");
gtk_style_context_add_class(context,"mate-panel-menu-bar");