gnome-terminal r2758 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2758 - trunk/src
- Date: Thu, 29 May 2008 19:51:30 +0000 (UTC)
Author: chpe
Date: Thu May 29 19:51:29 2008
New Revision: 2758
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2758&view=rev
Log:
Fix another FIXME.
Modified:
trunk/src/terminal-app.c
trunk/src/terminal-screen.c
trunk/src/terminal-tabs-menu.c
trunk/src/terminal-window.c
trunk/src/terminal-window.h
trunk/src/terminal.c
Modified: trunk/src/terminal-app.c
==============================================================================
--- trunk/src/terminal-app.c (original)
+++ trunk/src/terminal-app.c Thu May 29 19:51:29 2008
@@ -1779,7 +1779,7 @@
terminal_window_add_screen (window, screen, -1);
- terminal_window_set_active (window, screen);
+ terminal_window_switch_screen (window, screen);
gtk_widget_grab_focus (GTK_WIDGET (screen));
}
else
@@ -1794,7 +1794,7 @@
terminal_window_add_screen (window, screen, -1);
g_object_unref (screen);
- terminal_window_set_active (window, screen);
+ terminal_window_switch_screen (window, screen);
gtk_widget_grab_focus (GTK_WIDGET (screen));
}
}
Modified: trunk/src/terminal-screen.c
==============================================================================
--- trunk/src/terminal-screen.c (original)
+++ trunk/src/terminal-screen.c Thu May 29 19:51:29 2008
@@ -1202,7 +1202,7 @@
if (gconf_client_get_bool (conf, HTTP_PROXY_DIR "/use_authentication", NULL))
{
- gchar *user, *password;
+ char *user, *password;
user = gconf_client_get_string (conf,
HTTP_PROXY_DIR "/authentication_user",
Modified: trunk/src/terminal-tabs-menu.c
==============================================================================
--- trunk/src/terminal-tabs-menu.c (original)
+++ trunk/src/terminal-tabs-menu.c Thu May 29 19:51:29 2008
@@ -168,7 +168,7 @@
if (terminal_window_get_active (priv->window) != screen)
{
- terminal_window_set_active (priv->window, screen);
+ terminal_window_switch_screen (priv->window, screen);
}
}
Modified: trunk/src/terminal-window.c
==============================================================================
--- trunk/src/terminal-window.c (original)
+++ trunk/src/terminal-window.c Thu May 29 19:51:29 2008
@@ -1921,14 +1921,13 @@
}
}
-void
+static void
terminal_window_set_active (TerminalWindow *window,
TerminalScreen *screen)
{
TerminalWindowPrivate *priv = window->priv;
GtkWidget *widget;
TerminalProfile *profile;
- guint page_num;
if (priv->active_term == screen)
return;
@@ -1966,10 +1965,6 @@
gdk_window_set_icon_name (GTK_WIDGET (window)->window, terminal_screen_get_icon_title (screen));
gtk_window_set_title (GTK_WINDOW (window), terminal_screen_get_title (screen));
- /* FIXMEchpe this is highly suspect code, called from below notebook_page_selected_callback!!! */
- page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook), GTK_WIDGET (screen)->parent);
- gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), page_num);
-
/* set size of window to current grid size */
#ifdef DEBUG_GEOMETRY
g_fprintf (stderr,"setting size after flipping notebook pages\n");
@@ -1981,6 +1976,18 @@
terminal_window_update_zoom_sensitivity (window);
}
+void
+terminal_window_switch_screen (TerminalWindow *window,
+ TerminalScreen *screen)
+{
+ TerminalWindowPrivate *priv = window->priv;
+ int page_num;
+
+ page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook),
+ GTK_WIDGET (screen)->parent);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), page_num);
+}
+
TerminalScreen*
terminal_window_get_active (TerminalWindow *window)
{
@@ -2080,6 +2087,9 @@
}
/* Make the first-added screen the active one */
+ /* FIXMEchpe: this shouldn't be necessary since we'll immediately get
+ * page-selected callback.
+ */
if (priv->active_term == NULL)
terminal_window_set_active (window, screen);
Modified: trunk/src/terminal-window.h
==============================================================================
--- trunk/src/terminal-window.h (original)
+++ trunk/src/terminal-window.h Thu May 29 19:51:29 2008
@@ -70,8 +70,8 @@
gboolean setting);
gboolean terminal_window_get_menubar_visible (TerminalWindow *window);
-void terminal_window_set_active (TerminalWindow *window,
- TerminalScreen *screen);
+void terminal_window_switch_screen (TerminalWindow *window,
+ TerminalScreen *screen);
TerminalScreen* terminal_window_get_active (TerminalWindow *window);
/* In order of their tabs in the notebook */
Modified: trunk/src/terminal.c
==============================================================================
--- trunk/src/terminal.c (original)
+++ trunk/src/terminal.c Thu May 29 19:51:29 2008
@@ -992,7 +992,7 @@
}
if (active_screen)
- terminal_window_set_active (current_window, active_screen);
+ terminal_window_switch_screen (current_window, active_screen);
tmp = tmp->next;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]