Merge lp:~om26er/ubuntu/maverick/gnome-terminal/gnome-terminal-fix-630383 into lp:ubuntu/maverick/gnome-terminal

Proposed by Omer Akram on 2011-03-13
Status: Merged
Merge reported by: Dustin Kirkland 
Merged at revision: not available
Proposed branch: lp:~om26er/ubuntu/maverick/gnome-terminal/gnome-terminal-fix-630383
Merge into: lp:ubuntu/maverick/gnome-terminal
Diff against target: 169 lines (+89/-12)
5 files modified
.pc/applied-patches (+1/-0)
debian/changelog (+7/-0)
debian/patches/21_watch_clipboard.patch (+68/-0)
debian/patches/series (+1/-0)
src/terminal-window.c (+12/-12)
To merge this branch: bzr merge lp:~om26er/ubuntu/maverick/gnome-terminal/gnome-terminal-fix-630383
Reviewer Review Type Date Requested Status
Dustin Kirkland  2011-03-13 Needs Fixing on 2011-03-14
Review via email: mp+53172@code.launchpad.net

Description of the change

backport the patch from mterry to fix bug 630383 in Maverick

To post a comment you must log in.
Dustin Kirkland  (kirkland) wrote :

Hmm, this doesn't look quite right.

There's a patch file added, debian/patches/21_watch_clipboard.patch, which modifies src/terminal-window.c.

But there's also changes directly in src/terminal-window.c.

Looks like the diff is already applied in your proposed branch.

review: Needs Fixing
Dustin Kirkland  (kirkland) wrote :

Okay, I'm fixing this up.

I have:
 $ bzr revert src/terminal-window.c

To undo the in-branch change.

