Debarshi Ray 01b1868
From 94b29611359d0d8510876be531825ec2edf44e09 Mon Sep 17 00:00:00 2001
Debarshi Ray 1ab5f00
From: Debarshi Ray <debarshir@gnome.org>
Debarshi Ray 1ab5f00
Date: Tue, 27 Jan 2015 18:40:13 +0100
Debarshi Ray 1ab5f00
Subject: [PATCH 1/3] Support desktop notifications from OSC 777
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
https://bugzilla.gnome.org/show_bug.cgi?id=711059
Debarshi Ray 1ab5f00
---
Debarshi Ray 01b1868
 src/terminal-app.c       |  32 ++++++++++++++
Debarshi Ray 01b1868
 src/terminal-screen.c    | 108 +++++++++++++++++++++++++++++++++++++++++++++++
Debarshi Ray 01b1868
 src/terminal-tab-label.c |  28 +++++++++++-
Debarshi Ray 01b1868
 src/terminal-tab-label.h |   4 ++
Debarshi Ray 01b1868
 4 files changed, 171 insertions(+), 1 deletion(-)
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
diff --git a/src/terminal-app.c b/src/terminal-app.c
Debarshi Ray 01b1868
index 94fa35b..de74532 100644
Debarshi Ray 1ab5f00
--- a/src/terminal-app.c
Debarshi Ray 1ab5f00
+++ b/src/terminal-app.c
Debarshi Ray 1ab5f00
@@ -299,6 +299,31 @@ app_menu_quit_cb (GSimpleAction *action,
Debarshi Ray 1ab5f00
     gtk_widget_destroy (GTK_WIDGET (window));
Debarshi Ray 1ab5f00
 }
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
+/* Other action callbacks */
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+static void
Debarshi Ray 1ab5f00
+action_activate_tab_cb (GSimpleAction *action,
Debarshi Ray 1ab5f00
+                        GVariant      *parameter,
Debarshi Ray 1ab5f00
+                        gpointer       user_data)
Debarshi Ray 1ab5f00
+{
Debarshi Ray 1ab5f00
+  GtkApplication *application = user_data;
Debarshi Ray 1ab5f00
+  GtkWidget *toplevel;
Debarshi Ray 1ab5f00
+  TerminalScreen *screen;
Debarshi Ray 1ab5f00
+  const char *uuid;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  g_variant_get (parameter, "&s", &uuid);
Debarshi Ray 1ab5f00
+  screen = terminal_app_get_screen_by_uuid (TERMINAL_APP (application), uuid);
Debarshi Ray 1ab5f00
+  if (screen == NULL)
Debarshi Ray 1ab5f00
+    return;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
Debarshi Ray 1ab5f00
+  if (!gtk_widget_is_toplevel (toplevel))
Debarshi Ray 1ab5f00
+    return;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  terminal_window_switch_screen (TERMINAL_WINDOW (toplevel), screen);
Debarshi Ray 1ab5f00
+  gtk_window_present (GTK_WINDOW (toplevel));
Debarshi Ray 1ab5f00
+}
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
 /* Class implementation */
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 G_DEFINE_TYPE (TerminalApp, terminal_app, GTK_TYPE_APPLICATION)
Debarshi Ray 1ab5f00
@@ -321,6 +346,10 @@ terminal_app_startup (GApplication *application)
Debarshi Ray 1ab5f00
     { "quit",        app_menu_quit_cb,          NULL, NULL, NULL }
Debarshi Ray 1ab5f00
   };
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
+  const GActionEntry other_actions[] = {
Debarshi Ray 1ab5f00
+    { "activate-tab",   action_activate_tab_cb, "s",  NULL, NULL }
Debarshi Ray 1ab5f00
+  };
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
   gs_unref_object GtkBuilder *builder;
Debarshi Ray 1ab5f00
   GError *error = NULL;
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
@@ -332,6 +361,9 @@ terminal_app_startup (GApplication *application)
Debarshi Ray 1ab5f00
   g_action_map_add_action_entries (G_ACTION_MAP (application),
Debarshi Ray 1ab5f00
                                    app_menu_actions, G_N_ELEMENTS (app_menu_actions),
Debarshi Ray 1ab5f00
                                    application);
Debarshi Ray 1ab5f00
+  g_action_map_add_action_entries (G_ACTION_MAP (application),
Debarshi Ray 1ab5f00
+                                   other_actions, G_N_ELEMENTS (other_actions),
Debarshi Ray 1ab5f00
+                                   application);
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
   builder = gtk_builder_new ();
