Merge lp:~bilalakhtar/ubuntu/maverick/gedit/doublepapercut-fix into lp:ubuntu/maverick/gedit

Proposed by Bilal Akhtar
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~bilalakhtar/ubuntu/maverick/gedit/doublepapercut-fix
Merge into: lp:ubuntu/maverick/gedit
Diff against target: 231 lines (+137/-6)
9 files modified
.pc/applied-patches (+2/-0)
debian/changelog (+10/-0)
debian/patches/100_lp_491555.patch (+68/-0)
debian/patches/101_lp_401692.patch (+26/-0)
debian/patches/series (+2/-0)
gedit/dialogs/gedit-search-dialog.c (+6/-4)
gedit/gedit-document.c (+2/-2)
gedit/gedit-history-entry.c (+17/-0)
gedit/gedit-history-entry.h (+4/-0)
To merge this branch: bzr merge lp:~bilalakhtar/ubuntu/maverick/gedit/doublepapercut-fix
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Team Pending
Review via email: mp+30914@code.launchpad.net

Description of the change

This branch fixes the following bugs:

1) bug #491555
2) bug #401692

To post a comment you must log in.
115. By Bilal Akhtar

Fix FTBFS

Revision history for this message
Ken VanDine (ken-vandine) wrote :

I Merged the fix for bug #401692 into lp:~ubuntu-desktop/gedit/ubuntu, but not the fix for bug #491555. It didn't seem to fix the behavior. See comment https://bugs.edge.launchpad.net/gedit/+bug/491555/comments/2

Revision history for this message
Sebastien Bacher (seb128) wrote :

