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 8d9cff9a21db69dcdf48ac52a36e91a507d75b69 Author: Alexander Butenko <a.bute...@gmail.com> Date: Sun Jun 16 16:09:12 2019 -0400 use proper debug functions Signed-off-by: Sean Davis <smd.seanda...@gmail.com> --- src/xfcekbd-desktop-config.c | 9 +++++---- src/xfcekbd-indicator.c | 31 ++++++++++++++++--------------- src/xfcekbd-keyboard-config.c | 17 ++++++----------- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/src/xfcekbd-desktop-config.c b/src/xfcekbd-desktop-config.c index 33005af..88322aa 100644 --- a/src/xfcekbd-desktop-config.c +++ b/src/xfcekbd-desktop-config.c @@ -31,6 +31,7 @@ #include <libxfce4util/libxfce4util.h> #include <xfconf/xfconf.h> +#include "gs-debug.h" #include "xfcekbd-desktop-config.h" #include "xfcekbd-config-private.h" @@ -128,19 +129,19 @@ xfcekbd_desktop_config_load_from_xfconf (XfcekbdDesktopConfig *config) { xfconf_channel_get_bool(config->channel, KEY_KBD_GROUP_PER_WINDOW, DEFAULT_KEY_KBD_GROUP_PER_WINDOW); - xkl_debug (150, "group_per_app: %d\n", config->group_per_app); + gs_debug("group_per_app: %d\n", config->group_per_app); config->handle_indicators = xfconf_channel_get_bool(config->channel, KEY_KBD_HANDLE_INDICATORS, DEFAULT_KEY_KBD_HANDLE_INDICATORS); - xkl_debug (150, "handle_indicators: %d\n", config->handle_indicators); + gs_debug("handle_indicators: %d\n", config->handle_indicators); config->load_extra_items = xfconf_channel_get_bool(config->channel, KEY_KBD_LOAD_EXTRA_ITEMS, DEFAULT_KEY_KBD_LOAD_EXTRA_ITEMS); - xkl_debug (150, "load_extra_items: %d\n", config->load_extra_items); + gs_debug("load_extra_items: %d\n", config->load_extra_items); config->default_group = xfconf_channel_get_int(config->channel, @@ -152,7 +153,7 @@ xfcekbd_desktop_config_load_from_xfconf (XfcekbdDesktopConfig *config) { xkl_engine_get_max_num_groups (config->engine)) { config->default_group = -1; } - xkl_debug (150, "default_group: %d\n", config->default_group); + gs_debug("default_group: %d\n", config->default_group); } gboolean diff --git a/src/xfcekbd-indicator.c b/src/xfcekbd-indicator.c index 5c34646..f91d9cb 100644 --- a/src/xfcekbd-indicator.c +++ b/src/xfcekbd-indicator.c @@ -28,6 +28,7 @@ #include <libxfce4util/libxfce4util.h> +#include "gs-debug.h" #include "xfcekbd-desktop-config.h" #include "xfcekbd-indicator.h" #include "xfcekbd-indicator-config.h" @@ -149,7 +150,7 @@ xfcekbd_indicator_button_pressed (GtkWidget *widget, GdkEventButton *event, XfcekbdIndicator *gki) { if (event->button == 1 && event->type == GDK_BUTTON_PRESS) { - xkl_debug (150, "Mouse button pressed on applet\n"); + gs_debug("Mouse button pressed on applet\n"); xfcekbd_desktop_config_lock_next_group (&globals.cfg); globals.redraw_queued = TRUE; return TRUE; @@ -328,7 +329,7 @@ static void xfcekbd_indicator_cfg_changed (XfconfChannel *channel, gchar *key, gpointer user_data) { - xkl_debug (100, "General configuration changed in Xfconf - reiniting...\n"); + gs_debug( "General configuration changed in Xfconf - reiniting...\n"); xfcekbd_desktop_config_load_from_xfconf (&globals.cfg); xfcekbd_desktop_config_activate (&globals.cfg); ForAllIndicators () { @@ -341,7 +342,7 @@ static void xfcekbd_indicator_ind_cfg_changed (XfconfChannel *channel, gchar *key, gpointer user_data) { - xkl_debug (100, "Applet configuration changed in Xfconf - reiniting...\n"); + gs_debug( "Applet configuration changed in Xfconf - reiniting...\n"); xfcekbd_indicator_config_load_from_xfconf (&globals.ind_cfg); xfcekbd_indicator_config_activate (&globals.ind_cfg); @@ -381,7 +382,7 @@ xfcekbd_indicator_load_group_names (const gchar **layout_ids, static void xfcekbd_indicator_kbd_cfg_callback (XfcekbdIndicator *gki) { XklConfigRec *xklrec = xkl_config_rec_new (); - xkl_debug (100, "XKB configuration changed on X Server - reiniting...\n"); + gs_debug( "XKB configuration changed on X Server - reiniting...\n"); xfcekbd_keyboard_config_load_from_x_current (&globals.kbd_cfg, xklrec); @@ -409,11 +410,11 @@ xfcekbd_indicator_state_callback (XklEngine *engine, XklEngineStateChange changeType, gint group, gboolean restore) { - xkl_debug (150, "group is now %d, restore: %d\n", group, restore); + gs_debug("group is now %d, restore: %d\n", group, restore); if (changeType == GROUP_CHANGED) { ForAllIndicators () { - xkl_debug (200, "do repaint\n"); + gs_debug("do repaint\n"); xfcekbd_indicator_set_current_page_for_group (gki, group); } @@ -434,7 +435,7 @@ xfcekbd_indicator_set_current_page (XfcekbdIndicator *gki) { void xfcekbd_indicator_set_current_page_for_group (XfcekbdIndicator *gki, int group) { - xkl_debug (200, "Revalidating for group %d\n", group); + gs_debug("Revalidating for group %d\n", group); gtk_notebook_set_current_page (GTK_NOTEBOOK (gki), group + 1); @@ -523,7 +524,7 @@ static void xfcekbd_indicator_init(XfcekbdIndicator *gki) { notebook = GTK_NOTEBOOK (gki); - xkl_debug (100, "Initiating the widget startup process for %p\n", gki); + gs_debug( "Initiating the widget startup process for %p\n", gki); gtk_notebook_set_show_tabs (notebook, FALSE); gtk_notebook_set_show_border (notebook, FALSE); @@ -553,7 +554,7 @@ static void xfcekbd_indicator_init(XfcekbdIndicator *gki) { static void xfcekbd_indicator_finalize (GObject *obj) { XfcekbdIndicator *gki = XFCEKBD_INDICATOR (obj); - xkl_debug (100, + gs_debug( "Starting the xfce-kbd-indicator widget shutdown process for %p\n", gki); @@ -562,7 +563,7 @@ xfcekbd_indicator_finalize (GObject *obj) { xfcekbd_indicator_cleanup (gki); - xkl_debug (100, + gs_debug( "The instance of xfce-kbd-indicator successfully finalized\n"); g_free (gki->priv); @@ -575,7 +576,7 @@ xfcekbd_indicator_finalize (GObject *obj) { static void xfcekbd_indicator_global_term (void) { - xkl_debug (100, "*** Last XfcekbdIndicator instance ***\n"); + gs_debug( "*** Last XfcekbdIndicator instance ***\n"); xfcekbd_indicator_stop_listen (); xfcekbd_desktop_config_stop_listen (&globals.cfg); @@ -589,7 +590,7 @@ xfcekbd_indicator_global_term (void) { globals.registry = NULL; g_object_unref (G_OBJECT (globals.engine)); globals.engine = NULL; - xkl_debug (100, "*** Terminated globals *** \n"); + gs_debug( "*** Terminated globals *** \n"); } static void @@ -597,7 +598,7 @@ xfcekbd_indicator_class_init (XfcekbdIndicatorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - xkl_debug (100, "*** First XfcekbdIndicator instance *** \n"); + gs_debug( "*** First XfcekbdIndicator instance *** \n"); memset (&globals, 0, sizeof (globals)); @@ -628,7 +629,7 @@ xfcekbd_indicator_global_init (void) { globals.engine = xkl_engine_get_instance(GDK_DISPLAY_XDISPLAY(gdk_display_get_default())); if (globals.engine == NULL) { - xkl_debug (0, "Libxklavier initialization error"); + gs_debug("Libxklavier initialization error"); return; } @@ -672,7 +673,7 @@ xfcekbd_indicator_global_init (void) { xfcekbd_indicator_start_listen (); - xkl_debug (100, "*** Inited globals *** \n"); + gs_debug( "*** Inited globals *** \n"); } GtkWidget * diff --git a/src/xfcekbd-keyboard-config.c b/src/xfcekbd-keyboard-config.c index ddaf269..3275096 100644 --- a/src/xfcekbd-keyboard-config.c +++ b/src/xfcekbd-keyboard-config.c @@ -28,6 +28,7 @@ #include <libxfce4util/libxfce4util.h> +#include "gs-debug.h" #include "xfcekbd-config-private.h" #include "xfcekbd-keyboard-config.h" @@ -98,7 +99,7 @@ xfcekbd_keyboard_config_copy_from_xkl_config (XfcekbdKeyboardConfig *kbd_config, int i; xfcekbd_keyboard_config_model_set (kbd_config, pdata->model); - xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model); + gs_debug("Loaded Kbd model: [%s]\n", pdata->model); /* Layouts */ g_strfreev (kbd_config->layouts_variants); @@ -111,9 +112,7 @@ xfcekbd_keyboard_config_copy_from_xkl_config (XfcekbdKeyboardConfig *kbd_config, i = 0; while (*p != NULL) { const gchar *full_layout = xfcekbd_keyboard_config_merge_items (*p, *p1); - xkl_debug (150, - "Loaded Kbd layout (with variant): [%s]\n", - full_layout); + gs_debug("Loaded Kbd layout (with variant): [%s]\n", full_layout); kbd_config->layouts_variants[i++] = g_strdup (full_layout); p++; p1++; @@ -136,9 +135,7 @@ xfcekbd_keyboard_config_copy_from_xkl_config (XfcekbdKeyboardConfig *kbd_config, char group[XKL_MAX_CI_NAME_LENGTH]; strncpy (group, option, len); group[len] = 0; - xkl_debug (150, - "Loaded Kbd option: [%s][%s]\n", - group, option); + gs_debug("Loaded Kbd option: [%s][%s]\n", group, option); xfcekbd_keyboard_config_options_set (kbd_config, i++, group, option); } p++; @@ -170,16 +167,14 @@ void xfcekbd_keyboard_config_load_from_x_current (XfcekbdKeyboardConfig *kbd_config, XklConfigRec *data) { gboolean own_data = data == NULL; - xkl_debug (150, "Copying config from X(current)\n"); + gs_debug("Copying config from X(current)\n"); if (own_data) data = xkl_config_rec_new (); if (xkl_config_rec_get_from_server (data, kbd_config->engine)) xfcekbd_keyboard_config_copy_from_xkl_config (kbd_config, data); else - xkl_debug (150, - "Could not load keyboard config from server: [%s]\n", - xkl_get_last_error ()); + gs_debug("Could not load keyboard config from server: [%s]\n", xkl_get_last_error ()); if (own_data) g_object_unref (G_OBJECT (data)); } -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits