[vte] widget: Remove sealed icon_title from public struct



commit 447b526f44954da888fc8d294f574ed17ce754dd
Author: Christian Persch <chpe gnome org>
Date:   Mon May 2 22:46:17 2011 +0200

    widget: Remove sealed icon_title from public struct
    
    Conflicts:
        src/vteapp.c

 src/vte-private.h |    1 +
 src/vte.c         |   10 +++++-----
 src/vte.h         |    3 ---
 src/vteapp.c      |    3 +--
 src/vteseq.c      |    2 +-
 5 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index eb57043..6ea4806 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -393,6 +393,7 @@ struct _VteTerminalPrivate {
        /* window name changes */
         gchar *window_title;
        gchar *window_title_changed;
+        gchar *icon_title;
        gchar *icon_title_changed;
         gchar *current_directory_uri;
         gchar *current_directory_uri_changed;
diff --git a/src/vte.c b/src/vte.c
index f084381..9d1c973 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8640,7 +8640,7 @@ vte_terminal_finalize(GObject *object)
         g_free(terminal->pvt->current_file_uri);
 
        /* Free public-facing data. */
-       g_free(terminal->icon_title);
+       g_free(terminal->pvt->icon_title);
        if (terminal->adjustment != NULL) {
                g_object_unref(terminal->adjustment);
        }
@@ -13482,7 +13482,7 @@ const char *
 vte_terminal_get_icon_title(VteTerminal *terminal)
 {
        g_return_val_if_fail(VTE_IS_TERMINAL(terminal), "");
-       return terminal->icon_title;
+       return terminal->pvt->icon_title;
 }
 
 /**
@@ -13926,12 +13926,12 @@ vte_terminal_emit_pending_signals(VteTerminal *terminal)
        }
 
        if (terminal->pvt->icon_title_changed) {
-               g_free (terminal->icon_title);
-               terminal->icon_title = terminal->pvt->icon_title_changed;
+               g_free (terminal->pvt->icon_title);
+               terminal->pvt->icon_title = terminal->pvt->icon_title_changed;
                terminal->pvt->icon_title_changed = NULL;
 
                if (window)
-                       gdk_window_set_icon_name (window, terminal->icon_title);
+                       gdk_window_set_icon_name (window, terminal->pvt->icon_title);
                vte_terminal_emit_icon_title_changed(terminal);
                 g_object_notify(object, "icon-title");
        }
diff --git a/src/vte.h b/src/vte.h
index e202a05..8fdaffe 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -63,9 +63,6 @@ struct _VteTerminal {
         /*< private >*/
        GtkAdjustment *_VTE_SEAL(adjustment);   /* Scrolling adjustment. */
 
-       /* Titles. */
-       char *_VTE_SEAL(icon_title);
-
        /*< private >*/
        VteTerminalPrivate *pvt;
 };
diff --git a/src/vteapp.c b/src/vteapp.c
index 360ecc8..3ccdf8c 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -55,10 +55,9 @@ icon_title_changed(GtkWidget *widget, gpointer win)
 {
        g_assert(VTE_TERMINAL(widget));
        g_assert(GTK_IS_WINDOW(win));
-       g_assert(VTE_TERMINAL(widget)->icon_title != NULL);
 
        g_message("Icon title changed to \"%s\".\n",
-                 VTE_TERMINAL(widget)->icon_title);
+                 vte_terminal_get_icon_title(VTE_TERMINAL(widget)));
 }
 
 static void
diff --git a/src/vteseq.c b/src/vteseq.c
index b9d8fef..d3513d4 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -3503,7 +3503,7 @@ vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *pa
                           and CVE-2003-0070. */
                        _vte_debug_print(VTE_DEBUG_PARSE,
                                "Reporting fake icon title.\n");
-                       /* never use terminal->icon_title here! */
+                       /* never use terminal->pvt->icon_title here! */
                        g_snprintf (buf, sizeof (buf),
                                    _VTE_CAP_OSC "LTerminal" _VTE_CAP_ST);
                        vte_terminal_feed_child(terminal, buf, -1);


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