summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-05-26 17:33:01 +0300
committermonsta <[email protected]>2016-05-26 17:33:01 +0300
commitb2919d25fa7e8a6b09e1502ed35b10e3fb27ec08 (patch)
tree1897f74559a08564d6850382005576cc95f2247e /src
parentea302a83da329d7f182724fb0c9d1a4d22aa9362 (diff)
downloadmate-terminal-b2919d25fa7e8a6b09e1502ed35b10e3fb27ec08.tar.bz2
mate-terminal-b2919d25fa7e8a6b09e1502ed35b10e3fb27ec08.tar.xz
drop old code for VTE < 0.38 (it was used in GTK+2 build)
Diffstat (limited to 'src')
-rw-r--r--src/profile-editor.c30
-rw-r--r--src/terminal-profile.c7
-rw-r--r--src/terminal-screen-container.c8
-rw-r--r--src/terminal-screen.c177
-rw-r--r--src/terminal-window.c81
-rw-r--r--src/terminal-window.h4
6 files changed, 19 insertions, 288 deletions
diff --git a/src/profile-editor.c b/src/profile-editor.c
index f20afe7..cd7f07a 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -141,7 +141,6 @@ profile_notify_sensitivity_cb (TerminalProfile *profile,
!terminal_profile_property_locked (profile, TERMINAL_PROFILE_CUSTOM_COMMAND));
}
-#if VTE_CHECK_VERSION (0, 38, 0)
gtk_widget_hide (profile_editor_get_widget (editor, "background-image"));
gtk_widget_hide (profile_editor_get_widget (editor, "darken-background-transparent-or-image-scale-label"));
gtk_widget_show (profile_editor_get_widget (editor, "darken-background-transparent-scale-label"));
@@ -161,35 +160,6 @@ profile_notify_sensitivity_cb (TerminalProfile *profile,
SET_SENSITIVE ("darken-background-vbox", FALSE);
}
}
-#else
- if (!prop_name || prop_name == I_(TERMINAL_PROFILE_BACKGROUND_TYPE))
- {
- gboolean bg_type_locked = terminal_profile_property_locked (profile, TERMINAL_PROFILE_BACKGROUND_TYPE);
- SET_SENSITIVE ("solid-radiobutton", !bg_type_locked);
- SET_SENSITIVE ("image-radiobutton", !bg_type_locked);
- SET_SENSITIVE ("transparent-radiobutton", !bg_type_locked);
-
- bg_type = terminal_profile_get_property_enum (profile, TERMINAL_PROFILE_BACKGROUND_TYPE);
- if (bg_type == TERMINAL_BACKGROUND_IMAGE)
- {
- SET_SENSITIVE ("background-image-filechooser", !terminal_profile_property_locked (profile, TERMINAL_PROFILE_BACKGROUND_IMAGE_FILE));
- SET_SENSITIVE ("scroll-background-checkbutton", !terminal_profile_property_locked (profile, TERMINAL_PROFILE_SCROLL_BACKGROUND));
- SET_SENSITIVE ("darken-background-vbox", !terminal_profile_property_locked (profile, TERMINAL_PROFILE_BACKGROUND_DARKNESS));
- }
- else if (bg_type == TERMINAL_BACKGROUND_TRANSPARENT)
- {
- SET_SENSITIVE ("background-image-filechooser", FALSE);
- SET_SENSITIVE ("scroll-background-checkbutton", FALSE);
- SET_SENSITIVE ("darken-background-vbox", !terminal_profile_property_locked (profile, TERMINAL_PROFILE_BACKGROUND_DARKNESS));
- }
- else
- {
- SET_SENSITIVE ("background-image-filechooser", FALSE);
- SET_SENSITIVE ("scroll-background-checkbutton", FALSE);
- SET_SENSITIVE ("darken-background-vbox", FALSE);
- }
- }
-#endif
if (!prop_name ||
prop_name == I_(TERMINAL_PROFILE_USE_SYSTEM_FONT) ||
diff --git a/src/terminal-profile.c b/src/terminal-profile.c
index fec496e..8109338 100644
--- a/src/terminal-profile.c
+++ b/src/terminal-profile.c
@@ -1271,17 +1271,10 @@ terminal_profile_class_init (TerminalProfileClass *klass)
TERMINAL_PROFILE_PROPERTY_DOUBLE (BACKGROUND_DARKNESS, 0.0, 1.0, DEFAULT_BACKGROUND_DARKNESS, KEY_BACKGROUND_DARKNESS);
TERMINAL_PROFILE_PROPERTY_ENUM (BACKGROUND_TYPE, TERMINAL_TYPE_BACKGROUND_TYPE, DEFAULT_BACKGROUND_TYPE, KEY_BACKGROUND_TYPE);
-#if VTE_CHECK_VERSION (0, 38, 0)
TERMINAL_PROFILE_PROPERTY_ENUM (BACKSPACE_BINDING, VTE_TYPE_ERASE_BINDING, DEFAULT_BACKSPACE_BINDING, KEY_BACKSPACE_BINDING);
TERMINAL_PROFILE_PROPERTY_ENUM (CURSOR_BLINK_MODE, VTE_TYPE_CURSOR_BLINK_MODE, DEFAULT_CURSOR_BLINK_MODE, KEY_CURSOR_BLINK_MODE);
TERMINAL_PROFILE_PROPERTY_ENUM (CURSOR_SHAPE, VTE_TYPE_CURSOR_SHAPE, DEFAULT_CURSOR_SHAPE, KEY_CURSOR_SHAPE);
TERMINAL_PROFILE_PROPERTY_ENUM (DELETE_BINDING, VTE_TYPE_ERASE_BINDING, DEFAULT_DELETE_BINDING, KEY_DELETE_BINDING);
-#else
- TERMINAL_PROFILE_PROPERTY_ENUM (BACKSPACE_BINDING, VTE_TYPE_TERMINAL_ERASE_BINDING, DEFAULT_BACKSPACE_BINDING, KEY_BACKSPACE_BINDING);
- TERMINAL_PROFILE_PROPERTY_ENUM (CURSOR_BLINK_MODE, VTE_TYPE_TERMINAL_CURSOR_BLINK_MODE, DEFAULT_CURSOR_BLINK_MODE, KEY_CURSOR_BLINK_MODE);
- TERMINAL_PROFILE_PROPERTY_ENUM (CURSOR_SHAPE, VTE_TYPE_TERMINAL_CURSOR_SHAPE, DEFAULT_CURSOR_SHAPE, KEY_CURSOR_SHAPE);
- TERMINAL_PROFILE_PROPERTY_ENUM (DELETE_BINDING, VTE_TYPE_TERMINAL_ERASE_BINDING, DEFAULT_DELETE_BINDING, KEY_DELETE_BINDING);
-#endif
TERMINAL_PROFILE_PROPERTY_ENUM (EXIT_ACTION, TERMINAL_TYPE_EXIT_ACTION, DEFAULT_EXIT_ACTION, KEY_EXIT_ACTION);
TERMINAL_PROFILE_PROPERTY_ENUM (SCROLLBAR_POSITION, TERMINAL_TYPE_SCROLLBAR_POSITION, DEFAULT_SCROLLBAR_POSITION, KEY_SCROLLBAR_POSITION);
TERMINAL_PROFILE_PROPERTY_ENUM (TITLE_MODE, TERMINAL_TYPE_TITLE_MODE, DEFAULT_TITLE_MODE, KEY_TITLE_MODE);
diff --git a/src/terminal-screen-container.c b/src/terminal-screen-container.c
index 52432e5..67c6bbf 100644
--- a/src/terminal-screen-container.c
+++ b/src/terminal-screen-container.c
@@ -145,11 +145,7 @@ terminal_screen_container_constructor (GType type,
g_assert (priv->screen != NULL);
#ifdef USE_SCROLLED_WINDOW
-#if VTE_CHECK_VERSION (0, 38, 0)
priv->scrolled_window = gtk_scrolled_window_new (NULL, gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->screen)));
-#else
- priv->scrolled_window = gtk_scrolled_window_new (NULL, vte_terminal_get_adjustment (VTE_TERMINAL (priv->screen)));
-#endif
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolled_window),
priv->hscrollbar_policy,
@@ -169,11 +165,7 @@ terminal_screen_container_constructor (GType type,
priv->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-#if VTE_CHECK_VERSION (0, 38, 0)
priv->vscrollbar = gtk_vscrollbar_new (gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->screen)));
-#else
- priv->vscrollbar = gtk_vscrollbar_new (vte_terminal_get_adjustment (VTE_TERMINAL (priv->screen)));
-#endif
gtk_box_pack_start (GTK_BOX (priv->hbox), GTK_WIDGET (priv->screen), TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->vscrollbar, FALSE, FALSE, 0);
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 3bf57b1..6bb338d 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -119,11 +119,7 @@ static gboolean terminal_screen_popup_menu (GtkWidget *widget);
static gboolean terminal_screen_button_press (GtkWidget *widget,
GdkEventButton *event);
static void terminal_screen_launch_child_on_idle (TerminalScreen *screen);
-#if VTE_CHECK_VERSION (0, 38, 0)
static void terminal_screen_child_exited (VteTerminal *terminal, int status);
-#else
-static void terminal_screen_child_exited (VteTerminal *terminal);
-#endif
static void terminal_screen_window_title_changed (VteTerminal *vte_terminal,
TerminalScreen *screen);
@@ -138,12 +134,7 @@ static void terminal_screen_cook_title (TerminalScreen *screen);
static void terminal_screen_cook_icon_title (TerminalScreen *screen);
static char* terminal_screen_check_match (TerminalScreen *screen,
-#if VTE_CHECK_VERSION (0, 38, 0)
GdkEvent *event,
-#else
- int column,
- int row,
-#endif
int *flavor);
static guint signals[LAST_SIGNAL] = { 0 };
@@ -292,38 +283,10 @@ terminal_screen_get_window (TerminalScreen *screen)
return TERMINAL_WINDOW (toplevel);
}
-#if !VTE_CHECK_VERSION (0, 38, 0)
-static gboolean
-window_uses_argb_visual (TerminalScreen *screen)
-{
- TerminalWindow *window;
-
- window = terminal_screen_get_window (screen);
- if (window == NULL || !gtk_widget_get_realized (GTK_WIDGET (window)))
- return FALSE;
-
- return terminal_window_uses_argb_visual (window);
-}
-#endif
-
static void
terminal_screen_realize (GtkWidget *widget)
{
-#if !VTE_CHECK_VERSION (0, 38, 0)
- TerminalScreen *screen = TERMINAL_SCREEN (widget);
- TerminalScreenPrivate *priv = screen->priv;
- TerminalBackgroundType bg_type;
-#endif
-
GTK_WIDGET_CLASS (terminal_screen_parent_class)->realize (widget);
-
-#if !VTE_CHECK_VERSION (0, 38, 0)
- /* FIXME: Don't enable this if we have a compmgr. */
- bg_type = terminal_profile_get_property_enum (priv->profile, TERMINAL_PROFILE_BACKGROUND_TYPE);
- vte_terminal_set_background_transparent (VTE_TERMINAL (screen),
- bg_type == TERMINAL_BACKGROUND_TRANSPARENT &&
- !window_uses_argb_visual (screen));
-#endif
}
static void
@@ -923,9 +886,6 @@ terminal_screen_profile_notify_cb (TerminalProfile *profile,
GObject *object = G_OBJECT (screen);
VteTerminal *vte_terminal = VTE_TERMINAL (screen);
const char *prop_name;
-#if !VTE_CHECK_VERSION (0, 38, 0)
- TerminalBackgroundType bg_type;
-#endif
TerminalWindow *window;
if (pspec)
@@ -969,10 +929,8 @@ terminal_screen_profile_notify_cb (TerminalProfile *profile,
prop_name == I_(TERMINAL_PROFILE_USE_THEME_COLORS) ||
prop_name == I_(TERMINAL_PROFILE_FOREGROUND_COLOR) ||
prop_name == I_(TERMINAL_PROFILE_BACKGROUND_COLOR) ||
-#if VTE_CHECK_VERSION (0, 38, 0)
prop_name == I_(TERMINAL_PROFILE_BACKGROUND_TYPE) ||
prop_name == I_(TERMINAL_PROFILE_BACKGROUND_DARKNESS) ||
-#endif
prop_name == I_(TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG) ||
prop_name == I_(TERMINAL_PROFILE_BOLD_COLOR) ||
prop_name == I_(TERMINAL_PROFILE_PALETTE))
@@ -981,15 +939,10 @@ terminal_screen_profile_notify_cb (TerminalProfile *profile,
if (!prop_name || prop_name == I_(TERMINAL_PROFILE_SILENT_BELL))
vte_terminal_set_audible_bell (vte_terminal, !terminal_profile_get_property_boolean (profile, TERMINAL_PROFILE_SILENT_BELL));
- if (!prop_name || prop_name == I_(TERMINAL_PROFILE_WORD_CHARS))
#if VTE_CHECK_VERSION (0, 40, 0)
+ if (!prop_name || prop_name == I_(TERMINAL_PROFILE_WORD_CHARS))
vte_terminal_set_word_char_exceptions (vte_terminal,
terminal_profile_get_property_string (profile, TERMINAL_PROFILE_WORD_CHARS));
-#elif !VTE_CHECK_VERSION (0, 38, 0)
- vte_terminal_set_word_chars (vte_terminal,
- terminal_profile_get_property_string (profile, TERMINAL_PROFILE_WORD_CHARS));
-#else
- {}
#endif
if (!prop_name || prop_name == I_(TERMINAL_PROFILE_SCROLL_ON_KEYSTROKE))
vte_terminal_set_scroll_on_keystroke (vte_terminal,
@@ -1032,51 +985,6 @@ terminal_screen_profile_notify_cb (TerminalProfile *profile,
}
#endif /* ENABLE_SKEY */
-/* Background image support was removed in vte 0.38.
- * Transparency for 0.38+ is handled above next to TERMINAL_PROFILE_BACKGROUND_COLOR. */
-#if !VTE_CHECK_VERSION (0, 38, 0)
- if (!prop_name ||
- prop_name == I_(TERMINAL_PROFILE_BACKGROUND_TYPE) ||
- prop_name == I_(TERMINAL_PROFILE_BACKGROUND_IMAGE) ||
- prop_name == I_(TERMINAL_PROFILE_BACKGROUND_DARKNESS) ||
- prop_name == I_(TERMINAL_PROFILE_SCROLL_BACKGROUND))
- {
- bg_type = terminal_profile_get_property_enum (profile, TERMINAL_PROFILE_BACKGROUND_TYPE);
-
- if (bg_type == TERMINAL_BACKGROUND_IMAGE)
- {
- vte_terminal_set_background_image (vte_terminal,
- terminal_profile_get_property_object (profile, TERMINAL_PROFILE_BACKGROUND_IMAGE));
- vte_terminal_set_scroll_background (vte_terminal,
- terminal_profile_get_property_boolean (profile, TERMINAL_PROFILE_SCROLL_BACKGROUND));
- }
- else
- {
- vte_terminal_set_background_image (vte_terminal, NULL);
- vte_terminal_set_scroll_background (vte_terminal, FALSE);
- }
-
- if (bg_type == TERMINAL_BACKGROUND_IMAGE ||
- bg_type == TERMINAL_BACKGROUND_TRANSPARENT)
- {
- vte_terminal_set_background_saturation (vte_terminal,
- 1.0 - terminal_profile_get_property_double (profile, TERMINAL_PROFILE_BACKGROUND_DARKNESS));
- vte_terminal_set_opacity (vte_terminal,
- 0xffff * terminal_profile_get_property_double (profile, TERMINAL_PROFILE_BACKGROUND_DARKNESS));
- }
- else
- {
- vte_terminal_set_background_saturation (vte_terminal, 1.0); /* normal color */
- vte_terminal_set_opacity (vte_terminal, 0xffff);
- }
-
- /* FIXME: Don't enable this if we have a compmgr. */
- vte_terminal_set_background_transparent (vte_terminal,
- bg_type == TERMINAL_BACKGROUND_TRANSPARENT &&
- !window_uses_argb_visual (screen));
- }
-#endif
-
if (!prop_name || prop_name == I_(TERMINAL_PROFILE_BACKSPACE_BINDING))
vte_terminal_set_backspace_binding (vte_terminal,
terminal_profile_get_property_enum (profile, TERMINAL_PROFILE_BACKSPACE_BINDING));
@@ -1101,7 +1009,6 @@ terminal_screen_profile_notify_cb (TerminalProfile *profile,
}
/* TODO: Once Gtk2 support is dropped, mate-terminal should be converted to use GdkRGBA everywhere instead of GdkColor. */
-#if VTE_CHECK_VERSION (0, 38, 0)
static GdkRGBA *
gdk_color_to_rgba (const GdkColor *color,
double alpha,
@@ -1115,7 +1022,6 @@ gdk_color_to_rgba (const GdkColor *color,
rgba->alpha = alpha;
return rgba;
}
-#endif
static void
update_color_scheme (TerminalScreen *screen)
@@ -1152,33 +1058,23 @@ update_color_scheme (TerminalScreen *screen)
n_colors = G_N_ELEMENTS (colors);
terminal_profile_get_palette (priv->profile, colors, &n_colors);
-#if VTE_CHECK_VERSION (0, 38, 0)
- {
- GdkRGBA colors_rgba[TERMINAL_PALETTE_SIZE];
- GdkRGBA fg_rgba, bg_rgba, bold_rgba;
- double alpha = 1.0;
- int i;
-
- for (i = 0; i < n_colors; i++)
- gdk_color_to_rgba (&colors[i], 1.0, &colors_rgba[i]);
-
- if (terminal_profile_get_property_enum (profile, TERMINAL_PROFILE_BACKGROUND_TYPE) == TERMINAL_BACKGROUND_TRANSPARENT)
- alpha = terminal_profile_get_property_double (profile, TERMINAL_PROFILE_BACKGROUND_DARKNESS);
- vte_terminal_set_colors (VTE_TERMINAL (screen),
- gdk_color_to_rgba (&fg, 1.0, &fg_rgba),
- gdk_color_to_rgba (&bg, alpha, &bg_rgba),
- colors_rgba, n_colors);
- if (bold_color)
- vte_terminal_set_color_bold (VTE_TERMINAL (screen),
- gdk_color_to_rgba (bold_color, 1.0, &bold_rgba));
- }
-#else
- vte_terminal_set_colors (VTE_TERMINAL (screen), &fg, &bg,
- colors, n_colors);
+ GdkRGBA colors_rgba[TERMINAL_PALETTE_SIZE];
+ GdkRGBA fg_rgba, bg_rgba, bold_rgba;
+ double alpha = 1.0;
+ int i;
+
+ for (i = 0; i < n_colors; i++)
+ gdk_color_to_rgba (&colors[i], 1.0, &colors_rgba[i]);
+
+ if (terminal_profile_get_property_enum (profile, TERMINAL_PROFILE_BACKGROUND_TYPE) == TERMINAL_BACKGROUND_TRANSPARENT)
+ alpha = terminal_profile_get_property_double (profile, TERMINAL_PROFILE_BACKGROUND_DARKNESS);
+ vte_terminal_set_colors (VTE_TERMINAL (screen),
+ gdk_color_to_rgba (&fg, 1.0, &fg_rgba),
+ gdk_color_to_rgba (&bg, alpha, &bg_rgba),
+ colors_rgba, n_colors);
if (bold_color)
- vte_terminal_set_color_bold (VTE_TERMINAL (screen), bold_color);
- vte_terminal_set_background_tint_color (VTE_TERMINAL (screen), &bg);
-#endif
+ vte_terminal_set_color_bold (VTE_TERMINAL (screen),
+ gdk_color_to_rgba (bold_color, 1.0, &bold_rgba));
}
void
@@ -1564,11 +1460,7 @@ terminal_screen_launch_child_cb (TerminalScreen *screen)
pty_flags |= VTE_PTY_NO_UTMP | VTE_PTY_NO_WTMP;
if (!get_child_command (screen, shell, &spawn_flags, &argv, &err) ||
-#if VTE_CHECK_VERSION (0, 38, 0)
!vte_terminal_spawn_sync (
-#else
- !vte_terminal_fork_command_full (
-#endif
terminal,
pty_flags,
working_dir,
@@ -1577,9 +1469,7 @@ terminal_screen_launch_child_cb (TerminalScreen *screen)
spawn_flags,
NULL, NULL,
&pid,
-#if VTE_CHECK_VERSION (0, 38, 0)
NULL,
-#endif
&err))
{
GtkWidget *info_bar;
@@ -1693,25 +1583,10 @@ terminal_screen_button_press (GtkWidget *widget,
char *matched_string;
int matched_flavor = 0;
guint state;
-#if !VTE_CHECK_VERSION (0, 38, 0)
- int char_width, char_height, row, col;
- GtkBorder *inner_border = NULL;
-#endif
state = event->state & gtk_accelerator_get_default_mod_mask ();
-#if VTE_CHECK_VERSION (0, 38, 0)
matched_string = terminal_screen_check_match (screen, event, &matched_flavor);
-#else
- terminal_screen_get_cell_size (screen, &char_width, &char_height);
-
- gtk_widget_style_get (widget, "inner-border", &inner_border, NULL);
- row = (event->x - (inner_border ? inner_border->left : 0)) / char_width;
- col = (event->y - (inner_border ? inner_border->top : 0)) / char_height;
- gtk_border_free (inner_border);
-
- matched_string = terminal_screen_check_match (screen, row, col, &matched_flavor);
-#endif
if (matched_string != NULL &&
(event->button == 1 || event->button == 2) &&
@@ -1947,11 +1822,7 @@ terminal_screen_icon_title_changed (VteTerminal *vte_terminal,
}
static void
-#if VTE_CHECK_VERSION (0, 38, 0)
terminal_screen_child_exited (VteTerminal *terminal, int status)
-#else
-terminal_screen_child_exited (VteTerminal *terminal)
-#endif
{
TerminalScreen *screen = TERMINAL_SCREEN (terminal);
TerminalScreenPrivate *priv = screen->priv;
@@ -1979,11 +1850,6 @@ terminal_screen_child_exited (VteTerminal *terminal)
case TERMINAL_EXIT_HOLD:
{
GtkWidget *info_bar;
-#if !VTE_CHECK_VERSION (0, 38, 0)
- int status;
-
- status = vte_terminal_get_child_exit_status (terminal);
-#endif
info_bar = terminal_info_bar_new (GTK_MESSAGE_INFO,
_("_Relaunch"), RESPONSE_RELAUNCH,
@@ -2350,12 +2216,7 @@ terminal_screen_skey_match_remove (TerminalScreen *screen)
static char*
terminal_screen_check_match (TerminalScreen *screen,
-#if VTE_CHECK_VERSION (0, 38, 0)
GdkEvent *event,
-#else
- int column,
- int row,
-#endif
int *flavor)
{
TerminalScreenPrivate *priv = screen->priv;
@@ -2363,11 +2224,7 @@ terminal_screen_check_match (TerminalScreen *screen,
int tag;
char *match;
-#if VTE_CHECK_VERSION (0, 38, 0)
match = vte_terminal_match_check_event (VTE_TERMINAL (screen), event, &tag);
-#else
- match = vte_terminal_match_check (VTE_TERMINAL (screen), column, row, &tag);
-#endif
for (tags = priv->match_tags; tags != NULL; tags = tags->next)
{
TagData *tag_data = (TagData*) tags->data;
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 89566b6..b26face 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -763,11 +763,7 @@ terminal_set_encoding_callback (GtkToggleAction *action,
g_assert (encoding);
vte_terminal_set_encoding (VTE_TERMINAL (priv->active_screen),
-#if VTE_CHECK_VERSION (0, 38, 0)
terminal_encoding_get_charset (encoding), NULL);
-#else
- terminal_encoding_get_charset (encoding));
-#endif
}
static void
@@ -1057,7 +1053,6 @@ update_edit_menu(TerminalWindow *window)
g_object_ref (window));
}
-/* width and height are character-based in vte 0.38, pixel-based in previous versions */
static void
screen_resize_window_cb (TerminalScreen *screen,
guint width,
@@ -1067,12 +1062,6 @@ screen_resize_window_cb (TerminalScreen *screen,
TerminalWindowPrivate *priv = window->priv;
VteTerminal *terminal = VTE_TERMINAL (screen);
GtkWidget *widget = GTK_WIDGET (screen);
-#if !VTE_CHECK_VERSION (0, 38, 0)
- guint grid_width, grid_height;
- int char_width, char_height;
- GtkBorder *inner_border = NULL;
- GtkAllocation widget_allocation;
-#endif
/* Don't do anything if we're maximised or fullscreened */
// FIXME: realized && ... instead?
@@ -1080,35 +1069,12 @@ screen_resize_window_cb (TerminalScreen *screen,
(gdk_window_get_state (gtk_widget_get_window (widget)) & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) != 0)
return;
- /* NOTE: width and height already include the VteTerminal's padding! */
-
-#if VTE_CHECK_VERSION (0, 38, 0)
vte_terminal_set_size (terminal, width, height);
-#else
- gtk_widget_get_allocation (widget, &widget_allocation);
-
- /* Short-circuit */
- if (((int) width) == widget_allocation.width &&
- ((int) height) == widget_allocation.height)
- return;
-
- /* The resize-window signal sucks. Re-compute grid widths */
-
- char_width = vte_terminal_get_char_width (terminal);
- char_height = vte_terminal_get_char_height (terminal);
-
- gtk_widget_style_get (GTK_WIDGET (terminal), "inner-border", &inner_border, NULL);
- grid_width = (width - (inner_border ? (inner_border->left + inner_border->right) : 0)) / char_width;
- grid_height = (height - (inner_border ? (inner_border->top + inner_border->bottom) : 0)) / char_height;
- gtk_border_free (inner_border);
-
- vte_terminal_set_size (terminal, grid_width, grid_height);
-#endif
if (screen != priv->active_screen)
return;
- terminal_window_set_size_force_grid (window, screen, TRUE, -1, -1); //grid_width, grid_height);
+ terminal_window_set_size_force_grid (window, screen, TRUE, -1, -1);
}
static void
@@ -1162,15 +1128,6 @@ terminal_window_update_tabs_menu_sensitivity (TerminalWindow *window)
gtk_action_set_sensitive (action, num_pages > 1);
}
-#if !VTE_CHECK_VERSION (0, 38, 0)
-gboolean
-terminal_window_uses_argb_visual (TerminalWindow *window)
-{
- TerminalWindowPrivate *priv = window->priv;
- return priv->have_argb_visual;
-}
-#endif
-
static void
update_tab_visibility (TerminalWindow *window,
int change)
@@ -1377,24 +1334,6 @@ popup_clipboard_targets_received_cb (GtkClipboard *clipboard,
action = gtk_action_group_get_action (priv->action_group, "PopupInputMethods");
gtk_action_set_visible (action, show_input_method_menu);
-#if !VTE_CHECK_VERSION (0, 38, 0)
- im_menu_item = gtk_ui_manager_get_widget (priv->ui_manager,
- "/Popup/PopupInputMethods");
- /* FIXME: fix this when gtk+ bug #500065 is done, use vte_terminal_im_merge_ui */
- if (show_input_method_menu)
- {
- im_menu = gtk_menu_new ();
- vte_terminal_im_append_menuitems (VTE_TERMINAL (screen),
- GTK_MENU_SHELL (im_menu));
- gtk_widget_show (im_menu);
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (im_menu_item), im_menu);
- }
- else
- {
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (im_menu_item), NULL);
- }
-#endif
-
popup_menu = gtk_ui_manager_get_widget (priv->ui_manager, "/Popup");
g_signal_connect (popup_menu, "deactivate",
G_CALLBACK (popup_menu_deactivate_callback), window);
@@ -3261,20 +3200,12 @@ save_contents_dialog_on_response (GtkDialog *dialog, gint response_id, gpointer
if (stream)
{
- /* XXX
- * FIXME
- * This is a sync operation.
+ /* FIXME
* Should be replaced with the async version when vte implements that.
*/
-#if VTE_CHECK_VERSION (0, 38, 0)
vte_terminal_write_contents_sync (terminal, stream,
VTE_WRITE_DEFAULT,
NULL, &error);
-#else
- vte_terminal_write_contents (terminal, stream,
- VTE_TERMINAL_WRITE_DEFAULT,
- NULL, &error);
-#endif
g_object_unref (stream);
}
@@ -3642,11 +3573,7 @@ search_find_response_callback (GtkWidget *dialog,
flags = terminal_search_dialog_get_search_flags (dialog);
-#if VTE_CHECK_VERSION (0, 38, 0)
vte_terminal_search_set_gregex (VTE_TERMINAL (priv->active_screen), regex, 0);
-#else
- vte_terminal_search_set_gregex (VTE_TERMINAL (priv->active_screen), regex);
-#endif
vte_terminal_search_set_wrap_around (VTE_TERMINAL (priv->active_screen),
(flags & TERMINAL_SEARCH_FLAG_WRAP_AROUND));
@@ -3717,11 +3644,7 @@ search_clear_highlight_callback (GtkAction *action,
if (G_UNLIKELY (!window->priv->active_screen))
return;
-#if VTE_CHECK_VERSION (0, 38, 0)
vte_terminal_search_set_gregex (VTE_TERMINAL (window->priv->active_screen), NULL, 0);
-#else
- vte_terminal_search_set_gregex (VTE_TERMINAL (window->priv->active_screen), NULL);
-#endif
}
static void
diff --git a/src/terminal-window.h b/src/terminal-window.h
index c07dbda..2cdaebd 100644
--- a/src/terminal-window.h
+++ b/src/terminal-window.h
@@ -95,10 +95,6 @@ void terminal_window_set_size_force_grid (TerminalWindow *window,
GtkWidget* terminal_window_get_notebook (TerminalWindow *window);
-#if !VTE_CHECK_VERSION (0, 38, 0)
-gboolean terminal_window_uses_argb_visual (TerminalWindow *window);
-#endif
-
void terminal_window_save_state (TerminalWindow *window,
GKeyFile *key_file,
const char *group);