gnome-terminal r3203 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r3203 - trunk/src
- Date: Mon, 10 Nov 2008 11:39:31 +0000 (UTC)
Author: chpe
Date: Mon Nov 10 11:39:31 2008
New Revision: 3203
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3203&view=rev
Log:
Make sure the EditCopy action sensitivity is always correctly updated.
Modified:
trunk/src/terminal-window.c
Modified: trunk/src/terminal-window.c
==============================================================================
--- trunk/src/terminal-window.c (original)
+++ trunk/src/terminal-window.c Mon Nov 10 11:39:31 2008
@@ -875,14 +875,17 @@
/* Actions stuff */
static void
-terminal_window_update_copy_sensitivity (TerminalWindow *window)
+terminal_window_update_copy_sensitivity (TerminalScreen *screen,
+ TerminalWindow *window)
{
TerminalWindowPrivate *priv = window->priv;
GtkAction *action;
- gboolean can_copy = FALSE;
+ gboolean can_copy;
- if (priv->active_screen)
- can_copy = vte_terminal_get_has_selection (VTE_TERMINAL (priv->active_screen));
+ if (screen != priv->active_screen)
+ return;
+
+ can_copy = vte_terminal_get_has_selection (VTE_TERMINAL (screen));
action = gtk_action_group_get_action (priv->action_group, "EditCopy");
gtk_action_set_sensitive (action, can_copy);
@@ -1575,10 +1578,10 @@
NULL,
G_CALLBACK (popup_copy_url_callback) },
{ "PopupTerminalProfiles", NULL, N_("P_rofiles") },
- { "PopupCopy", GTK_STOCK_COPY, NULL, "<shift><control>C",
+ { "PopupCopy", GTK_STOCK_COPY, NULL, "",
NULL,
G_CALLBACK (edit_copy_callback) },
- { "PopupPaste", GTK_STOCK_PASTE, NULL, "<shift><control>V",
+ { "PopupPaste", GTK_STOCK_PASTE, NULL, "",
NULL,
G_CALLBACK (edit_paste_callback) },
{ "PopupPasteURIPaths", GTK_STOCK_PASTE, N_("Paste _Filenames"), "",
@@ -2347,7 +2350,7 @@
terminal_window_update_encoding_menu_active_encoding (window);
terminal_window_update_set_profile_menu_active_profile (window);
- terminal_window_update_copy_sensitivity (window);
+ terminal_window_update_copy_sensitivity (screen, window);
terminal_window_update_zoom_sensitivity (window);
}
@@ -2490,11 +2493,8 @@
G_CALLBACK (sync_screen_icon_title), window);
g_signal_connect (screen, "notify::icon-title-set",
G_CALLBACK (sync_screen_icon_title_set), window);
-
- g_signal_connect_swapped (G_OBJECT (screen),
- "selection-changed",
- G_CALLBACK (terminal_window_update_copy_sensitivity),
- window);
+ g_signal_connect (screen, "selection-changed",
+ G_CALLBACK (terminal_window_update_copy_sensitivity), window);
g_signal_connect (screen, "show-popup-menu",
G_CALLBACK (screen_show_popup_menu_callback), window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]