[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Fix various warnings
noreply at xfce.org
noreply at xfce.org
Wed Dec 27 23:13:18 CET 2017
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-power-manager.
commit 7d582046a3b2304b2ce03bdbcd69994dae63ea54
Author: Viktor Odintsev <ninetls at xfce.org>
Date: Wed Dec 27 23:12:25 2017 +0100
Fix various warnings
Some are related to Gtk3.22, some are simply compiler warnings.
---
common/xfpm-common.c | 26 +++++++++++++---------
.../xfce/xfce-power-manager-plugin.c | 6 ++---
settings/xfpm-settings-app.c | 2 +-
src/xfpm-main.c | 1 +
4 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/common/xfpm-common.c b/common/xfpm-common.c
index b0bb475..243baf2 100644
--- a/common/xfpm-common.c
+++ b/common/xfpm-common.c
@@ -117,24 +117,30 @@ xfpm_about (gpointer data)
gboolean xfpm_is_multihead_connected (void)
{
GdkDisplay *dpy;
+#if !GTK_CHECK_VERSION (3, 22, 0)
GdkScreen *screen;
+#endif
gint nmonitor;
dpy = gdk_display_get_default ();
+#if !GTK_CHECK_VERSION (3, 22, 0)
+ nmonitor = 1;
screen = gdk_display_get_screen (dpy, 0);
if ( screen )
- {
nmonitor = gdk_screen_get_n_monitors (screen);
- if ( nmonitor > 1 )
- {
- g_debug ("Multiple monitor connected");
- return TRUE;
- }
- else
- {
- return FALSE;
- }
+#else
+ nmonitor = gdk_display_get_n_monitors (dpy);
+#endif
+
+ if ( nmonitor > 1 )
+ {
+ g_debug ("Multiple monitor connected");
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
}
return FALSE;
diff --git a/panel-plugins/power-manager-plugin/xfce/xfce-power-manager-plugin.c b/panel-plugins/power-manager-plugin/xfce/xfce-power-manager-plugin.c
index 2c3f8d2..32ab1f9 100644
--- a/panel-plugins/power-manager-plugin/xfce/xfce-power-manager-plugin.c
+++ b/panel-plugins/power-manager-plugin/xfce/xfce-power-manager-plugin.c
@@ -134,17 +134,15 @@ power_manager_plugin_combo_changed (GtkComboBox *combo,
xfconf_channel_set_int (channel, PROPERTIES_PREFIX SHOW_PANEL_LABEL, show_panel_label);
}
-void
+static void
power_manager_plugin_configure (XfcePanelPlugin *plugin,
PowerManagerPlugin *power_manager_plugin)
{
GtkWidget *dialog;
- GtkWidget *grid, *combo, *label, *check;
- GtkAdjustment *adjustment;
+ GtkWidget *grid, *combo, *label;
gint show_panel_label;
XfconfChannel *channel;
GtkListStore *list_store;
- GtkTreePath *path;
GtkTreeIter iter, active_iter;
GtkCellRenderer *cell;
gint i;
diff --git a/settings/xfpm-settings-app.c b/settings/xfpm-settings-app.c
index 72c48a1..9da47da 100644
--- a/settings/xfpm-settings-app.c
+++ b/settings/xfpm-settings-app.c
@@ -196,7 +196,6 @@ xfpm_settings_app_launch (GApplication *app)
if (start_xfpm_if_not_running == GTK_RESPONSE_YES)
{
GAppInfo *app_info;
- GError *error = NULL;
app_info = g_app_info_create_from_commandline ("xfce4-power-manager", "Xfce4 Power Manager",
G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION, NULL);
@@ -204,6 +203,7 @@ xfpm_settings_app_launch (GApplication *app)
if (error != NULL) {
g_warning ("xfce4-power-manager could not be launched. %s", error->message);
g_error_free (error);
+ error = NULL;
}
}
/* wait 2 seconds for xfpm to startup */
diff --git a/src/xfpm-main.c b/src/xfpm-main.c
index 6e60d2f..d2621c2 100644
--- a/src/xfpm-main.c
+++ b/src/xfpm-main.c
@@ -129,6 +129,7 @@ xfpm_dump (GHashTable *hash)
"%s: %s\n"
"%s: %s\n"
"%s: %s\n"
+ "%s: %s\n"
"%s: %s\n",
_("Can suspend"),
xfpm_bool_to_local_string (can_suspend),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list