[gnome-terminal/gnome-3-34-ntfy-opn-ttl-ts: 8/16] Sprinkle debug messages for notifications
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal/gnome-3-34-ntfy-opn-ttl-ts: 8/16] Sprinkle debug messages for notifications
- Date: Tue, 2 Apr 2019 16:17:27 +0000 (UTC)
commit c7fe0ef5fbfe0a4074008bb97d8f842371e12c72
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Apr 2 16:37:48 2019 +0200
Sprinkle debug messages for notifications
This can be useful for finding out whether the escape sequence wasn't
emitted or the filtering was faulty.
https://bugzilla.gnome.org/show_bug.cgi?id=711059
src/terminal-debug.c | 1 +
src/terminal-debug.h | 3 ++-
src/terminal-screen.c | 10 ++++++++++
3 files changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/terminal-debug.c b/src/terminal-debug.c
index d08829e9..3748e7ed 100644
--- a/src/terminal-debug.c
+++ b/src/terminal-debug.c
@@ -38,6 +38,7 @@ _terminal_debug_init(void)
{ "profile", TERMINAL_DEBUG_PROFILE },
{ "settings-list", TERMINAL_DEBUG_SETTINGS_LIST },
{ "search", TERMINAL_DEBUG_SEARCH },
+ { "notifications", TERMINAL_DEBUG_NOTIFICATIONS },
};
_terminal_debug_flags = g_parse_debug_string (g_getenv ("GNOME_TERMINAL_DEBUG"),
diff --git a/src/terminal-debug.h b/src/terminal-debug.h
index 0fafcc3a..af135868 100644
--- a/src/terminal-debug.h
+++ b/src/terminal-debug.h
@@ -34,7 +34,8 @@ typedef enum {
TERMINAL_DEBUG_PROCESSES = 1 << 6,
TERMINAL_DEBUG_PROFILE = 1 << 7,
TERMINAL_DEBUG_SETTINGS_LIST = 1 << 8,
- TERMINAL_DEBUG_SEARCH = 1 << 9
+ TERMINAL_DEBUG_SEARCH = 1 << 9,
+ TERMINAL_DEBUG_NOTIFICATIONS = 1 << 10
} TerminalDebugFlags;
void _terminal_debug_init(void);
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index dacc3823..57e23742 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1709,6 +1709,8 @@ terminal_screen_focus_in (GtkWidget *widget,
TerminalApp *app;
TerminalWindow *window;
+ _terminal_debug_print (TERMINAL_DEBUG_NOTIFICATIONS, "Notification withdrawn\n");
+
window = terminal_screen_get_window (screen);
if (window != NULL)
{
@@ -1850,6 +1852,9 @@ terminal_screen_contents_changed_cb (TerminalScreen *screen)
goto out;
priv->current_cmdline = g_steal_pointer (&cmdline);
+ _terminal_debug_print (TERMINAL_DEBUG_NOTIFICATIONS,
+ "Current foreground command-line: %s\n",
+ priv->current_cmdline);
out:
priv->contents_changed_source_id = 0;
@@ -1909,6 +1914,7 @@ terminal_screen_show_notification (TerminalScreen *screen)
terminal_tab_label_set_icon (TERMINAL_TAB_LABEL (tab_label),
"dialog-information-symbolic",
_("Command completed"));
+ _terminal_debug_print (TERMINAL_DEBUG_NOTIFICATIONS, "Notify tab\n");
}
}
else
@@ -1924,6 +1930,7 @@ terminal_screen_show_notification (TerminalScreen *screen)
app = terminal_app_get ();
g_application_send_notification (G_APPLICATION (app), priv->uuid, notification);
+ _terminal_debug_print (TERMINAL_DEBUG_NOTIFICATIONS, "Notify desktop\n");
}
}
@@ -1966,6 +1973,9 @@ terminal_screen_shell_preexec_cb (TerminalScreen *screen)
goto out;
priv->current_cmdline = g_steal_pointer (&cmdline);
+ _terminal_debug_print (TERMINAL_DEBUG_NOTIFICATIONS,
+ "Current foreground command-line: %s\n",
+ priv->current_cmdline);
priv->shell_preexec_source_id = 0;
retval = G_SOURCE_REMOVE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]