Debarshi Ray 1ab5f00
   gtk_builder_add_from_resource (builder,
Debarshi Ray 1ab5f00
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
Debarshi Ray 01b1868
index df3fdde..bb139e3 100644
Debarshi Ray 1ab5f00
--- a/src/terminal-screen.c
Debarshi Ray 1ab5f00
+++ b/src/terminal-screen.c
Debarshi Ray 1ab5f00
@@ -48,6 +48,7 @@
Debarshi Ray 1ab5f00
 #include "terminal-marshal.h"
Debarshi Ray 1ab5f00
 #include "terminal-schemas.h"
Debarshi Ray 1ab5f00
 #include "terminal-screen-container.h"
Debarshi Ray 1ab5f00
+#include "terminal-tab-label.h"
Debarshi Ray 1ab5f00
 #include "terminal-util.h"
Debarshi Ray 1ab5f00
 #include "terminal-window.h"
Debarshi Ray 1ab5f00
 #include "terminal-info-bar.h"
Debarshi Ray 1ab5f00
@@ -81,6 +82,7 @@ struct _TerminalScreenPrivate
Debarshi Ray 1ab5f00
   char **initial_env;
Debarshi Ray 1ab5f00
   char **override_command;
Debarshi Ray 1ab5f00
   gboolean shell;
Debarshi Ray 1ab5f00
+  gboolean shell_prompt_shown;
Debarshi Ray 1ab5f00
   int child_pid;
Debarshi Ray 1ab5f00
   GSList *match_tags;
Debarshi Ray 1ab5f00
   guint launch_child_source_id;
Debarshi Ray 01b1868
@@ -131,11 +133,16 @@ static void terminal_screen_system_font_changed_cb (GSettings *,
Debarshi Ray 01b1868
 static gboolean terminal_screen_popup_menu (GtkWidget *widget);
Debarshi Ray 01b1868
 static gboolean terminal_screen_button_press (GtkWidget *widget,
Debarshi Ray 01b1868
                                               GdkEventButton *event);
Debarshi Ray 01b1868
+static gboolean terminal_screen_focus_in (GtkWidget *widget,
Debarshi Ray 01b1868
+                                          GdkEventFocus *event);
Debarshi Ray 01b1868
 static gboolean terminal_screen_do_exec (TerminalScreen *screen,
Debarshi Ray 01b1868
                                          FDSetupData    *data,
Debarshi Ray 1ab5f00
                                          GError **error);
Debarshi Ray 1ab5f00
 static void terminal_screen_child_exited  (VteTerminal *terminal,
Debarshi Ray 1ab5f00
                                            int status);
Debarshi Ray 1ab5f00
+static void terminal_screen_notification_received (VteTerminal *terminal,
Debarshi Ray 1ab5f00
+                                                   const char  *summary,
Debarshi Ray 1ab5f00
+                                                   const char  *body);
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 static void terminal_screen_window_title_changed      (VteTerminal *vte_terminal,
Debarshi Ray 1ab5f00
                                                        TerminalScreen *screen);
Debarshi Ray 01b1868
@@ -434,12 +441,14 @@ terminal_screen_class_init (TerminalScreenClass *klass)
Debarshi Ray 01b1868
   object_class->get_property = terminal_screen_get_property;
Debarshi Ray 01b1868
   object_class->set_property = terminal_screen_set_property;
Debarshi Ray 01b1868
 
Debarshi Ray 01b1868
+  widget_class->focus_in_event = terminal_screen_focus_in;
Debarshi Ray 01b1868
   widget_class->realize = terminal_screen_realize;
Debarshi Ray 01b1868
   widget_class->drag_data_received = terminal_screen_drag_data_received;
Debarshi Ray 01b1868
   widget_class->button_press_event = terminal_screen_button_press;
Debarshi Ray 1ab5f00
   widget_class->popup_menu = terminal_screen_popup_menu;
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
   terminal_class->child_exited = terminal_screen_child_exited;
Debarshi Ray 1ab5f00
+  terminal_class->notification_received = terminal_screen_notification_received;
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
   signals[PROFILE_SET] =
Debarshi Ray 1ab5f00
     g_signal_new (I_("profile-set"),
Debarshi Ray 01b1868
@@ -561,6 +570,10 @@ terminal_screen_dispose (GObject *object)
Debarshi Ray 1ab5f00
   TerminalScreen *screen = TERMINAL_SCREEN (object);
Debarshi Ray 1ab5f00
   TerminalScreenPrivate *priv = screen->priv;
Debarshi Ray 1ab5f00
   GtkSettings *settings;
Debarshi Ray 1ab5f00
+  TerminalApp *app;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  app = terminal_app_get ();
Debarshi Ray 1ab5f00
+  g_application_withdraw_notification (G_APPLICATION (app), priv->uuid);
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
   settings = gtk_widget_get_settings (GTK_WIDGET (screen));
Debarshi Ray 1ab5f00
   g_signal_handlers_disconnect_matched (settings, G_SIGNAL_MATCH_DATA,
Debarshi Ray 01b1868
@@ -1502,6 +1515,43 @@ terminal_screen_button_press (GtkWidget      *widget,
Debarshi Ray 01b1868
   return FALSE;
Debarshi Ray 01b1868
 }
Debarshi Ray 01b1868
 
Debarshi Ray 01b1868
+static gboolean
Debarshi Ray 01b1868
+terminal_screen_focus_in (GtkWidget     *widget,
Debarshi Ray 01b1868
+                          GdkEventFocus *event)
Debarshi Ray 01b1868
+{
Debarshi Ray 01b1868
+  TerminalScreen *screen = TERMINAL_SCREEN (widget);
Debarshi Ray 01b1868
+  TerminalApp *app;
Debarshi Ray 01b1868
+  TerminalWindow *window;
Debarshi Ray 01b1868
+
Debarshi Ray 01b1868
+  window = terminal_screen_get_window (screen);
Debarshi Ray 01b1868
+  if (window != NULL)
Debarshi Ray 01b1868
+    {
Debarshi Ray 01b1868
+      TerminalScreenContainer *screen_container;
Debarshi Ray 01b1868
+
Debarshi Ray 01b1868
+      screen_container = terminal_screen_container_get_from_screen (screen);
Debarshi Ray 01b1868
+      if (screen_container != NULL)
Debarshi Ray 01b1868
+        {
Debarshi Ray 01b1868
+          GtkWidget *mdi_container;
Debarshi Ray 01b1868
+
Debarshi Ray 01b1868
+          mdi_container = terminal_window_get_mdi_container (window);
Debarshi Ray 01b1868
+          /* FIXME: add interface method to retrieve tab label */
Debarshi Ray 01b1868
+          if (GTK_IS_NOTEBOOK (mdi_container))
Debarshi Ray 01b1868
+            {
Debarshi Ray 01b1868
+              GtkWidget *tab_label;
Debarshi Ray 01b1868
+
Debarshi Ray 01b1868
+              tab_label = gtk_notebook_get_tab_label (GTK_NOTEBOOK (mdi_container), GTK_WIDGET (screen_container));
Debarshi Ray 01b1868
+              terminal_tab_label_set_bold (TERMINAL_TAB_LABEL (tab_label), FALSE);
Debarshi Ray 01b1868
+              terminal_tab_label_set_icon (TERMINAL_TAB_LABEL (tab_label), NULL, NULL);
Debarshi Ray 01b1868
+            }
Debarshi Ray 01b1868
+        }
Debarshi Ray 01b1868
+    }
Debarshi Ray 01b1868
+
Debarshi Ray 01b1868
+  app = terminal_app_get ();
Debarshi Ray 01b1868
+  g_application_withdraw_notification (G_APPLICATION (app), screen->priv->uuid);
Debarshi Ray 01b1868
+
Debarshi Ray 01b1868
+  return GTK_WIDGET_CLASS (terminal_screen_parent_class)->focus_in_event (widget, event);
Debarshi Ray 01b1868
+}
Debarshi Ray 01b1868
+
Debarshi Ray 01b1868
 /**
Debarshi Ray 01b1868
  * terminal_screen_get_current_dir:
Debarshi Ray 01b1868
  * @screen:
Debarshi Ray 01b1868
@@ -1603,6 +1653,64 @@ terminal_screen_child_exited (VteTerminal *terminal,
Debarshi Ray 1ab5f00
 }
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 static void
Debarshi Ray 1ab5f00
+terminal_screen_notification_received (VteTerminal *terminal,
Debarshi Ray 1ab5f00
+                                       const char  *summary,
Debarshi Ray 1ab5f00
+                                       const char  *body)
Debarshi Ray 1ab5f00
+{
Debarshi Ray 1ab5f00
+  TerminalScreen *screen = TERMINAL_SCREEN (terminal);
Debarshi Ray 1ab5f00
+  TerminalScreenPrivate *priv = screen->priv;
Debarshi Ray 1ab5f00
+  TerminalWindow *window;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  if (G_UNLIKELY (!priv->shell_prompt_shown))
Debarshi Ray 1ab5f00
+    {
Debarshi Ray 1ab5f00
+      priv->shell_prompt_shown = TRUE;
Debarshi Ray 1ab5f00
+      return;
Debarshi Ray 1ab5f00
+    }
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  window = terminal_screen_get_window (screen);
Debarshi Ray 1ab5f00
+  if (window == NULL)
Debarshi Ray 1ab5f00
+    return;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  if (gtk_window_is_active (GTK_WINDOW (window)))
Debarshi Ray 1ab5f00
+    {
Debarshi Ray 1ab5f00
+      GtkWidget *mdi_container;
Debarshi Ray 1ab5f00
+      TerminalScreenContainer *screen_container;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+      if (screen == terminal_window_get_active (window))
Debarshi Ray 1ab5f00
+        return;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+      screen_container = terminal_screen_container_get_from_screen (screen);
Debarshi Ray 1ab5f00
+      if (screen_container == NULL)
Debarshi Ray 1ab5f00
+        return;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+      mdi_container = terminal_window_get_mdi_container (window);
Debarshi Ray 1ab5f00
+      /* FIXME: add interface method to retrieve tab label */
Debarshi Ray 1ab5f00
+      if (GTK_IS_NOTEBOOK (mdi_container))
Debarshi Ray 1ab5f00
+        {
Debarshi Ray 1ab5f00
+          GtkWidget *tab_label;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+          tab_label = gtk_notebook_get_tab_label (GTK_NOTEBOOK (mdi_container), GTK_WIDGET (screen_container));
Debarshi Ray 1ab5f00
+          terminal_tab_label_set_bold (TERMINAL_TAB_LABEL (tab_label), TRUE);
Debarshi Ray 1ab5f00
+          terminal_tab_label_set_icon (TERMINAL_TAB_LABEL (tab_label), "dialog-information-symbolic", summary);
Debarshi Ray 1ab5f00
+        }
Debarshi Ray 1ab5f00
+    }
Debarshi Ray 1ab5f00
+  else
Debarshi Ray 1ab5f00
+    {
Debarshi Ray 1ab5f00
+      gs_unref_object GNotification *notification = NULL;
Debarshi Ray 1ab5f00
+      TerminalApp *app;
Debarshi Ray 1ab5f00
+      gs_free char *detailed_action = NULL;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+      notification = g_notification_new (summary);
Debarshi Ray 1ab5f00
+      g_notification_set_body (notification, body);
Debarshi Ray 1ab5f00
+      detailed_action = g_strdup_printf ("app.activate-tab::%s", priv->uuid);
Debarshi Ray 1ab5f00
+      g_notification_set_default_action (notification, detailed_action);
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+      app = terminal_app_get ();
Debarshi Ray 1ab5f00
+      g_application_send_notification (G_APPLICATION (app), priv->uuid, notification);
Debarshi Ray 1ab5f00
+    }
Debarshi Ray 1ab5f00
+}
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+static void
Debarshi Ray 1ab5f00
 terminal_screen_drag_data_received (GtkWidget        *widget,
Debarshi Ray 1ab5f00
                                     GdkDragContext   *context,
Debarshi Ray 1ab5f00
                                     gint              x,
Debarshi Ray 1ab5f00
diff --git a/src/terminal-tab-label.c b/src/terminal-tab-label.c
Debarshi Ray 1ab5f00
index 0850652..987e93c 100644
Debarshi Ray 1ab5f00
--- a/src/terminal-tab-label.c
Debarshi Ray 1ab5f00
+++ b/src/terminal-tab-label.c
Debarshi Ray 1ab5f00
@@ -34,6 +34,7 @@
Debarshi Ray 1ab5f00
 struct _TerminalTabLabelPrivate
Debarshi Ray 1ab5f00
 {
Debarshi Ray 1ab5f00
   TerminalScreen *screen;
Debarshi Ray 1ab5f00
+  GtkWidget *icon;
Debarshi Ray 1ab5f00
   GtkWidget *label;
Debarshi Ray 1ab5f00
   GtkWidget *close_button;
Debarshi Ray 1ab5f00
   gboolean bold;
Debarshi Ray 1ab5f00
@@ -179,7 +180,7 @@ terminal_tab_label_constructed (GObject *object)
Debarshi Ray 1ab5f00
 {
Debarshi Ray 1ab5f00
   TerminalTabLabel *tab_label = TERMINAL_TAB_LABEL (object);
Debarshi Ray 1ab5f00
   TerminalTabLabelPrivate *priv = tab_label->priv;
Debarshi Ray 1ab5f00
-  GtkWidget *hbox, *label, *close_button;
Debarshi Ray 1ab5f00
+  GtkWidget *hbox, *icon, *label, *close_button;
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
   G_OBJECT_CLASS (terminal_tab_label_parent_class)->constructed (object);
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
@@ -189,6 +190,10 @@ terminal_tab_label_constructed (GObject *object)
Debarshi Ray 1ab5f00
   
Debarshi Ray 1ab5f00
   gtk_box_set_spacing (GTK_BOX (hbox), SPACING);
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
+  priv->icon = icon = gtk_image_new ();
Debarshi Ray 1ab5f00
+  gtk_widget_set_no_show_all (icon, TRUE);
Debarshi Ray 1ab5f00
+  gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
   priv->label = label = gtk_label_new (NULL);
Debarshi Ray 1ab5f00
   gtk_widget_set_halign (label, GTK_ALIGN_CENTER);
Debarshi Ray 1ab5f00
   gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
Debarshi Ray 1ab5f00
@@ -377,6 +382,27 @@ terminal_tab_label_set_bold (TerminalTabLabel *tab_label,
Debarshi Ray 1ab5f00
 }
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 /**
Debarshi Ray 1ab5f00
+ * terminal_tab_label_set_icon:
Debarshi Ray 1ab5f00
+ * @tab_label: a #TerminalTabLabel
Debarshi Ray 1ab5f00
+ * @icon_name: (allow-none): an icon name
Debarshi Ray 1ab5f00
+ * @tooltip: (allow-none): text to be used as tooltip
Debarshi Ray 1ab5f00
+ *
Debarshi Ray 1ab5f00
+ * Shows an icon at the beginning of @tab_label. If @icon_name is
Debarshi Ray 1ab5f00
+ * %NULL, then the icon will be hidden.
Debarshi Ray 1ab5f00
+ */
Debarshi Ray 1ab5f00
+void
Debarshi Ray 1ab5f00
+terminal_tab_label_set_icon (TerminalTabLabel *tab_label,
Debarshi Ray 1ab5f00
+                             const char *icon_name,
Debarshi Ray 1ab5f00
+                             const char *tooltip)
Debarshi Ray 1ab5f00
+{
Debarshi Ray 1ab5f00
+  TerminalTabLabelPrivate *priv = tab_label->priv;
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  gtk_widget_set_visible (priv->icon, icon_name != NULL);
Debarshi Ray 1ab5f00
+  gtk_image_set_from_icon_name (GTK_IMAGE (priv->icon), icon_name, GTK_ICON_SIZE_MENU);
Debarshi Ray 1ab5f00
+  gtk_widget_set_tooltip_text (GTK_WIDGET (priv->icon), tooltip);
Debarshi Ray 1ab5f00
+}
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+/**
Debarshi Ray 1ab5f00
  * terminal_tab_label_get_screen:
Debarshi Ray 1ab5f00
  * @tab_label: a #TerminalTabLabel
Debarshi Ray 1ab5f00
  *
Debarshi Ray 1ab5f00
diff --git a/src/terminal-tab-label.h b/src/terminal-tab-label.h
Debarshi Ray 1ab5f00
index 20cfbce..a987025 100644
Debarshi Ray 1ab5f00
--- a/src/terminal-tab-label.h
Debarshi Ray 1ab5f00
+++ b/src/terminal-tab-label.h
Debarshi Ray 1ab5f00
@@ -59,6 +59,10 @@ GtkWidget *     terminal_tab_label_new        (TerminalScreen *screen);
Debarshi Ray 1ab5f00
 void            terminal_tab_label_set_bold   (TerminalTabLabel *tab_label,
Debarshi Ray 1ab5f00
                                                gboolean bold);
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
+void            terminal_tab_label_set_icon   (TerminalTabLabel *tab_label,
Debarshi Ray 1ab5f00
+                                               const char *icon_name,
Debarshi Ray 1ab5f00
+                                               const char *tooltip);
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
 TerminalScreen *terminal_tab_label_get_screen (TerminalTabLabel *tab_label);
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 G_END_DECLS
Debarshi Ray 1ab5f00
-- 
Debarshi Ray 1ab5f00
2.1.0
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
Debarshi Ray 01b1868
From 261c88d13ede50b165aaef859f2f95660dc6c965 Mon Sep 17 00:00:00 2001
Debarshi Ray 1ab5f00
From: Debarshi Ray <debarshir@gnome.org>
Debarshi Ray 1ab5f00
Date: Tue, 27 Jan 2015 19:04:19 +0100
Debarshi Ray 1ab5f00
Subject: [PATCH 2/3] Make notifications based on org.gtk.Notification work
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
The desktop file should be named after the application ID for this.
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
https://bugzilla.gnome.org/show_bug.cgi?id=711059
Debarshi Ray 1ab5f00
---
Debarshi Ray 1ab5f00
 Makefile.am                            |  4 ++--
Debarshi Ray 1ab5f00
 configure.ac                           |  2 +-
Debarshi Ray 1ab5f00
 gnome-terminal.appdata.xml.in          | 38 ----------------------------------
Debarshi Ray 1ab5f00
 gnome-terminal.desktop.in.in           | 16 --------------
Debarshi Ray 1ab5f00
 org.gnome.Terminal.appdata.xml.in      | 38 ++++++++++++++++++++++++++++++++++
Debarshi Ray 1ab5f00
 org.gnome.Terminal.desktop.in.in       | 16 ++++++++++++++
Debarshi Ray 1ab5f00
 po/POTFILES.in                         |  4 ++--
Debarshi Ray 1ab5f00
 po/POTFILES.skip                       |  2 +-
Debarshi Ray 1ab5f00
 src/gnome-terminal-search-provider.ini |  2 +-
Debarshi Ray 1ab5f00
 9 files changed, 61 insertions(+), 61 deletions(-)
Debarshi Ray 1ab5f00
 delete mode 100644 gnome-terminal.appdata.xml.in
Debarshi Ray 1ab5f00
 delete mode 100644 gnome-terminal.desktop.in.in
Debarshi Ray 1ab5f00
 create mode 100644 org.gnome.Terminal.appdata.xml.in
Debarshi Ray 1ab5f00
 create mode 100644 org.gnome.Terminal.desktop.in.in
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
diff --git a/Makefile.am b/Makefile.am
Debarshi Ray 1ab5f00
index f6f41a6..3aa8677 100644
Debarshi Ray 1ab5f00
--- a/Makefile.am
Debarshi Ray 1ab5f00
+++ b/Makefile.am
Debarshi Ray 1ab5f00
@@ -14,7 +14,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
Debarshi Ray 1ab5f00
 	$(NULL)
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 desktopdir = $(datadir)/applications
Debarshi Ray 1ab5f00
-desktop_in_files = @PACKAGE@.desktop.in.in
Debarshi Ray 1ab5f00
+desktop_in_files = org.gnome.Terminal.desktop.in.in
Debarshi Ray 1ab5f00
 nodist_desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
Debarshi Ray 1ab5f00
 @INTLTOOL_DESKTOP_RULE@
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
@@ -25,7 +25,7 @@ desktop-file-validate: $(nodist_desktop_DATA)
Debarshi Ray 1ab5f00
 	done
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 appdatadir = $(datadir)/appdata
Debarshi Ray 1ab5f00
-appdata_in_files = gnome-terminal.appdata.xml.in
Debarshi Ray 1ab5f00
+appdata_in_files = org.gnome.Terminal.appdata.xml.in
Debarshi Ray 1ab5f00
 nodist_appdata_DATA = $(appdata_in_files:.xml.in=.xml)
Debarshi Ray 1ab5f00
 @INTLTOOL_XML_RULE@
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
diff --git a/configure.ac b/configure.ac
Debarshi Ray 1ab5f00
index 523a0da..e68392d 100644
Debarshi Ray 1ab5f00
--- a/configure.ac
Debarshi Ray 1ab5f00
+++ b/configure.ac
Debarshi Ray 1ab5f00
@@ -345,7 +345,7 @@ AC_SUBST([AM_LDFLAGS])
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 AC_CONFIG_FILES([
Debarshi Ray 1ab5f00
 Makefile
Debarshi Ray 1ab5f00
-gnome-terminal.desktop.in
Debarshi Ray 1ab5f00
+org.gnome.Terminal.desktop.in
Debarshi Ray 1ab5f00
 src/Makefile
Debarshi Ray 1ab5f00
 src/terminal-version.h
Debarshi Ray 1ab5f00
 help/Makefile
Debarshi Ray 1ab5f00
diff --git a/gnome-terminal.appdata.xml.in b/gnome-terminal.appdata.xml.in
Debarshi Ray 1ab5f00
deleted file mode 100644
Debarshi Ray 1ab5f00
index 7ef61e9..0000000
Debarshi Ray 1ab5f00
--- a/gnome-terminal.appdata.xml.in
Debarshi Ray 1ab5f00
+++ /dev/null
Debarshi Ray 1ab5f00
@@ -1,38 +0,0 @@
Debarshi Ray 1ab5f00
-
Debarshi Ray 1ab5f00
-
Debarshi Ray 1ab5f00
-  Copyright © 2014 Christian Persch
Debarshi Ray 1ab5f00
-
Debarshi Ray 1ab5f00
-  This program is free software; you can redistribute it and/or modify
Debarshi Ray 1ab5f00
-  it under the terms of the GNU General Public License as published by
Debarshi Ray 1ab5f00
-  the Free Software Foundation; either version 3, or (at your option)
Debarshi Ray 1ab5f00
-  any later version.
Debarshi Ray 1ab5f00
-
Debarshi Ray 1ab5f00
-  This program is distributed in the hope conf it will be useful,
Debarshi Ray 1ab5f00
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
Debarshi Ray 1ab5f00
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Debarshi Ray 1ab5f00
-  GNU General Public License for more details.
Debarshi Ray 1ab5f00
-
Debarshi Ray 1ab5f00
-  You should have received a copy of the GNU General Public License
Debarshi Ray 1ab5f00
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
Debarshi Ray 1ab5f00
--->
Debarshi Ray 1ab5f00
-
Debarshi Ray 1ab5f00
-
Debarshi Ray 1ab5f00
-  xmlns="https://www.freedesktop.org/standards/appdata/1.0"
Debarshi Ray 1ab5f00
-  xmlns:xi="http://www.w3.org/2001/XInclude"
Debarshi Ray 1ab5f00
-  xmlns:its="http://www.w3.org/2005/11/its">
Debarshi Ray 1ab5f00
-  <id type="desktop">gnome-terminal.desktop</id>
Debarshi Ray 1ab5f00
-  <metadata_license>GPL-3.0+</metadata_license>
Debarshi Ray 1ab5f00
-  <project_license>GPL-3.0+</project_license>
Debarshi Ray 1ab5f00
-  <_name>Terminal</_name>
Debarshi Ray 1ab5f00
-  <_summary>Use the command line</_summary>
Debarshi Ray 1ab5f00
-  <description>
Debarshi Ray 1ab5f00
-    <_p>GNOME Terminal is a terminal emulator application for accessing a UNIX shell environment which can be used to run programs available on your system.</_p>
Debarshi Ray 1ab5f00
-    <_p>It supports several profiles, multiple tabs and implements several keyboard shortcuts.</_p>
Debarshi Ray 1ab5f00
-  </description>
Debarshi Ray 1ab5f00
-  <screenshots>
Debarshi Ray 1ab5f00
-    <screenshot type="default">https://help.gnome.org/users/gnome-terminal/stable/figures/gnome-terminal.png</screenshot>
Debarshi Ray 1ab5f00
-  </screenshots>
Debarshi Ray 1ab5f00
-  <url type="homepage">https://wiki.gnome.org/Apps/Terminal</url>
Debarshi Ray 1ab5f00
-  <project_group>GNOME</project_group>
Debarshi Ray 1ab5f00
-  <updatecontact>https://wiki.gnome.org/Apps/Terminal/ReportingBugs</updatecontact>
Debarshi Ray 1ab5f00
-</application>
Debarshi Ray 1ab5f00
diff --git a/gnome-terminal.desktop.in.in b/gnome-terminal.desktop.in.in
Debarshi Ray 1ab5f00
deleted file mode 100644
Debarshi Ray 1ab5f00
index e01c998..0000000
Debarshi Ray 1ab5f00
--- a/gnome-terminal.desktop.in.in
Debarshi Ray 1ab5f00
+++ /dev/null
Debarshi Ray 1ab5f00
@@ -1,16 +0,0 @@
Debarshi Ray 1ab5f00
-[Desktop Entry]
Debarshi Ray 1ab5f00
-_Name=Terminal
Debarshi Ray 1ab5f00
-_Comment=Use the command line
Debarshi Ray 1ab5f00
-_Keywords=shell;prompt;command;commandline;
Debarshi Ray 1ab5f00
-TryExec=gnome-terminal
Debarshi Ray 1ab5f00
-Exec=gnome-terminal
Debarshi Ray 1ab5f00
-Icon=utilities-terminal
Debarshi Ray 1ab5f00
-Type=Application
Debarshi Ray 1ab5f00
-X-GNOME-DocPath=gnome-terminal/index.html
Debarshi Ray 1ab5f00
-X-GNOME-Bugzilla-Bugzilla=GNOME
Debarshi Ray 1ab5f00
-X-GNOME-Bugzilla-Product=gnome-terminal
Debarshi Ray 1ab5f00
-X-GNOME-Bugzilla-Component=BugBuddyBugs
Debarshi Ray 1ab5f00
-X-GNOME-Bugzilla-Version=@VERSION@
Debarshi Ray 1ab5f00
-Categories=GNOME;GTK;System;TerminalEmulator;
Debarshi Ray 1ab5f00
-StartupNotify=true
Debarshi Ray 1ab5f00
-X-GNOME-SingleWindow=false
Debarshi Ray 1ab5f00
diff --git a/org.gnome.Terminal.appdata.xml.in b/org.gnome.Terminal.appdata.xml.in
Debarshi Ray 1ab5f00
new file mode 100644
Debarshi Ray 1ab5f00
index 0000000..ab4f23b
Debarshi Ray 1ab5f00
--- /dev/null
Debarshi Ray 1ab5f00
+++ b/org.gnome.Terminal.appdata.xml.in
Debarshi Ray 1ab5f00
@@ -0,0 +1,38 @@
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  Copyright © 2014 Christian Persch
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  This program is free software; you can redistribute it and/or modify
Debarshi Ray 1ab5f00
+  it under the terms of the GNU General Public License as published by
Debarshi Ray 1ab5f00
+  the Free Software Foundation; either version 3, or (at your option)
Debarshi Ray 1ab5f00
+  any later version.
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  This program is distributed in the hope conf it will be useful,
Debarshi Ray 1ab5f00
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
Debarshi Ray 1ab5f00
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Debarshi Ray 1ab5f00
+  GNU General Public License for more details.
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  You should have received a copy of the GNU General Public License
Debarshi Ray 1ab5f00
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
Debarshi Ray 1ab5f00
+-->
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
+  xmlns="https://www.freedesktop.org/standards/appdata/1.0"
Debarshi Ray 1ab5f00
+  xmlns:xi="http://www.w3.org/2001/XInclude"
Debarshi Ray 1ab5f00
+  xmlns:its="http://www.w3.org/2005/11/its">
Debarshi Ray 1ab5f00
+  <id type="desktop">org.gnome.Terminal.desktop</id>
Debarshi Ray 1ab5f00
+  <metadata_license>GPL-3.0+</metadata_license>
Debarshi Ray 1ab5f00
+  <project_license>GPL-3.0+</project_license>
Debarshi Ray 1ab5f00
+  <_name>Terminal</_name>
Debarshi Ray 1ab5f00
+  <_summary>Use the command line</_summary>
Debarshi Ray 1ab5f00
+  <description>
Debarshi Ray 1ab5f00
+    <_p>GNOME Terminal is a terminal emulator application for accessing a UNIX shell environment which can be used to run programs available on your system.</_p>
Debarshi Ray 1ab5f00
+    <_p>It supports several profiles, multiple tabs and implements several keyboard shortcuts.</_p>
Debarshi Ray 1ab5f00
+  </description>
Debarshi Ray 1ab5f00
+  <screenshots>
Debarshi Ray 1ab5f00
+    <screenshot type="default">https://help.gnome.org/users/gnome-terminal/stable/figures/gnome-terminal.png</screenshot>
Debarshi Ray 1ab5f00
+  </screenshots>
Debarshi Ray 1ab5f00
+  <url type="homepage">https://wiki.gnome.org/Apps/Terminal</url>
Debarshi Ray 1ab5f00
+  <project_group>GNOME</project_group>
Debarshi Ray 1ab5f00
+  <updatecontact>https://wiki.gnome.org/Apps/Terminal/ReportingBugs</updatecontact>
Debarshi Ray 1ab5f00
+</application>
Debarshi Ray 1ab5f00
diff --git a/org.gnome.Terminal.desktop.in.in b/org.gnome.Terminal.desktop.in.in
Debarshi Ray 1ab5f00
new file mode 100644
Debarshi Ray 1ab5f00
index 0000000..e01c998
Debarshi Ray 1ab5f00
--- /dev/null
Debarshi Ray 1ab5f00
+++ b/org.gnome.Terminal.desktop.in.in
Debarshi Ray 1ab5f00
@@ -0,0 +1,16 @@
Debarshi Ray 1ab5f00
+[Desktop Entry]
Debarshi Ray 1ab5f00
+_Name=Terminal
Debarshi Ray 1ab5f00
+_Comment=Use the command line
Debarshi Ray 1ab5f00
+_Keywords=shell;prompt;command;commandline;
Debarshi Ray 1ab5f00
+TryExec=gnome-terminal
Debarshi Ray 1ab5f00
+Exec=gnome-terminal
Debarshi Ray 1ab5f00
+Icon=utilities-terminal
Debarshi Ray 1ab5f00
+Type=Application
Debarshi Ray 1ab5f00
+X-GNOME-DocPath=gnome-terminal/index.html
Debarshi Ray 1ab5f00
+X-GNOME-Bugzilla-Bugzilla=GNOME
Debarshi Ray 1ab5f00
+X-GNOME-Bugzilla-Product=gnome-terminal
Debarshi Ray 1ab5f00
+X-GNOME-Bugzilla-Component=BugBuddyBugs
Debarshi Ray 1ab5f00
+X-GNOME-Bugzilla-Version=@VERSION@
Debarshi Ray 1ab5f00
+Categories=GNOME;GTK;System;TerminalEmulator;
Debarshi Ray 1ab5f00
+StartupNotify=true
Debarshi Ray 1ab5f00
+X-GNOME-SingleWindow=false
Debarshi Ray 1ab5f00
diff --git a/po/POTFILES.in b/po/POTFILES.in
Debarshi Ray 1ab5f00
index af1304d..0aa03ec 100644
Debarshi Ray 1ab5f00
--- a/po/POTFILES.in
Debarshi Ray 1ab5f00
+++ b/po/POTFILES.in
Debarshi Ray 1ab5f00
@@ -1,8 +1,8 @@
Debarshi Ray 1ab5f00
 [encoding: UTF-8]
Debarshi Ray 1ab5f00
 # List of source files containing translatable strings.
Debarshi Ray 1ab5f00
 # Please keep this file sorted alphabetically.
Debarshi Ray 1ab5f00
-gnome-terminal.appdata.xml.in
Debarshi Ray 1ab5f00
-gnome-terminal.desktop.in.in
Debarshi Ray 1ab5f00
+org.gnome.Terminal.appdata.xml.in
Debarshi Ray 1ab5f00
+org.gnome.Terminal.desktop.in.in
Debarshi Ray 1ab5f00
 [type: gettext/glade]src/find-dialog.ui
Debarshi Ray 1ab5f00
 src/gterminal.vala
Debarshi Ray 1ab5f00
 src/migration.c
Debarshi Ray 1ab5f00
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
Debarshi Ray 1ab5f00
index 7c37b7f..ef7c635 100644
Debarshi Ray 1ab5f00
--- a/po/POTFILES.skip
Debarshi Ray 1ab5f00
+++ b/po/POTFILES.skip
Debarshi Ray 1ab5f00
@@ -1,4 +1,4 @@
Debarshi Ray 1ab5f00
 # List of source files that should *not* be translated.
Debarshi Ray 1ab5f00
 # Please keep this file sorted alphabetically.
Debarshi Ray 1ab5f00
-gnome-terminal.desktop.in
Debarshi Ray 1ab5f00
+org.gnome.Terminal.desktop.in
Debarshi Ray 1ab5f00
 src/gterminal.c
Debarshi Ray 1ab5f00
diff --git a/src/gnome-terminal-search-provider.ini b/src/gnome-terminal-search-provider.ini
Debarshi Ray 1ab5f00
index b6506f2..1b9f81c 100644
Debarshi Ray 1ab5f00
--- a/src/gnome-terminal-search-provider.ini
Debarshi Ray 1ab5f00
+++ b/src/gnome-terminal-search-provider.ini
Debarshi Ray 1ab5f00
@@ -14,7 +14,7 @@
Debarshi Ray 1ab5f00
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 [Shell Search Provider]
Debarshi Ray 1ab5f00
-DesktopId=gnome-terminal.desktop
Debarshi Ray 1ab5f00
+DesktopId=org.gnome.Terminal.desktop
Debarshi Ray 1ab5f00
 BusName=org.gnome.Terminal
Debarshi Ray 1ab5f00
 ObjectPath=/org/gnome/Terminal/SearchProvider
Debarshi Ray 1ab5f00
 Version=2
Debarshi Ray 1ab5f00
-- 
Debarshi Ray 1ab5f00
2.1.0
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
Debarshi Ray 01b1868
From acd11f2b16e6fffebcb881a447b37913a960a324 Mon Sep 17 00:00:00 2001
Debarshi Ray 1ab5f00
From: Debarshi Ray <debarshir@gnome.org>
Debarshi Ray 1ab5f00
Date: Thu, 29 Jan 2015 11:47:21 +0100
Debarshi Ray 1ab5f00
Subject: [PATCH 3/3] Sprinkle debug messages for notifications
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
This can be useful for finding out whether the escape sequence wasn't
Debarshi Ray 1ab5f00
emitted or the filtering was faulty.
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
https://bugzilla.gnome.org/show_bug.cgi?id=711059
Debarshi Ray 1ab5f00
---
Debarshi Ray 1ab5f00
 src/terminal-debug.c  | 1 +
Debarshi Ray 1ab5f00
 src/terminal-debug.h  | 3 ++-
Debarshi Ray 01b1868
 src/terminal-screen.c | 6 ++++++
Debarshi Ray 01b1868
 3 files changed, 9 insertions(+), 1 deletion(-)
Debarshi Ray 1ab5f00
Debarshi Ray 1ab5f00
diff --git a/src/terminal-debug.c b/src/terminal-debug.c
Debarshi Ray 1ab5f00
index 0ff321f..dac79c3 100644
Debarshi Ray 1ab5f00
--- a/src/terminal-debug.c
Debarshi Ray 1ab5f00
+++ b/src/terminal-debug.c
Debarshi Ray 1ab5f00
@@ -38,6 +38,7 @@ _terminal_debug_init(void)
Debarshi Ray 1ab5f00
     { "settings-list", TERMINAL_DEBUG_SETTINGS_LIST },
Debarshi Ray 1ab5f00
     { "appmenu",       TERMINAL_DEBUG_APPMENU       },
Debarshi Ray 1ab5f00
     { "search",        TERMINAL_DEBUG_SEARCH        },
Debarshi Ray 1ab5f00
+    { "notifications", TERMINAL_DEBUG_NOTIFICATIONS },
Debarshi Ray 1ab5f00
   };
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
   _terminal_debug_flags = g_parse_debug_string (g_getenv ("GNOME_TERMINAL_DEBUG"),
Debarshi Ray 1ab5f00
diff --git a/src/terminal-debug.h b/src/terminal-debug.h
Debarshi Ray 1ab5f00
index 5dc3ca4..7499ebe 100644
Debarshi Ray 1ab5f00
--- a/src/terminal-debug.h
Debarshi Ray 1ab5f00
+++ b/src/terminal-debug.h
Debarshi Ray 1ab5f00
@@ -34,7 +34,8 @@ typedef enum {
Debarshi Ray 1ab5f00
   TERMINAL_DEBUG_PROFILE       = 1 << 6,
Debarshi Ray 1ab5f00
   TERMINAL_DEBUG_SETTINGS_LIST = 1 << 7,
Debarshi Ray 1ab5f00
   TERMINAL_DEBUG_APPMENU       = 1 << 8,
Debarshi Ray 1ab5f00
-  TERMINAL_DEBUG_SEARCH        = 1 << 9
Debarshi Ray 1ab5f00
+  TERMINAL_DEBUG_SEARCH        = 1 << 9,
Debarshi Ray 1ab5f00
+  TERMINAL_DEBUG_NOTIFICATIONS = 1 << 10
Debarshi Ray 1ab5f00
 } TerminalDebugFlags;
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
 void _terminal_debug_init(void);
Debarshi Ray 1ab5f00
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
Debarshi Ray 01b1868
index bb139e3..cd12ab9 100644
Debarshi Ray 1ab5f00
--- a/src/terminal-screen.c
Debarshi Ray 1ab5f00
+++ b/src/terminal-screen.c
Debarshi Ray 01b1868
@@ -1523,6 +1523,8 @@ terminal_screen_focus_in (GtkWidget     *widget,
Debarshi Ray 01b1868
   TerminalApp *app;
Debarshi Ray 01b1868
   TerminalWindow *window;
Debarshi Ray 01b1868
 
Debarshi Ray 01b1868
+  _terminal_debug_print (TERMINAL_DEBUG_NOTIFICATIONS, "Notification withdrawn\n");
Debarshi Ray 01b1868
+
Debarshi Ray 01b1868
   window = terminal_screen_get_window (screen);
Debarshi Ray 01b1868
   if (window != NULL)
Debarshi Ray 01b1868
     {
Debarshi Ray 01b1868
@@ -1661,6 +1663,8 @@ terminal_screen_notification_received (VteTerminal *terminal,
Debarshi Ray 1ab5f00
   TerminalScreenPrivate *priv = screen->priv;
Debarshi Ray 1ab5f00
   TerminalWindow *window;
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
+  _terminal_debug_print (TERMINAL_DEBUG_NOTIFICATIONS, "Notification received: [%s]: %s\n", summary, body);
Debarshi Ray 1ab5f00
+
Debarshi Ray 1ab5f00
   if (G_UNLIKELY (!priv->shell_prompt_shown))
Debarshi Ray 1ab5f00
     {
Debarshi Ray 1ab5f00
       priv->shell_prompt_shown = TRUE;
Debarshi Ray 01b1868
@@ -1692,6 +1696,7 @@ terminal_screen_notification_received (VteTerminal *terminal,
Debarshi Ray 1ab5f00
           tab_label = gtk_notebook_get_tab_label (GTK_NOTEBOOK (mdi_container), GTK_WIDGET (screen_container));
Debarshi Ray 1ab5f00
           terminal_tab_label_set_bold (TERMINAL_TAB_LABEL (tab_label), TRUE);
Debarshi Ray 1ab5f00
           terminal_tab_label_set_icon (TERMINAL_TAB_LABEL (tab_label), "dialog-information-symbolic", summary);
Debarshi Ray 1ab5f00
+          _terminal_debug_print (TERMINAL_DEBUG_NOTIFICATIONS, "Notify tab\n");
Debarshi Ray 1ab5f00
         }
Debarshi Ray 1ab5f00
     }
Debarshi Ray 1ab5f00
   else
Debarshi Ray 01b1868
@@ -1707,6 +1712,7 @@ terminal_screen_notification_received (VteTerminal *terminal,
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
       app = terminal_app_get ();
Debarshi Ray 1ab5f00
       g_application_send_notification (G_APPLICATION (app), priv->uuid, notification);
Debarshi Ray 1ab5f00
+      _terminal_debug_print (TERMINAL_DEBUG_NOTIFICATIONS, "Notify desktop\n");
Debarshi Ray 1ab5f00
     }
Debarshi Ray 1ab5f00
 }
Debarshi Ray 1ab5f00
 
Debarshi Ray 1ab5f00
-- 
Debarshi Ray 1ab5f00
2.1.0
Debarshi Ray 1ab5f00