gnome-terminal r2581 - trunk/src



Author: chpe
Date: Thu May 29 19:35:35 2008
New Revision: 2581
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2581&view=rev

Log:
Use vte_terminal_get_*_title directly.


Modified:
   trunk/src/terminal-screen.c
   trunk/src/terminal-widget-vte.c
   trunk/src/terminal-widget.h

Modified: trunk/src/terminal-screen.c
==============================================================================
--- trunk/src/terminal-screen.c	(original)
+++ trunk/src/terminal-screen.c	Thu May 29 19:35:35 2008
@@ -31,6 +31,10 @@
 #define GTK_DISABLE_DEPRECATED
 #define GDK_DISABLE_DEPRECATED
 
+#include <X11/extensions/Xrender.h>
+
+#include <gdk/gdkx.h>
+
 #include "terminal-accels.h"
 #include "terminal-window.h"
 #include "terminal-widget.h"
@@ -95,9 +99,9 @@
                                                     GdkEventButton *event,
                                                     TerminalScreen *screen);
 
-static void terminal_screen_widget_title_changed      (GtkWidget      *term,
+static void terminal_screen_window_title_changed      (VteTerminal *vte_terminal,
                                                        TerminalScreen *screen);
-static void terminal_screen_widget_icon_title_changed (GtkWidget      *term,
+static void terminal_screen_icon_title_changed        (VteTerminal *vte_terminal,
                                                        TerminalScreen *screen);
 
 static void terminal_screen_widget_child_died        (GtkWidget      *term,
@@ -341,12 +345,12 @@
 
   priv->title_from_arg = NULL;
   priv->user_title = FALSE;
-  terminal_widget_connect_title_changed (priv->term,
-                                         G_CALLBACK (terminal_screen_widget_title_changed),
-                                         screen);
-
+  
+  g_signal_connect (screen, "window-title-changed",
+                    G_CALLBACK (terminal_screen_window_title_changed),
+                    screen);
   g_signal_connect (screen, "icon-title-changed",
-                    G_CALLBACK (terminal_screen_widget_icon_title_changed),
+                    G_CALLBACK (terminal_screen_icon_title_changed),
                     screen);
 
   terminal_widget_connect_child_died (priv->term,
@@ -1641,22 +1645,22 @@
 }
 
 static void
-terminal_screen_widget_title_changed (GtkWidget      *widget,
+terminal_screen_window_title_changed (VteTerminal *vte_terminal,
                                       TerminalScreen *screen)
 {
   terminal_screen_set_dynamic_title (screen,
-                                     terminal_widget_get_title (widget),
+                                     vte_terminal_get_window_title (vte_terminal),
 				     FALSE);
 
   queue_recheck_working_dir (screen);
 }
 
 static void
-terminal_screen_widget_icon_title_changed (GtkWidget      *widget,
-                                           TerminalScreen *screen)
+terminal_screen_icon_title_changed (VteTerminal *vte_terminal,
+                                    TerminalScreen *screen)
 {
   terminal_screen_set_dynamic_icon_title (screen,
-                                          terminal_widget_get_icon_title (widget),
+                                          vte_terminal_get_icon_title (vte_terminal),
 					  FALSE);  
 
   queue_recheck_working_dir (screen);

Modified: trunk/src/terminal-widget-vte.c
==============================================================================
--- trunk/src/terminal-widget-vte.c	(original)
+++ trunk/src/terminal-widget-vte.c	Thu May 29 19:35:35 2008
@@ -394,16 +394,6 @@
   vte_terminal_reset (VTE_TERMINAL(widget), TRUE, also_clear_afterward);
 }
 
-
-void
-terminal_widget_connect_title_changed (GtkWidget *widget,
-				       GCallback  callback,
-				       void      *data)
-{
-  g_signal_connect (widget, "window_title_changed",
-		    G_CALLBACK (callback), data);
-}
-
 void
 terminal_widget_disconnect_title_changed (GtkWidget *widget,
 					  GCallback  callback,
@@ -429,26 +419,6 @@
   g_signal_handlers_disconnect_by_func (widget, callback, data);
 }
 
-const char*
-terminal_widget_get_title (GtkWidget *widget)
-{
-  VteTerminal *terminal;
-
-  terminal = VTE_TERMINAL (widget);
-
-  return terminal->window_title;
-}
-
-const char*
-terminal_widget_get_icon_title (GtkWidget *widget)
-{
-  VteTerminal *terminal;
-  
-  terminal = VTE_TERMINAL (widget);
-
-  return terminal->icon_title;
-}
-
 gboolean
 terminal_widget_get_has_selection (GtkWidget *widget)
 {

Modified: trunk/src/terminal-widget.h
==============================================================================
--- trunk/src/terminal-widget.h	(original)
+++ trunk/src/terminal-widget.h	Thu May 29 19:35:35 2008
@@ -106,9 +106,6 @@
 void       terminal_widget_reset                      (GtkWidget            *widget,
                                                        gboolean              also_clear_afterward);
 
-void terminal_widget_connect_title_changed         (GtkWidget *widget,
-                                                    GCallback  callback,
-                                                    void      *data);
 void terminal_widget_disconnect_title_changed      (GtkWidget *widget,
                                                     GCallback  callback,
                                                     void      *data);
@@ -119,8 +116,6 @@
                                                     GCallback  callback,
                                                     void      *data);
 
-const char* terminal_widget_get_title         (GtkWidget *widget);
-const char* terminal_widget_get_icon_title    (GtkWidget *widget);
 gboolean    terminal_widget_get_has_selection (GtkWidget *widget);
 
 GtkAdjustment* terminal_widget_get_scroll_adjustment (GtkWidget *widget);



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