gnome-terminal r2774 - trunk/src



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

Log:
Avoid using priv->window in TerminalScreen here.


Modified:
   trunk/src/skey-popup.c
   trunk/src/skey-popup.h
   trunk/src/terminal-screen.c

Modified: trunk/src/skey-popup.c
==============================================================================
--- trunk/src/skey-popup.c	(original)
+++ trunk/src/skey-popup.c	Thu May 29 19:52:57 2008
@@ -101,16 +101,20 @@
 
 void
 terminal_skey_do_popup (TerminalScreen *screen,
-			GtkWindow      *transient_parent,
 			const gchar    *skey_match)
 {
   static GtkWidget *dialog = NULL;
   GtkWidget *entry;
+  GtkWidget *transient_parent;
   GtkWidget *ok_button;
   gint seq;
   gchar *seed;
   gint hash = MD5;
 
+  transient_parent = gtk_widget_get_toplevel (GTK_WIDGET (screen));
+  if (!GTK_WIDGET_TOPLEVEL (transient_parent))
+    transient_parent = NULL;
+
   if (strncmp (SKEY_PREFIX, skey_match, strlen (SKEY_PREFIX)) == 0)
     {
       if (!extract_seq_and_seed (skey_match, &seq, &seed))

Modified: trunk/src/skey-popup.h
==============================================================================
--- trunk/src/skey-popup.h	(original)
+++ trunk/src/skey-popup.h	Thu May 29 19:52:57 2008
@@ -26,7 +26,6 @@
 G_BEGIN_DECLS
 
 void terminal_skey_do_popup (TerminalScreen *screen,
-			     GtkWindow      *transient_parent,
 			     const gchar    *skey_match);
 
 G_END_DECLS

Modified: trunk/src/terminal-screen.c
==============================================================================
--- trunk/src/terminal-screen.c	(original)
+++ trunk/src/terminal-screen.c	Thu May 29 19:52:57 2008
@@ -1444,7 +1444,7 @@
                                                      NULL);
       if (skey_match != NULL)
 	{
-	  terminal_skey_do_popup (screen, GTK_WINDOW (priv->window), skey_match);
+	  terminal_skey_do_popup (screen, skey_match);
 	  g_free (skey_match);
           g_free (matched_string);
 



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