gnome-terminal r2868 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2868 - trunk/src
- Date: Wed, 4 Jun 2008 18:10:12 +0000 (UTC)
Author: chpe
Date: Wed Jun 4 18:10:12 2008
New Revision: 2868
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2868&view=rev
Log:
Apply the geometry only after the tabs have been added to the window, not before. Bug #536639.
Modified:
trunk/src/terminal-app.c
trunk/src/terminal-app.h
trunk/src/terminal-window.c
trunk/src/terminal.c
Modified: trunk/src/terminal-app.c
==============================================================================
--- trunk/src/terminal-app.c (original)
+++ trunk/src/terminal-app.c Wed Jun 4 18:10:12 2008
@@ -1595,8 +1595,7 @@
TerminalWindow *
terminal_app_new_window (TerminalApp *app,
- GdkScreen *screen,
- const char *geometry)
+ GdkScreen *screen)
{
TerminalWindow *window;
@@ -1609,12 +1608,6 @@
if (screen)
gtk_window_set_screen (GTK_WINDOW (window), screen);
- if (geometry)
- {
- if (!gtk_window_parse_geometry (GTK_WINDOW (window), geometry))
- g_printerr (_("Invalid geometry string \"%s\"\n"), geometry);
- }
-
return window;
}
Modified: trunk/src/terminal-app.h
==============================================================================
--- trunk/src/terminal-app.h (original)
+++ trunk/src/terminal-app.h Wed Jun 4 18:10:12 2008
@@ -68,8 +68,7 @@
GtkWindow *transient_parent);
TerminalWindow * terminal_app_new_window (TerminalApp *app,
- GdkScreen *screen,
- const char *geometry);
+ GdkScreen *screen);
TerminalScreen *terminal_app_new_terminal (TerminalApp *app,
TerminalWindow *window,
Modified: trunk/src/terminal-window.c
==============================================================================
--- trunk/src/terminal-window.c (original)
+++ trunk/src/terminal-window.c Wed Jun 4 18:10:12 2008
@@ -856,8 +856,7 @@
g_return_val_if_fail (TERMINAL_IS_WINDOW (source_window), NULL);
new_window = terminal_app_new_window (terminal_app_get (),
- gtk_widget_get_screen (GTK_WIDGET (source_window)),
- NULL /* FIXME? */);
+ gtk_widget_get_screen (GTK_WIDGET (source_window)));
new_priv = new_window->priv;
new_priv->present_on_insert = TRUE;
@@ -2394,15 +2393,16 @@
terminal_screen_get_size (priv->active_screen, &width, &height);
geometry = g_strdup_printf ("%dx%d", width, height);
- new_window = terminal_app_new_window (app, gtk_widget_get_screen (GTK_WIDGET (window)),
- geometry);
- g_free (geometry);
+ new_window = terminal_app_new_window (app, gtk_widget_get_screen (GTK_WIDGET (window)));
terminal_app_new_terminal (app, new_window, profile,
NULL, NULL,
terminal_screen_get_working_dir (priv->active_screen),
1.0);
+ gtk_window_parse_geometry (GTK_WINDOW (window), geometry);
+ g_free (geometry);
+
gtk_window_present (GTK_WINDOW (new_window));
}
@@ -2866,12 +2866,13 @@
terminal_screen_get_size (screen, &width, &height);
geometry = g_strdup_printf ("%dx%d", width, height);
- new_window = terminal_app_new_window (app, gtk_widget_get_screen (GTK_WIDGET (window)),
- geometry);
- g_free (geometry);
+ new_window = terminal_app_new_window (app, gtk_widget_get_screen (GTK_WIDGET (window)));
terminal_window_move_screen (window, new_window, screen, -1);
+ gtk_window_parse_geometry (GTK_WINDOW (window), geometry);
+ g_free (geometry);
+
gtk_window_present_with_time (GTK_WINDOW (new_window), gtk_get_current_event_time ());
}
Modified: trunk/src/terminal.c
==============================================================================
--- trunk/src/terminal.c (original)
+++ trunk/src/terminal.c Wed Jun 4 18:10:12 2008
@@ -984,7 +984,7 @@
g_assert (iw->tabs);
/* Create & setup new window */
- window = terminal_app_new_window (app, screen, iw->geometry);
+ window = terminal_app_new_window (app, screen);
if (results->startup_id)
terminal_window_set_startup_id (window, results->startup_id);
@@ -1031,6 +1031,12 @@
terminal_window_switch_screen (window, screen);
}
+ if (iw->geometry)
+ {
+ if (!gtk_window_parse_geometry (GTK_WINDOW (window), iw->geometry))
+ g_printerr (_("Invalid geometry string \"%s\"\n"), iw->geometry);
+ }
+
gtk_window_present (GTK_WINDOW (window));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]