[Xfce4-commits] [apps/xfce4-screensaver] 01/01: Improved debug output
noreply at xfce.org
noreply at xfce.org
Thu Nov 22 13:23:25 CET 2018
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e 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 apps/xfce4-screensaver.
commit d7b1914cd0e59a7db4b61cd8de774fcae0a8af93
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Nov 22 07:23:19 2018 -0500
Improved debug output
---
src/gs-fade.c | 2 +-
src/gs-grab-x11.c | 4 ++--
src/gs-job.c | 14 ++++++--------
src/gs-listener-dbus.c | 16 +++++++---------
src/gs-listener-x11.c | 10 +++++++---
src/gs-manager.c | 12 ++++++------
src/gs-window-x11.c | 14 +++++++-------
src/xfce4-screensaver-dialog.c | 2 +-
src/xfce4-screensaver.c | 2 +-
9 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/src/gs-fade.c b/src/gs-fade.c
index 054e3b3..d1c33ee 100644
--- a/src/gs-fade.c
+++ b/src/gs-fade.c
@@ -816,7 +816,7 @@ gs_fade_init (GSFade *fade) {
check_randr_extension (fade);
if (!fade->priv->screen_priv.fade_type)
check_gamma_extension (fade);
- gs_debug ("Fade type: %d", fade->priv->screen_priv.fade_type);
+ // gs_debug ("Fade type: %d", fade->priv->screen_priv.fade_type);
}
static void
diff --git a/src/gs-grab-x11.c b/src/gs-grab-x11.c
index e2a5b62..167eaa1 100644
--- a/src/gs-grab-x11.c
+++ b/src/gs-grab-x11.c
@@ -276,7 +276,7 @@ gs_grab_move (GSGrab *grab,
(guint32) GDK_WINDOW_XID (window));
}
- gs_debug ("*** doing X server grab");
+ gs_debug ("*** Doing X server grab");
gdk_x11_display_grab (display);
old_window = grab->priv->grab_window;
@@ -306,7 +306,7 @@ gs_grab_move (GSGrab *grab,
gs_debug ("Could not grab devices for old window");
}
- gs_debug ("*** releasing X server grab");
+ gs_debug ("*** Releasing X server grab");
gdk_x11_display_ungrab (display);
gdk_display_flush (display);
diff --git a/src/gs-job.c b/src/gs-job.c
index 8de21df..abd92f3 100644
--- a/src/gs-job.c
+++ b/src/gs-job.c
@@ -129,7 +129,7 @@ gs_job_died (GSJob *job) {
g_spawn_close_pid (job->priv->pid);
job->priv->pid = 0;
- gs_debug ("Job died");
+ gs_debug ("Job finished");
}
static void
@@ -220,8 +220,6 @@ nice_process (int pid,
gs_debug ("setpriority(PRIO_PROCESS, %lu, %d) failed",
(unsigned long) pid, nice_level);
}
-#else
- gs_debug ("don't know how to change process priority on this system.");
#endif
}
@@ -368,13 +366,13 @@ command_watch (GIOChannel *source,
status = g_io_channel_read_line (source, &str, NULL, NULL, &error);
if (status == G_IO_STATUS_NORMAL) {
- gs_debug ("command output: %s", str);
+ gs_debug ("Command output: %s", str);
} else if (status == G_IO_STATUS_EOF) {
done = TRUE;
} else if (error != NULL) {
- gs_debug ("command error: %s", error->message);
+ gs_debug ("Command error: %s", error->message);
g_error_free (error);
}
@@ -411,7 +409,7 @@ gs_job_start (GSJob *job) {
g_return_val_if_fail (job != NULL, FALSE);
g_return_val_if_fail (GS_IS_JOB (job), FALSE);
- gs_debug ("starting job");
+ gs_debug ("Starting job");
if (job->priv->pid != 0) {
gs_debug ("Cannot restart active job.");
@@ -457,7 +455,7 @@ gs_job_stop (GSJob *job) {
g_return_val_if_fail (job != NULL, FALSE);
g_return_val_if_fail (GS_IS_JOB (job), FALSE);
- gs_debug ("stopping job");
+ gs_debug ("Stopping job");
if (job->priv->pid == 0) {
gs_debug ("Could not stop job: pid not defined");
@@ -485,7 +483,7 @@ gs_job_suspend (GSJob *job,
g_return_val_if_fail (job != NULL, FALSE);
g_return_val_if_fail (GS_IS_JOB (job), FALSE);
- gs_debug ("suspending job");
+ gs_debug ("Suspending job");
if (job->priv->pid == 0) {
return FALSE;
diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
index b2717fd..67c1b89 100644
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
@@ -691,7 +691,7 @@ listener_add_ref_entry (GSListener *listener,
GSListenerRefEntry *entry) {
GHashTable *hash;
- gs_debug ("adding %s from %s for reason '%s' on connection %s",
+ gs_debug ("Adding %s from %s for reason '%s' on connection %s",
get_name_for_entry_type (entry_type),
entry->application,
entry->reason,
@@ -725,7 +725,7 @@ listener_remove_ref_entry (GSListener *listener,
goto out;
}
- gs_debug ("removing %s from %s for reason '%s' on connection %s",
+ gs_debug ("Removing %s from %s for reason '%s' on connection %s",
get_name_for_entry_type (entry_type),
entry->application,
entry->reason,
@@ -957,7 +957,7 @@ listener_ref_entry_remove_for_connection (GSListener *listener,
while (g_hash_table_iter_next (&iter, NULL, (gpointer *)&entry)) {
if (entry->connection != NULL &&
strcmp (connection, entry->connection) == 0) {
- gs_debug ("removing %s from %s for reason '%s' on connection %s",
+ gs_debug ("Removing %s from %s for reason '%s' on connection %s",
get_name_for_entry_type (entry->entry_type),
entry->application,
entry->reason,
@@ -991,8 +991,6 @@ listener_service_deleted (GSListener *listener,
return;
}
- gs_debug ("DBUS service deleted: %s", new_service_name);
-
removed = listener_ref_entry_remove_for_connection (listener, REF_ENTRY_TYPE_THROTTLE, new_service_name);
if (removed) {
listener_ref_entry_check (listener, REF_ENTRY_TYPE_THROTTLE);
@@ -1474,14 +1472,14 @@ listener_dbus_handle_system_message (DBusConnection *connection,
if (listener->priv->have_systemd) {
if (dbus_message_is_signal (message, SYSTEMD_LOGIND_SESSION_INTERFACE, "Unlock")) {
if (_listener_message_path_is_our_session (listener, message)) {
- gs_debug ("systemd requested session unlock");
+ gs_debug ("Systemd requested session unlock");
gs_listener_set_active (listener, FALSE);
}
return DBUS_HANDLER_RESULT_HANDLED;
} else if (dbus_message_is_signal (message, SYSTEMD_LOGIND_SESSION_INTERFACE, "Lock")) {
if (_listener_message_path_is_our_session (listener, message)) {
- gs_debug ("systemd requested session lock");
+ gs_debug ("Systemd requested session lock");
g_signal_emit (listener, signals[LOCK], 0);
}
@@ -1658,7 +1656,7 @@ gs_listener_dbus_init (GSListener *listener) {
listener->priv->connection = dbus_bus_get (DBUS_BUS_SESSION, &error);
if (listener->priv->connection == NULL) {
if (dbus_error_is_set (&error)) {
- gs_debug ("couldn't connect to session bus: %s",
+ gs_debug ("Couldn't connect to session bus: %s",
error.message);
dbus_error_free (&error);
}
@@ -1673,7 +1671,7 @@ gs_listener_dbus_init (GSListener *listener) {
listener->priv->system_connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
if (listener->priv->system_connection == NULL) {
if (dbus_error_is_set (&error)) {
- gs_debug ("couldn't connect to system bus: %s",
+ gs_debug ("Couldn't connect to system bus: %s",
error.message);
dbus_error_free (&error);
}
diff --git a/src/gs-listener-x11.c b/src/gs-listener-x11.c
index d662ec0..1653cec 100644
--- a/src/gs-listener-x11.c
+++ b/src/gs-listener-x11.c
@@ -260,9 +260,13 @@ gs_listener_x11_acquire (GSListenerX11 *listener) {
void
gs_listener_x11_set_lock_after (GSListenerX11 *listener,
gint lock_after) {
- gs_debug ("Lock timeout updated to %i minutes", lock_after);
- listener->priv->lock_timeout = lock_after * 60;
- reset_lock_timer(listener, listener->priv->lock_timeout);
+ gint timeout = lock_after * 60;
+
+ if (listener->priv->lock_timeout != timeout) {
+ gs_debug("Lock timeout updated to %i minutes", lock_after);
+ listener->priv->lock_timeout = lock_after * 60;
+ reset_lock_timer(listener, listener->priv->lock_timeout);
+ }
}
void
diff --git a/src/gs-manager.c b/src/gs-manager.c
index dc7719e..a962cb5 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
@@ -699,7 +699,7 @@ gs_manager_cycle (GSManager *manager) {
g_return_val_if_fail (manager != NULL, FALSE);
g_return_val_if_fail (GS_IS_MANAGER (manager), FALSE);
- gs_debug ("cycling jobs");
+ gs_debug ("Cycling jobs");
if (!manager->priv->active) {
return FALSE;
@@ -1015,7 +1015,8 @@ gs_manager_class_init (GSManagerClass *klass) {
static void
on_bg_changed (XfceBG *bg,
GSManager *manager) {
- gs_debug ("background changed");
+ // TODO: cleanup unused code
+ // gs_debug ("background changed");
}
static void
@@ -1180,7 +1181,6 @@ window_grab_broken_cb (GSWindow *window,
static gboolean
unfade_idle (GSManager *manager) {
- gs_debug ("resetting fade");
gs_fade_reset (manager->priv->fade);
manager->priv->unfade_idle_id = 0;
return FALSE;
@@ -1214,7 +1214,7 @@ window_map_cb (GSWindow *window,
static void
window_unmap_cb (GSWindow *window,
GSManager *manager) {
- gs_debug ("window unmapped!");
+ gs_debug ("Window unmapped!");
}
static void
@@ -1736,7 +1736,7 @@ remove_job (GSJob *job) {
static void
fade_done_cb (GSFade *fade,
GSManager *manager) {
- gs_debug ("fade completed, showing windows");
+ gs_debug ("Fade completed, showing windows");
show_windows (manager->priv->windows);
manager->priv->fading = FALSE;
}
@@ -1774,7 +1774,7 @@ gs_manager_activate (GSManager *manager) {
do_fade = FALSE;
if (do_fade) {
manager->priv->fading = TRUE;
- gs_debug ("fading out");
+ gs_debug ("Fading out");
gs_fade_async (manager->priv->fade,
FADE_TIMEOUT,
(GSFadeDoneFunc)fade_done_cb,
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index ed93eb4..7de9330 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -322,7 +322,7 @@ update_geometry (GSWindow *window) {
outside_region = get_outside_region (window);
gdk_monitor_get_geometry (window->priv->monitor, &geometry);
- gs_debug ("got geometry for monitor: x=%d y=%d w=%d h=%d",
+ gs_debug ("Got geometry for monitor: x=%d y=%d w=%d h=%d",
geometry.x,
geometry.y,
geometry.width,
@@ -334,7 +334,7 @@ update_geometry (GSWindow *window) {
cairo_region_get_extents (monitor_region, (cairo_rectangle_int_t *)&geometry);
cairo_region_destroy (monitor_region);
- gs_debug ("using geometry for monitor: x=%d y=%d w=%d h=%d",
+ gs_debug ("Using geometry for monitor: x=%d y=%d w=%d h=%d",
geometry.x,
geometry.y,
geometry.width,
@@ -665,7 +665,7 @@ gs_window_xevent (GSWindow *window,
if (!x11_window_is_ours (xme->window)) {
gs_window_raise (window);
} else {
- gs_debug ("not raising our windows");
+ gs_debug ("Not raising our windows");
}
break;
@@ -677,7 +677,7 @@ gs_window_xevent (GSWindow *window,
if (!x11_window_is_ours (xce->window)) {
gs_window_raise (window);
} else {
- gs_debug ("not raising our windows");
+ gs_debug ("Not raising our windows");
}
break;
@@ -938,7 +938,7 @@ error_watch (GIOChannel *source,
switch (status) {
case G_IO_STATUS_NORMAL:
- gs_debug ("command error output: %s", line);
+ gs_debug ("Command output: %s", line);
break;
case G_IO_STATUS_EOF:
finished = TRUE;
@@ -1231,7 +1231,7 @@ keyboard_command_watch (GIOChannel *source,
{
guint32 id;
char c;
- gs_debug ("keyboard command output: %s", line);
+ gs_debug ("Keyboard command output: %s", line);
if (1 == sscanf (line, " %" G_GUINT32_FORMAT " %c", &id, &c)) {
create_keyboard_socket (window, id);
}
@@ -1441,7 +1441,7 @@ lock_command_watch (GIOChannel *source,
switch (status) {
case G_IO_STATUS_NORMAL:
- gs_debug ("command output: %s", line);
+ gs_debug ("Command output: %s", line);
if (strstr (line, "WINDOW ID=") != NULL) {
guint32 id;
diff --git a/src/xfce4-screensaver-dialog.c b/src/xfce4-screensaver-dialog.c
index aae8647..c3c674a 100644
--- a/src/xfce4-screensaver-dialog.c
+++ b/src/xfce4-screensaver-dialog.c
@@ -145,7 +145,7 @@ static char* request_response(GSLockPlug* plug,
gs_lock_plug_enable_prompt(plug, prompt, visible);
response = gs_lock_plug_run(plug);
- gs_debug ("got response: %d", response);
+ gs_debug ("Got response: %d", response);
text = NULL;
diff --git a/src/xfce4-screensaver.c b/src/xfce4-screensaver.c
index 72f6cf7..9f7d9a7 100644
--- a/src/xfce4-screensaver.c
+++ b/src/xfce4-screensaver.c
@@ -94,7 +94,7 @@ int main(int argc,
/* debug to a file if in deamon mode */
gs_debug_init(debug, FALSE);
- gs_debug("initializing xfce4-screensaver %s", VERSION);
+ gs_debug("Initializing xfce4-screensaver %s", VERSION);
monitor = gs_monitor_new();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list