[gnome-terminal] Connect to create-window directly



commit e8bf9269636b82787738b2c5a9167a4077611478
Author: Christian Persch <chpe gnome org>
Date:   Sun Sep 26 16:27:52 2010 +0200

    Connect to create-window directly
    
    ... instead of using the hook, on gtk 3.

 src/terminal-window.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-window.c b/src/terminal-window.c
index ebd4f4e..cbc1b4e 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -1177,7 +1177,7 @@ handle_tab_droped_on_desktop (GtkNotebook *source_notebook,
                               GtkWidget   *container,
                               gint         x,
                               gint         y,
-                              gpointer     data)
+                              gpointer     data G_GNUC_UNUSED)
 {
   TerminalScreen *screen;
   TerminalWindow *source_window;
@@ -2061,6 +2061,9 @@ terminal_window_init (TerminalWindow *window)
                          G_CALLBACK (terminal_window_update_tabs_menu_sensitivity),
                          window, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER);
 #if GTK_CHECK_VERSION (2, 90, 8)
+  g_signal_connect (priv->notebook, "create-window",
+                    G_CALLBACK (handle_tab_droped_on_desktop), window);
+
   /* Tab scrolling was removed from GtkNotebook in gtk 3 */
   gtk_widget_add_events (priv->notebook, GDK_SCROLL_MASK);
   g_signal_connect (priv->notebook, "scroll-event",
@@ -2186,7 +2189,9 @@ terminal_window_class_init (TerminalWindowClass *klass)
                        "}\n"
                        "widget \"*.gnome-terminal-tab-close-button\" style \"gnome-terminal-tab-close-button-style\"");
 
+#if !GTK_CHECK_VERSION (2, 90, 8)
   gtk_notebook_set_window_creation_hook (handle_tab_droped_on_desktop, NULL, NULL);
+#endif
 }
 
 static void



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