summaryrefslogtreecommitdiff
path: root/panel-plugins
diff options
context:
space:
mode:
authorViktor Odintsev <ninetls@xfce.org>2017-09-15 06:07:27 +0300
committerSimon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>2017-10-27 16:32:20 +0200
commitf1a0eebbc3e61e80204d848973de213295344752 (patch)
treede5d1516a6f6b36429a3ce186094b59100ca4a1f /panel-plugins
parentb667211b6acc2de182d1275afc822009c22b0855 (diff)
downloadixfce4-power-manager-f1a0eebbc3e61e80204d848973de213295344752.tar.gz
Fix misc compilation warnings
Diffstat (limited to 'panel-plugins')
-rw-r--r--panel-plugins/power-manager-plugin/power-manager-button.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/panel-plugins/power-manager-plugin/power-manager-button.c b/panel-plugins/power-manager-plugin/power-manager-button.c
index ad3088cf..34b9f9ac 100644
--- a/panel-plugins/power-manager-plugin/power-manager-button.c
+++ b/panel-plugins/power-manager-plugin/power-manager-button.c
@@ -1380,6 +1380,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
static void
display_inhibitors (PowerManagerButton *button, GtkWidget *menu)
{
+ GtkWidget *separator_mi;
gboolean needs_seperator = FALSE;
g_return_if_fail (POWER_MANAGER_IS_BUTTON (button));
@@ -1426,7 +1427,7 @@ display_inhibitors (PowerManagerButton *button, GtkWidget *menu)
if (needs_seperator)
{
/* add a separator */
- GtkWidget * separator_mi = gtk_separator_menu_item_new ();
+ separator_mi = gtk_separator_menu_item_new ();
gtk_widget_show (separator_mi);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), separator_mi);
}
@@ -1437,7 +1438,8 @@ display_inhibitors (PowerManagerButton *button, GtkWidget *menu)
static void
display_inhibitors (PowerManagerButton *button, GtkWidget *menu)
{
- gboolean needs_seperator = FALSE;
+ guint i;
+ GtkWidget *separator_mi;
const gchar **inhibitors;
g_return_if_fail (POWER_MANAGER_IS_BUTTON (button));
@@ -1446,15 +1448,13 @@ display_inhibitors (PowerManagerButton *button, GtkWidget *menu)
inhibitors = xfpm_inhibit_get_inhibit_list (button->priv->inhibit);
if (inhibitors != NULL && inhibitors[0] != NULL)
{
- guint i;
-
for (i=0; inhibitors[i] != NULL; i++)
{
add_inhibitor_to_menu (button, inhibitors[i]);
}
/* add a separator */
- GtkWidget * separator_mi = gtk_separator_menu_item_new ();
+ separator_mi = gtk_separator_menu_item_new ();
gtk_widget_show (separator_mi);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), separator_mi);
}