diff -pruN gnome-terminal-2.26.0.old/src/gnome-terminal.schemas.in gnome-terminal-2.26.0/src/gnome-terminal.schemas.in --- gnome-terminal-2.26.0.old/src/gnome-terminal.schemas.in 2009-01-12 19:58:42.000000000 +0100 +++ gnome-terminal-2.26.0/src/gnome-terminal.schemas.in 2009-04-13 00:26:29.000000000 +0200 @@ -627,6 +627,32 @@ + + + /schemas/apps/gnome-terminal/profiles/Default/size_columns + /apps/gnome-terminal/profiles/Default/size_columns + gnome-terminal + int + 80 + + Number of columns + The number of columns a terminal will have when opened in a new window. + + + + + + /schemas/apps/gnome-terminal/profiles/Default/size_rows + /apps/gnome-terminal/profiles/Default/size_rows + gnome-terminal + int + 24 + + Number of rows + The number of rows a terminal will have when opened in a new window. + + + diff -pruN gnome-terminal-2.26.0.old/src/profile-editor.c gnome-terminal-2.26.0/src/profile-editor.c --- gnome-terminal-2.26.0.old/src/profile-editor.c 2009-01-12 19:58:42.000000000 +0100 +++ gnome-terminal-2.26.0/src/profile-editor.c 2009-04-13 00:28:48.000000000 +0200 @@ -823,6 +823,8 @@ terminal_profile_edit (TerminalProfile * CONNECT ("use-custom-command-checkbutton", TERMINAL_PROFILE_USE_CUSTOM_COMMAND); CONNECT ("use-theme-colors-checkbutton", TERMINAL_PROFILE_USE_THEME_COLORS); CONNECT ("word-chars-entry", TERMINAL_PROFILE_WORD_CHARS); + CONNECT ("size-columns-spinbutton", TERMINAL_PROFILE_SIZE_COLUMNS); + CONNECT ("size-rows-spinbutton", TERMINAL_PROFILE_SIZE_ROWS); CONNECT_WITH_FLAGS ("bell-checkbutton", TERMINAL_PROFILE_SILENT_BELL, FLAG_INVERT_BOOL); CONNECT_WITH_FLAGS ("scrollback-lines-spinbutton", TERMINAL_PROFILE_SCROLLBACK_LINES, 0); diff -pruN gnome-terminal-2.26.0.old/src/profile-preferences.glade gnome-terminal-2.26.0/src/profile-preferences.glade --- gnome-terminal-2.26.0.old/src/profile-preferences.glade 2009-01-12 19:58:42.000000000 +0100 +++ gnome-terminal-2.26.0/src/profile-preferences.glade 2009-04-13 00:14:25.000000000 +0200 @@ -401,6 +401,122 @@ Underline True + + + + True + False + 12 + + + + True + _Columns: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + size-columns-spinbutton + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 80 0 65535 1 10 10 + + + 0 + False + True + + + + + 0 + True + True + + + + + + True + False + 12 + + + + True + _Rows: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + word-chars-entry + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 24 0 65535 1 10 10 + + + 0 + False + True + + + + + 0 + True + True + + False diff -pruN gnome-terminal-2.26.0.old/src/terminal-profile.c gnome-terminal-2.26.0/src/terminal-profile.c --- gnome-terminal-2.26.0.old/src/terminal-profile.c 2009-01-12 19:58:42.000000000 +0100 +++ gnome-terminal-2.26.0/src/terminal-profile.c 2009-04-13 00:19:03.000000000 +0200 @@ -80,6 +80,8 @@ enum PROP_USE_THEME_COLORS, PROP_VISIBLE_NAME, PROP_WORD_CHARS, + PROP_SIZE_COLUMNS, + PROP_SIZE_ROWS, LAST_PROP }; @@ -114,6 +116,8 @@ enum #define KEY_USE_THEME_COLORS "use_theme_colors" #define KEY_VISIBLE_NAME "visible_name" #define KEY_WORD_CHARS "word_chars" +#define KEY_SIZE_COLUMNS "size_columns" +#define KEY_SIZE_ROWS "size_rows" /* Keep these in sync with the GConf schema! */ #define DEFAULT_ALLOW_BOLD (TRUE) @@ -149,6 +153,8 @@ enum #define DEFAULT_USE_THEME_COLORS (TRUE) #define DEFAULT_VISIBLE_NAME (N_("Unnamed")) #define DEFAULT_WORD_CHARS ("-A-Za-z0-9,./?%&#:_") +#define DEFAULT_SIZE_COLUMNS (80) +#define DEFAULT_SIZE_ROWS (24) struct _TerminalProfilePrivate { @@ -1325,6 +1331,10 @@ terminal_profile_class_init (TerminalPro TERMINAL_PROFILE_PROPERTY_STRING (WORD_CHARS, DEFAULT_WORD_CHARS, KEY_WORD_CHARS); TERMINAL_PROFILE_PROPERTY_VALUE_ARRAY_BOXED (PALETTE, "palette-color", GDK_TYPE_COLOR, KEY_PALETTE); + + TERMINAL_PROFILE_PROPERTY_INT (SIZE_COLUMNS, 4, G_MAXINT, DEFAULT_SIZE_COLUMNS, KEY_SIZE_COLUMNS); + TERMINAL_PROFILE_PROPERTY_INT (SIZE_ROWS, 3, G_MAXINT, DEFAULT_SIZE_ROWS, KEY_SIZE_ROWS); + } /* Semi-Public API */ diff -pruN gnome-terminal-2.26.0.old/src/terminal-profile.h gnome-terminal-2.26.0/src/terminal-profile.h --- gnome-terminal-2.26.0.old/src/terminal-profile.h 2009-01-12 19:58:42.000000000 +0100 +++ gnome-terminal-2.26.0/src/terminal-profile.h 2009-04-13 00:24:11.000000000 +0200 @@ -98,6 +98,8 @@ typedef enum #define TERMINAL_PROFILE_USE_THEME_COLORS "use-theme-colors" #define TERMINAL_PROFILE_VISIBLE_NAME "visible-name" #define TERMINAL_PROFILE_WORD_CHARS "word-chards" +#define TERMINAL_PROFILE_SIZE_COLUMNS "size-columns" +#define TERMINAL_PROFILE_SIZE_ROWS "size-rows" /* TerminalProfile object */ diff -pruN gnome-terminal-2.26.0.old/src/terminal-screen.c gnome-terminal-2.26.0/src/terminal-screen.c --- gnome-terminal-2.26.0.old/src/terminal-screen.c 2009-03-15 14:06:26.000000000 +0100 +++ gnome-terminal-2.26.0/src/terminal-screen.c 2009-04-13 00:09:40.000000000 +0200 @@ -270,6 +270,7 @@ terminal_screen_realize (GtkWidget *widg TerminalScreen *screen = TERMINAL_SCREEN (widget); TerminalScreenPrivate *priv = screen->priv; TerminalBackgroundType bg_type; + guint columns, rows; GTK_WIDGET_CLASS (terminal_screen_parent_class)->realize (widget); @@ -282,6 +283,9 @@ terminal_screen_realize (GtkWidget *widg !terminal_window_uses_argb_visual (priv->window)); /* FIXME: why do this on realize? */ + columns = terminal_profile_get_property_int (priv->profile, TERMINAL_PROFILE_SIZE_COLUMNS); + rows = terminal_profile_get_property_int (priv->profile, TERMINAL_PROFILE_SIZE_ROWS); + vte_terminal_set_size (VTE_TERMINAL (screen), columns, rows); terminal_window_set_size (priv->window, screen, TRUE); }