[vte/vte-next: 36/114] Remove sealed icon_title from public struct



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

    Remove sealed icon_title from public struct

 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 c10701e..34ba217 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -360,6 +360,7 @@ struct _VteTerminalPrivate {
 	/* window name changes */
         gchar *window_title;
 	gchar *window_title_changed;
+        gchar *icon_title;
 	gchar *icon_title_changed;
 
 	/* Background images/"transparency". */
diff --git a/src/vte.c b/src/vte.c
index 293e63c..e9bb88c 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8339,7 +8339,7 @@ vte_terminal_finalize(GObject *object)
 	g_free(terminal->pvt->icon_title_changed);
 
 	/* Free public-facing data. */
-	g_free(terminal->icon_title);
+	g_free(terminal->pvt->icon_title);
 	if (terminal->adjustment != NULL) {
 		g_object_unref(terminal->adjustment);
 	}
@@ -13339,7 +13339,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;
 }
 
 /**
@@ -13734,12 +13734,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 4d1893d..aa8d8aa 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -68,9 +68,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 e062ffc..a713ec0 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -57,11 +57,10 @@ 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);
 	window = GTK_WINDOW(win);
 
 	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 5d69aa6..fd6a236 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -3214,7 +3214,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]