changing the request to merged since one change has been uploaded and the other has issues, feel free to do a new sponsoring request if you fix the second issue

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-06-24 14:40:09 +0000
3+++ .pc/applied-patches 2010-07-26 15:19:42 +0000
4@@ -3,3 +3,5 @@
5 03_python_path.patch
6 04_menu_label.patch
7 99_ltmain_as-needed.patch
8+100_lp_491555.patch
9+101_lp_401692.patch
10
11=== modified file 'debian/changelog'
12--- debian/changelog 2010-06-24 14:40:09 +0000
13+++ debian/changelog 2010-07-26 15:19:42 +0000
14@@ -1,3 +1,13 @@
15+gedit (2.30.3-0ubuntu3) maverick; urgency=low
16+
17+ * debian/patches/100_lp_491555.patch:
18+ - Pressing Tab in Search field in Replace dialog now passes keyboard
19+ focus straight to the Replace field. (LP: #491555)
20+ * debian/patches/101_lp_401692.patch:
21+ - Default name of a new document is now 'Untitled Document'. (LP: #401692)
22+
23+ -- Bilal Akhtar <bilalakhtar96@yahoo.com> Mon, 26 Jul 2010 08:50:38 +0530
24+
25 gedit (2.30.3-0ubuntu2) maverick; urgency=low
26
27 * debian/patches/04_menu_label.patch:
28
29=== added file 'debian/patches/100_lp_491555.patch'
30--- debian/patches/100_lp_491555.patch 1970-01-01 00:00:00 +0000
31+++ debian/patches/100_lp_491555.patch 2010-07-26 15:19:42 +0000
32@@ -0,0 +1,68 @@
33+Description: Patch to fix ubuntu bug #491555
34+ This patch fixes ubuntu bug #491555 by forcing the keyboard focus to move
35+ straight to the Replace text field when tab is pressed in the Search field.
36+
37+Author: Bilal Akhtar <bilalakhtar96@yahoo.com>
38+Bug-Ubuntu: https://launchpad.net/bugs/491555
39+--- a/gedit/dialogs/gedit-search-dialog.c
40++++ b/gedit/dialogs/gedit-search-dialog.c
41+@@ -386,10 +386,6 @@
42+ (GEDIT_HISTORY_ENTRY (dlg->priv->search_entry));
43+ gtk_entry_set_activates_default (GTK_ENTRY (dlg->priv->search_text_entry),
44+ TRUE);
45+- gtk_widget_show (dlg->priv->search_entry);
46+- gtk_table_attach_defaults (GTK_TABLE (dlg->priv->table),
47+- dlg->priv->search_entry,
48+- 1, 2, 0, 1);
49+
50+ dlg->priv->replace_entry = gedit_history_entry_new ("gedit2_replace_with_entry",
51+ TRUE);
52+@@ -401,6 +397,12 @@
53+ (GEDIT_HISTORY_ENTRY (dlg->priv->replace_entry));
54+ gtk_entry_set_activates_default (GTK_ENTRY (dlg->priv->replace_text_entry),
55+ TRUE);
56++ gedit_history_entry_set_tab_index(dlg->priv->search_entry, gedit_search_dialog_get_show_replace(dlg) ? gedit_history_entry_get_entry(dlg->priv->replace_entry) : dlg->priv->match_case_checkbutton);
57++ gtk_widget_show (dlg->priv->search_entry);
58++ gtk_table_attach_defaults (GTK_TABLE (dlg->priv->table),
59++ dlg->priv->search_entry,
60++ 1, 2, 0, 1);
61++ gedit_history_entry_set_tab_index(dlg->priv->replace_entry, dlg->priv->match_case_checkbutton);
62+ gtk_widget_show (dlg->priv->replace_entry);
63+ gtk_table_attach_defaults (GTK_TABLE (dlg->priv->table),
64+ dlg->priv->replace_entry,
65+--- a/gedit/gedit-history-entry.c
66++++ b/gedit/gedit-history-entry.c
67+@@ -630,3 +630,20 @@
68+
69+ g_list_free (cells);
70+ }
71++
72++void gedit_history_entry_set_tab_index (GeditHistoryEntry *entry, GtkWidget *dest)
73++{
74++ g_return_if_fail (GEDIT_IS_HISTORY_ENTRY (entry));
75++
76++ GtkWidget* entrygtk = gedit_history_entry_get_entry(entry);
77++
78++ g_signal_connect (G_OBJECT(entrygtk), "focus-out-event", G_CALLBACK(gedit_history_entry_set_tab_index_callback), (gpointer)dest);
79++}
80++
81++gboolean gedit_history_entry_set_tab_index_callback (GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
82++{
83++ if (event->type == GDK_KEY_PRESS)
84++ {
85++ gtk_widget_grab_focus(GTK_WIDGET(user_data));
86++ }
87++}
88+--- a/gedit/gedit-history-entry.h
89++++ b/gedit/gedit-history-entry.h
90+@@ -87,6 +87,10 @@
91+
92+ GtkWidget *gedit_history_entry_get_entry (GeditHistoryEntry *entry);
93+
94++void gedit_history_entry_set_tab_index (GeditHistoryEntry *entry, GtkWidget *dest);
95++
96++gboolean gedit_history_entry_set_tab_index_callback (GtkWidget *widget, GdkEventFocus *event, gpointer user_data);
97++
98+ typedef gchar * (* GeditHistoryEntryEscapeFunc) (const gchar *str);
99+ void gedit_history_entry_set_escape_func (GeditHistoryEntry *entry,
100+ GeditHistoryEntryEscapeFunc escape_func);
101
102=== added file 'debian/patches/101_lp_401692.patch'
103--- debian/patches/101_lp_401692.patch 1970-01-01 00:00:00 +0000
104+++ debian/patches/101_lp_401692.patch 2010-07-26 15:19:42 +0000
105@@ -0,0 +1,26 @@
106+Description: Patch to fix ubuntu bug #401692
107+ This patch fixes ubuntu bug #401692 by setting the default name of a new
108+ document to 'Untitled Document' in file gedit/gedit-document.c .
109+
110+Author: Bilal Akhtar <bilalakhtar96@yahoo.com>
111+Bug-Ubuntu: https://launchpad.net/bugs/401692
112+--- a/gedit/gedit-document.c
113++++ b/gedit/gedit-document.c
114+@@ -1068,7 +1068,7 @@
115+ g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), g_strdup (""));
116+
117+ if (doc->priv->uri == NULL)
118+- return g_strdup_printf (_("Unsaved Document %d"),
119++ return g_strdup_printf (_("Untitled Document %d"),
120+ doc->priv->untitled_number);
121+ else
122+ return gedit_utils_uri_for_display (doc->priv->uri);
123+@@ -1083,7 +1083,7 @@
124+ if (doc->priv->short_name != NULL)
125+ return g_strdup (doc->priv->short_name);
126+ else if (doc->priv->uri == NULL)
127+- return g_strdup_printf (_("Unsaved Document %d"),
128++ return g_strdup_printf (_("Untitled Document %d"),
129+ doc->priv->untitled_number);
130+ else
131+ return gedit_utils_basename_for_display (doc->priv->uri);
132
133=== modified file 'debian/patches/series'
134--- debian/patches/series 2010-06-24 14:40:09 +0000
135+++ debian/patches/series 2010-07-26 15:19:42 +0000
136@@ -3,3 +3,5 @@
137 03_python_path.patch
138 04_menu_label.patch
139 99_ltmain_as-needed.patch
140+100_lp_491555.patch
141+101_lp_401692.patch
142
143=== modified file 'gedit/dialogs/gedit-search-dialog.c'
144--- gedit/dialogs/gedit-search-dialog.c 2010-05-27 14:55:48 +0000
145+++ gedit/dialogs/gedit-search-dialog.c 2010-07-26 15:19:42 +0000
146@@ -386,10 +386,6 @@
147 (GEDIT_HISTORY_ENTRY (dlg->priv->search_entry));
148 gtk_entry_set_activates_default (GTK_ENTRY (dlg->priv->search_text_entry),
149 TRUE);
150- gtk_widget_show (dlg->priv->search_entry);
151- gtk_table_attach_defaults (GTK_TABLE (dlg->priv->table),
152- dlg->priv->search_entry,
153- 1, 2, 0, 1);
154
155 dlg->priv->replace_entry = gedit_history_entry_new ("gedit2_replace_with_entry",
156 TRUE);
157@@ -401,6 +397,12 @@
158 (GEDIT_HISTORY_ENTRY (dlg->priv->replace_entry));
159 gtk_entry_set_activates_default (GTK_ENTRY (dlg->priv->replace_text_entry),
160 TRUE);
161+ gedit_history_entry_set_tab_index(dlg->priv->search_entry, gedit_search_dialog_get_show_replace(dlg) ? gedit_history_entry_get_entry(dlg->priv->replace_entry) : dlg->priv->match_case_checkbutton);
162+ gtk_widget_show (dlg->priv->search_entry);
163+ gtk_table_attach_defaults (GTK_TABLE (dlg->priv->table),
164+ dlg->priv->search_entry,
165+ 1, 2, 0, 1);
166+ gedit_history_entry_set_tab_index(dlg->priv->replace_entry, dlg->priv->match_case_checkbutton);
167 gtk_widget_show (dlg->priv->replace_entry);
168 gtk_table_attach_defaults (GTK_TABLE (dlg->priv->table),
169 dlg->priv->replace_entry,
170
171=== modified file 'gedit/gedit-document.c'
172--- gedit/gedit-document.c 2010-05-27 14:55:48 +0000
173+++ gedit/gedit-document.c 2010-07-26 15:19:42 +0000
174@@ -1068,7 +1068,7 @@
175 g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), g_strdup (""));
176
177 if (doc->priv->uri == NULL)
178- return g_strdup_printf (_("Unsaved Document %d"),
179+ return g_strdup_printf (_("Untitled Document %d"),
180 doc->priv->untitled_number);
181 else
182 return gedit_utils_uri_for_display (doc->priv->uri);
183@@ -1083,7 +1083,7 @@
184 if (doc->priv->short_name != NULL)
185 return g_strdup (doc->priv->short_name);
186 else if (doc->priv->uri == NULL)
187- return g_strdup_printf (_("Unsaved Document %d"),
188+ return g_strdup_printf (_("Untitled Document %d"),
189 doc->priv->untitled_number);
190 else
191 return gedit_utils_basename_for_display (doc->priv->uri);
192
193=== modified file 'gedit/gedit-history-entry.c'
194--- gedit/gedit-history-entry.c 2009-11-04 15:01:47 +0000
195+++ gedit/gedit-history-entry.c 2010-07-26 15:19:42 +0000
196@@ -630,3 +630,20 @@
197
198 g_list_free (cells);
199 }
200+
201+void gedit_history_entry_set_tab_index (GeditHistoryEntry *entry, GtkWidget *dest)
202+{
203+ g_return_if_fail (GEDIT_IS_HISTORY_ENTRY (entry));
204+
205+ GtkWidget* entrygtk = gedit_history_entry_get_entry(entry);
206+
207+ g_signal_connect (G_OBJECT(entrygtk), "focus-out-event", G_CALLBACK(gedit_history_entry_set_tab_index_callback), (gpointer)dest);
208+}
209+
210+gboolean gedit_history_entry_set_tab_index_callback (GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
211+{
212+ if (event->type == GDK_KEY_PRESS)
213+ {
214+ gtk_widget_grab_focus(GTK_WIDGET(user_data));
215+ }
216+}
217
218=== modified file 'gedit/gedit-history-entry.h'
219--- gedit/gedit-history-entry.h 2009-11-04 15:01:47 +0000
220+++ gedit/gedit-history-entry.h 2010-07-26 15:19:42 +0000
221@@ -87,6 +87,10 @@
222
223 GtkWidget *gedit_history_entry_get_entry (GeditHistoryEntry *entry);
224
225+void gedit_history_entry_set_tab_index (GeditHistoryEntry *entry, GtkWidget *dest);
226+
227+gboolean gedit_history_entry_set_tab_index_callback (GtkWidget *widget, GdkEventFocus *event, gpointer user_data);
228+
229 typedef gchar * (* GeditHistoryEntryEscapeFunc) (const gchar *str);
230 void gedit_history_entry_set_escape_func (GeditHistoryEntry *entry,
231 GeditHistoryEntryEscapeFunc escape_func);

Subscribers

People subscribed via source and target branches

to all changes: