anjuta r4650 - in trunk: . plugins/terminal



Author: sgranjoux
Date: Sat Jan 31 08:25:44 2009
New Revision: 4650
URL: http://svn.gnome.org/viewvc/anjuta?rev=4650&view=rev

Log:
	* plugins/terminal/terminal.c:
	Fix #569857 â terminal copy/paste doesn't work


Modified:
   trunk/ChangeLog
   trunk/plugins/terminal/terminal.c

Modified: trunk/plugins/terminal/terminal.c
==============================================================================
--- trunk/plugins/terminal/terminal.c	(original)
+++ trunk/plugins/terminal/terminal.c	Sat Jan 31 08:25:44 2009
@@ -504,16 +504,30 @@
 #endif
 
 static void
-on_terminal_copy_cb (GtkAction * action, TerminalPlugin *term)
+on_terminal_copy_cb (GtkAction * action, TerminalPlugin *term_plugin)
 {
-	if (vte_terminal_get_has_selection(VTE_TERMINAL(term->term)))
-		vte_terminal_copy_clipboard(VTE_TERMINAL(term->term));
+	VteTerminal *term;
+	
+	if (term_plugin->child_pid)
+		term = VTE_TERMINAL (term_plugin->term);
+	else
+		term = VTE_TERMINAL (term_plugin->shell);
+	
+	if (vte_terminal_get_has_selection(term))
+		vte_terminal_copy_clipboard(term);
 }
 
 static void
-on_terminal_paste_cb (GtkAction * action, TerminalPlugin *term)
+on_terminal_paste_cb (GtkAction * action, TerminalPlugin *term_plugin)
 {
-	vte_terminal_paste_clipboard(VTE_TERMINAL(term->term));
+	VteTerminal *term;
+	
+	if (term_plugin->child_pid)
+		term = VTE_TERMINAL (term_plugin->term);
+	else
+		term = VTE_TERMINAL (term_plugin->shell);
+	
+	vte_terminal_paste_clipboard(term);
 }
 
 static GtkActionEntry actions_terminal[] = {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]