[vte] emulation: Remove icon title support



commit d17321a21c37369bd1383611d245b0ccb80c8cac
Author: Christian Persch <chpe src gnome org>
Date:   Tue Mar 27 19:40:12 2018 +0200

    emulation: Remove icon title support
    
    Remove OSC 1 (icon title) support; this is a relic and not
    useful anymore.
    
    Deprecate vte_terminal_get_icon_title(), the "icon-title-changed"
    signal and the "icon-title" property, as well.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=793203

 doc/reference/vte-sections.txt |    2 +-
 src/vte.cc                     |   14 --------------
 src/vte/vtedeprecated.h        |    4 ++++
 src/vte/vteterminal.h          |    2 --
 src/vtegtk.cc                  |   10 ++++++----
 src/vteinternal.hh             |    3 ---
 src/vteseq.cc                  |   23 +++--------------------
 7 files changed, 14 insertions(+), 44 deletions(-)
---
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index 6e37f0b..414c136 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -134,7 +134,6 @@ VTE_TERMINAL_CLASS
 vte_terminal_get_char_height
 vte_terminal_get_char_width
 vte_terminal_get_column_count
-vte_terminal_get_icon_title
 vte_terminal_get_row_count
 vte_terminal_get_window_title
 vte_terminal_get_current_directory_uri
@@ -150,6 +149,7 @@ vte_terminal_event_check_gregex_simple
 vte_terminal_spawn_sync
 vte_terminal_get_geometry_hints
 vte_terminal_set_geometry_hints_for_window
+vte_terminal_get_icon_title
 
 <SUBSECTION Private>
 VteCharAttributes
diff --git a/src/vte.cc b/src/vte.cc
index fdf7a23..2d3a388 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -10847,20 +10847,6 @@ VteTerminalPrivate::emit_pending_signals()
                 m_window_title_changed = false;
        }
 
-       if (m_icon_title_changed) {
-                if (m_icon_title != m_icon_title_pending) {
-                        m_icon_title.swap(m_icon_title_pending);
-
-                        _vte_debug_print(VTE_DEBUG_SIGNALS,
-                                         "Emitting `icon-title-changed'.\n");
-                        g_signal_emit(object, signals[SIGNAL_ICON_TITLE_CHANGED], 0);
-                        g_object_notify_by_pspec(object, pspecs[PROP_ICON_TITLE]);
-                }
-
-               m_icon_title_pending.clear();
-               m_icon_title_changed = false;
-       }
-
        if (m_current_directory_uri_changed) {
                 if (m_current_directory_uri != m_current_directory_uri_pending) {
                         m_current_directory_uri.swap(m_current_directory_uri_pending);
diff --git a/src/vte/vtedeprecated.h b/src/vte/vtedeprecated.h
index 98cc73c..d154145 100644
--- a/src/vte/vtedeprecated.h
+++ b/src/vte/vtedeprecated.h
@@ -105,6 +105,10 @@ _VTE_PUBLIC
 void vte_terminal_set_geometry_hints_for_window(VteTerminal *terminal,
                                                 GtkWindow *window) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
 
+_VTE_DEPRECATED
+_VTE_PUBLIC
+const char *vte_terminal_get_icon_title(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+
 G_END_DECLS
 
 #undef _VTE_DEPRECATED
diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
index 4e2896c..d468f66 100644
--- a/src/vte/vteterminal.h
+++ b/src/vte/vteterminal.h
@@ -468,8 +468,6 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 _VTE_PUBLIC
 const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 _VTE_PUBLIC
-const char *vte_terminal_get_icon_title(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
-_VTE_PUBLIC
 const char *vte_terminal_get_current_directory_uri(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 _VTE_PUBLIC
 const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 57e259d..ab472fb 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -804,7 +804,7 @@ vte_terminal_class_init(VteTerminalClass *klass)
          * VteTerminal::icon-title-changed:
          * @vteterminal: the object which received the signal
          *
-         * Emitted when the terminal's %icon_title field is modified.
+         * Deprecated: 0.54: This signal is never emitted.
          */
         signals[SIGNAL_ICON_TITLE_CHANGED] =
                 g_signal_new(I_("icon-title-changed"),
@@ -1467,7 +1467,7 @@ vte_terminal_class_init(VteTerminalClass *klass)
         /**
          * VteTerminal:icon-title:
          *
-         * The terminal's so-called icon title, or %NULL if no icon title has been set.
+         * Deprecated: 0.54: This property is always %NULL.
          */
         pspecs[PROP_ICON_TITLE] =
                 g_param_spec_string ("icon-title", NULL, NULL,
@@ -3882,13 +3882,15 @@ vte_terminal_get_has_selection(VteTerminal *terminal)
  * vte_terminal_get_icon_title:
  * @terminal: a #VteTerminal
  *
- * Returns: (transfer none): the icon title
+ * Returns: (transfer none): %NULL
+ *
+ * Deprecated: 0.54:
  */
 const char *
 vte_terminal_get_icon_title(VteTerminal *terminal)
 {
        g_return_val_if_fail(VTE_IS_TERMINAL(terminal), "");
-       return IMPL(terminal)->m_icon_title.data();
+       return nullptr;
 }
 
 /**
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index b4c0123..e230600 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -516,14 +516,11 @@ public:
         gboolean m_contents_changed_pending;
 
         std::string m_window_title{};
-        std::string m_icon_title{};
         std::string m_current_directory_uri{};
         std::string m_current_file_uri{};
         std::string m_window_title_pending{};
-        std::string m_icon_title_pending{};
         std::string m_current_directory_uri_pending{};
         std::string m_current_file_uri_pending{};
-        bool m_icon_title_changed{false};
         bool m_window_title_changed{false};
         bool m_current_directory_uri_changed{false};
         bool m_current_file_uri_changed{false};
diff --git a/src/vteseq.cc b/src/vteseq.cc
index c832c3f..5be0725 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -4508,27 +4508,9 @@ VteTerminalPrivate::OSC(vte::parser::Sequence const& seq)
                 break;
 
         case -1: /* default */
-        case VTE_OSC_XTERM_SET_WINDOW_AND_ICON_TITLE: {
-                std::string title;
-                if (it != cend)
-                        title = it.string_remaining();
-                m_icon_title_pending = title;
-                m_window_title_pending.swap(title);
-                m_icon_title_changed = true;
-                m_window_title_changed = true;
-                break;
-        }
-
-        case VTE_OSC_XTERM_SET_ICON_TITLE: {
-                std::string title;
-                if (it != cend)
-                        title = it.string_remaining();
-                m_icon_title_pending.swap(title);
-                m_icon_title_changed = true;
-                break;
-        }
-
+        case VTE_OSC_XTERM_SET_WINDOW_AND_ICON_TITLE:
         case VTE_OSC_XTERM_SET_WINDOW_TITLE: {
+                /* Only sets window title; icon title is not supported */
                 std::string title;
                 if (it != cend)
                         title = it.string_remaining();
@@ -4585,6 +4567,7 @@ VteTerminalPrivate::OSC(vte::parser::Sequence const& seq)
                 reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE);
                 break;
 
+        case VTE_OSC_XTERM_SET_ICON_TITLE:
         case VTE_OSC_XTERM_SET_XPROPERTY:
         case VTE_OSC_XTERM_SET_COLOR_SPECIAL:
         case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]