gnome-terminal r3144 - trunk/src



Author: chpe
Date: Wed Oct  8 13:02:33 2008
New Revision: 3144
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3144&view=rev

Log:
Bug 548388 â Set title dialog should activate with Enter
Patch by Ian Hands.

Modified:
   trunk/src/terminal-window.c

Modified: trunk/src/terminal-window.c
==============================================================================
--- trunk/src/terminal-window.c	(original)
+++ trunk/src/terminal-window.c	Wed Oct  8 13:02:33 2008
@@ -2951,12 +2951,15 @@
                                        int response,
                                        TerminalScreen *screen)
 {
-  GtkEntry *entry;
-  const char *text;
+  if (response == GTK_RESPONSE_OK)
+    {
+      GtkEntry *entry;
+      const char *text;
 
-  entry = GTK_ENTRY (g_object_get_data (G_OBJECT (dialog), "title-entry"));
-  text = gtk_entry_get_text (entry);
-  terminal_screen_set_user_title (screen, text);
+      entry = GTK_ENTRY (g_object_get_data (G_OBJECT (dialog), "title-entry"));
+      text = gtk_entry_get_text (entry);
+      terminal_screen_set_user_title (screen, text);
+    }
 
   gtk_widget_destroy (dialog);
 }
@@ -2982,7 +2985,7 @@
   gtk_window_set_title (GTK_WINDOW (dialog), _("Set Title"));
   gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
   gtk_window_set_role (GTK_WINDOW (dialog), "gnome-terminal-change-title");
-  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
   g_signal_connect (dialog, "response",
                     G_CALLBACK (terminal_set_title_dialog_response_cb), priv->active_screen);



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