And I have updated the target release to maverick-proposed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.pc/applied-patches'
2--- .pc/applied-patches 2010-09-27 17:05:38 +0000
3+++ .pc/applied-patches 2011-03-13 15:27:02 +0000
4@@ -2,3 +2,4 @@
5 01_lpi.patch
6 02_add_transparency_properties.patch
7 20_add_alt_screen_toggle_ui.patch
8+21_watch_clipboard.patch
9
10=== modified file 'debian/changelog'
11--- debian/changelog 2010-09-27 17:05:38 +0000
12+++ debian/changelog 2011-03-13 15:27:02 +0000
13@@ -1,3 +1,10 @@
14+gnome-terminal (2.32.0-0ubuntu1.1) maverick; urgency=low
15+
16+ * debian/patches/21_watch_clipboard.patch:
17+ - Watch clipboard contents for paste shorkey to work. (LP: #630383)
18+
19+ -- Omer Akram <om26er@ubuntu.com> Sun, 13 Mar 2011 20:20:13 +0500
20+
21 gnome-terminal (2.32.0-0ubuntu1) maverick; urgency=low
22
23 * New upstream version 2.32.0
24
25=== added file 'debian/patches/21_watch_clipboard.patch'
26--- debian/patches/21_watch_clipboard.patch 1970-01-01 00:00:00 +0000
27+++ debian/patches/21_watch_clipboard.patch 2011-03-13 15:27:02 +0000
28@@ -0,0 +1,68 @@
29+From: Omer Akram <om26er@ubuntu.com>
30+Author: Michael Terry <michael.terry@canonical.com>
31+Subject: Update paste sensitivity whenever clipboard changes.
32+Bug: https://bugs.gnome.org/600876
33+Bug-Ubuntu: https://launchpad.net/bugs/630383
34+
35+--- gnome-terminal-2.32.1.orig/src/terminal-window.c 2011-03-07 10:15:11.241700961 -0500
36++++ gnome-terminal-2.32.1/src/terminal-window.c 2011-03-07 10:15:15.891838092 -0500
37+@@ -1032,10 +1032,8 @@
38+ }
39+
40+ static void
41+-edit_menu_activate_callback (GtkMenuItem *menuitem,
42+- gpointer user_data)
43++update_edit_menu (TerminalWindow *window)
44+ {
45+- TerminalWindow *window = (TerminalWindow *) user_data;
46+ GtkClipboard *clipboard;
47+
48+ clipboard = gtk_widget_get_clipboard (GTK_WIDGET (window), GDK_SELECTION_CLIPBOARD);
49+@@ -1988,6 +1986,7 @@
50+ GError *error;
51+ GtkWindowGroup *window_group;
52+ GtkAccelGroup *accel_group;
53++ GtkClipboard *clipboard;
54+
55+ priv = window->priv = G_TYPE_INSTANCE_GET_PRIVATE (window, TERMINAL_TYPE_WINDOW, TerminalWindowPrivate);
56+
57+@@ -2061,15 +2060,10 @@
58+ gtk_ui_manager_insert_action_group (manager, action_group, 0);
59+ g_object_unref (action_group);
60+
61+- action = gtk_action_group_get_action (action_group, "Edit");
62+- g_signal_connect (action, "activate",
63+- G_CALLBACK (edit_menu_activate_callback), window);
64+-
65+- /* Set this action invisible so the Edit menu doesn't flash the first
66+- * time it's shown and there's no text/uri-list on the clipboard.
67+- */
68+- action = gtk_action_group_get_action (priv->action_group, "EditPasteURIPaths");
69+- gtk_action_set_visible (action, FALSE);
70++ clipboard = gtk_widget_get_clipboard (GTK_WIDGET (window), GDK_SELECTION_CLIPBOARD);
71++ g_signal_connect_swapped (clipboard, "owner-change",
72++ G_CALLBACK (update_edit_menu), window);
73++ update_edit_menu (window);
74+
75+ /* Idem for this action, since the window is not fullscreen. */
76+ action = gtk_action_group_get_action (priv->action_group, "PopupLeaveFullscreen");
77+@@ -2162,6 +2156,7 @@
78+ TerminalWindowPrivate *priv = window->priv;
79+ TerminalApp *app;
80+ GdkScreen *screen;
81++ GtkClipboard *clipboard;
82+
83+ remove_popup_info (window);
84+
85+@@ -2186,6 +2181,11 @@
86+ G_CALLBACK (terminal_window_encoding_list_changed_cb),
87+ window);
88+
89++ clipboard = gtk_widget_get_clipboard (GTK_WIDGET (window), GDK_SELECTION_CLIPBOARD);
90++ g_signal_handlers_disconnect_by_func (clipboard,
91++ G_CALLBACK (update_edit_menu),
92++ window);
93++
94+ screen = gtk_widget_get_screen (GTK_WIDGET (object));
95+ if (screen)
96+ {
97
98=== modified file 'debian/patches/series'
99--- debian/patches/series 2010-09-27 17:05:38 +0000
100+++ debian/patches/series 2011-03-13 15:27:02 +0000
101@@ -2,3 +2,4 @@
102 01_lpi.patch
103 02_add_transparency_properties.patch
104 20_add_alt_screen_toggle_ui.patch
105+21_watch_clipboard.patch
106
107=== modified file 'src/terminal-window.c'
108--- src/terminal-window.c 2010-09-27 17:05:38 +0000
109+++ src/terminal-window.c 2011-03-13 15:27:02 +0000
110@@ -1032,10 +1032,8 @@
111 }
112
113 static void
114-edit_menu_activate_callback (GtkMenuItem *menuitem,
115- gpointer user_data)
116+update_edit_menu (TerminalWindow *window)
117 {
118- TerminalWindow *window = (TerminalWindow *) user_data;
119 GtkClipboard *clipboard;
120
121 clipboard = gtk_widget_get_clipboard (GTK_WIDGET (window), GDK_SELECTION_CLIPBOARD);
122@@ -1988,6 +1986,7 @@
123 GError *error;
124 GtkWindowGroup *window_group;
125 GtkAccelGroup *accel_group;
126+ GtkClipboard *clipboard;
127
128 priv = window->priv = G_TYPE_INSTANCE_GET_PRIVATE (window, TERMINAL_TYPE_WINDOW, TerminalWindowPrivate);
129
130@@ -2061,15 +2060,10 @@
131 gtk_ui_manager_insert_action_group (manager, action_group, 0);
132 g_object_unref (action_group);
133
134- action = gtk_action_group_get_action (action_group, "Edit");
135- g_signal_connect (action, "activate",
136- G_CALLBACK (edit_menu_activate_callback), window);
137-
138- /* Set this action invisible so the Edit menu doesn't flash the first
139- * time it's shown and there's no text/uri-list on the clipboard.
140- */
141- action = gtk_action_group_get_action (priv->action_group, "EditPasteURIPaths");
142- gtk_action_set_visible (action, FALSE);
143+ clipboard = gtk_widget_get_clipboard (GTK_WIDGET (window), GDK_SELECTION_CLIPBOARD);
144+ g_signal_connect_swapped (clipboard, "owner-change",
145+ G_CALLBACK (update_edit_menu), window);
146+ update_edit_menu (window);
147
148 /* Idem for this action, since the window is not fullscreen. */
149 action = gtk_action_group_get_action (priv->action_group, "PopupLeaveFullscreen");
150@@ -2162,6 +2156,7 @@
151 TerminalWindowPrivate *priv = window->priv;
152 TerminalApp *app;
153 GdkScreen *screen;
154+ GtkClipboard *clipboard;
155
156 remove_popup_info (window);
157
158@@ -2186,6 +2181,11 @@
159 G_CALLBACK (terminal_window_encoding_list_changed_cb),
160 window);
161
162+ clipboard = gtk_widget_get_clipboard (GTK_WIDGET (window), GDK_SELECTION_CLIPBOARD);
163+ g_signal_handlers_disconnect_by_func (clipboard,
164+ G_CALLBACK (update_edit_menu),
165+ window);
166+
167 screen = gtk_widget_get_screen (GTK_WIDGET (object));
168 if (screen)
169 {

Subscribers

People subscribed via source and target branches

to all changes: