gnome-terminal r3155 - trunk/src



Author: chpe
Date: Thu Oct  9 18:25:47 2008
New Revision: 3155
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3155&view=rev

Log:
Make this a class closure.

Modified:
   trunk/src/terminal-screen.c

Modified: trunk/src/terminal-screen.c
==============================================================================
--- trunk/src/terminal-screen.c	(original)
+++ trunk/src/terminal-screen.c	Thu Oct  9 18:25:47 2008
@@ -120,15 +120,13 @@
 static gboolean terminal_screen_popup_menu (GtkWidget *widget);
 static gboolean terminal_screen_button_press (GtkWidget *widget,
                                               GdkEventButton *event);
+static void terminal_screen_child_exited  (VteTerminal *terminal);
 
 static void terminal_screen_window_title_changed      (VteTerminal *vte_terminal,
                                                        TerminalScreen *screen);
 static void terminal_screen_icon_title_changed        (VteTerminal *vte_terminal,
                                                        TerminalScreen *screen);
 
-static void terminal_screen_widget_child_died        (GtkWidget      *term,
-                                                      TerminalScreen *screen);
-
 static void update_color_scheme                      (TerminalScreen *screen);
 
 static gboolean cook_title  (TerminalScreen *screen, const char *raw_title, char **old_cooked_title);
@@ -369,10 +367,6 @@
                     G_CALLBACK (terminal_screen_icon_title_changed),
                     screen);
 
-  g_signal_connect (screen, "child-exited",
-                    G_CALLBACK (terminal_screen_widget_child_died),
-                    screen);
-
   g_signal_connect (terminal_app_get (), "notify::system-font",
                     G_CALLBACK (terminal_screen_system_font_notify_cb), screen);
 
@@ -457,6 +451,7 @@
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
+  VteTerminalClass *terminal_class = VTE_TERMINAL_CLASS (klass);
   guint i;
 
   object_class->dispose = terminal_screen_dispose;
@@ -470,6 +465,8 @@
   widget_class->button_press_event = terminal_screen_button_press;
   widget_class->popup_menu = terminal_screen_popup_menu;
 
+  terminal_class->child_exited = terminal_screen_child_exited;
+
   signals[PROFILE_SET] =
     g_signal_new (I_("profile-set"),
                   G_OBJECT_CLASS_TYPE (object_class),
@@ -1789,14 +1786,15 @@
   queue_recheck_working_dir (screen);
 }
 
-
 static void
-terminal_screen_widget_child_died (GtkWidget      *term,
-                                   TerminalScreen *screen)
+terminal_screen_child_exited (VteTerminal *terminal)
 {
+  TerminalScreen *screen = TERMINAL_SCREEN (terminal);
   TerminalScreenPrivate *priv = screen->priv;
   TerminalExitAction action;
 
+  /* No need to chain up to VteTerminalClass::child_exited since it's NULL */
+
   priv->child_pid = -1;
   
   action = terminal_profile_get_property_enum (priv->profile, TERMINAL_PROFILE_EXIT_ACTION);



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