Merge lp:~evfool/synaptic/jumpingtree into lp:synaptic
- jumpingtree
- Merge into trunk
Proposed by
Robert Roth
Status: | Merged |
---|---|
Merged at revision: | 2110 |
Proposed branch: | lp:~evfool/synaptic/jumpingtree |
Merge into: | lp:synaptic |
Diff against target: |
285 lines (+82/-58) 2 files modified
gtk/gtkbuilder/dialog_welcome.ui (+77/-55) gtk/rgmainwindow.cc (+5/-3) |
To merge this branch: | bzr merge lp:~evfool/synaptic/jumpingtree |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt | Pending | ||
Review via email: mp+135653@code.launchpad.net |
Commit message
Description of the change
Here's a fix/workaround for the tree jumping around, along with a fix for the welcome dialog (which somehow got messed up with gtk3 - spacing issues in the dialog, I've seen lots of these with gtk3).
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'gtk/gtkbuilder/dialog_welcome.ui' | |||
2 | --- gtk/gtkbuilder/dialog_welcome.ui 2012-10-17 20:05:41 +0000 | |||
3 | +++ gtk/gtkbuilder/dialog_welcome.ui 2012-11-22 11:55:47 +0000 | |||
4 | @@ -135,29 +135,14 @@ | |||
5 | 135 | </packing> | 135 | </packing> |
6 | 136 | </child> | 136 | </child> |
7 | 137 | <child> | 137 | <child> |
9 | 138 | <object class="GtkTable" id="table1"> | 138 | <object class="GtkGrid" id="grid1"> |
10 | 139 | <property name="visible">True</property> | 139 | <property name="visible">True</property> |
11 | 140 | <property name="can_focus">False</property> | 140 | <property name="can_focus">False</property> |
12 | 141 | <property name="n_rows">4</property> | ||
13 | 142 | <property name="n_columns">2</property> | ||
14 | 143 | <property name="row_spacing">6</property> | ||
15 | 144 | <child> | ||
16 | 145 | <object class="GtkLabel" id="label19"> | ||
17 | 146 | <property name="visible">True</property> | ||
18 | 147 | <property name="can_focus">False</property> | ||
19 | 148 | <property name="xalign">0</property> | ||
20 | 149 | <property name="yalign">0</property> | ||
21 | 150 | <property name="label" translatable="yes"> - </property> | ||
22 | 151 | </object> | ||
23 | 152 | <packing> | ||
24 | 153 | <property name="x_options">GTK_FILL</property> | ||
25 | 154 | <property name="y_options">GTK_FILL</property> | ||
26 | 155 | </packing> | ||
27 | 156 | </child> | ||
28 | 157 | <child> | 141 | <child> |
29 | 158 | <object class="GtkLabel" id="label23"> | 142 | <object class="GtkLabel" id="label23"> |
30 | 159 | <property name="visible">True</property> | 143 | <property name="visible">True</property> |
31 | 160 | <property name="can_focus">False</property> | 144 | <property name="can_focus">False</property> |
32 | 145 | <property name="valign">start</property> | ||
33 | 161 | <property name="xalign">0</property> | 146 | <property name="xalign">0</property> |
34 | 162 | <property name="yalign">0</property> | 147 | <property name="yalign">0</property> |
35 | 163 | <property name="label" translatable="yes">Select the package and choose the action from the 'Package' menu.</property> | 148 | <property name="label" translatable="yes">Select the package and choose the action from the 'Package' menu.</property> |
36 | @@ -166,14 +151,16 @@ | |||
37 | 166 | </object> | 151 | </object> |
38 | 167 | <packing> | 152 | <packing> |
39 | 168 | <property name="left_attach">1</property> | 153 | <property name="left_attach">1</property> |
42 | 169 | <property name="right_attach">2</property> | 154 | <property name="top_attach">0</property> |
43 | 170 | <property name="y_options"/> | 155 | <property name="width">1</property> |
44 | 156 | <property name="height">1</property> | ||
45 | 171 | </packing> | 157 | </packing> |
46 | 172 | </child> | 158 | </child> |
47 | 173 | <child> | 159 | <child> |
48 | 174 | <object class="GtkLabel" id="label24"> | 160 | <object class="GtkLabel" id="label24"> |
49 | 175 | <property name="visible">True</property> | 161 | <property name="visible">True</property> |
50 | 176 | <property name="can_focus">False</property> | 162 | <property name="can_focus">False</property> |
51 | 163 | <property name="valign">start</property> | ||
52 | 177 | <property name="xalign">0</property> | 164 | <property name="xalign">0</property> |
53 | 178 | <property name="yalign">0</property> | 165 | <property name="yalign">0</property> |
54 | 179 | <property name="label" translatable="yes">Double click on the package name.</property> | 166 | <property name="label" translatable="yes">Double click on the package name.</property> |
55 | @@ -182,16 +169,16 @@ | |||
56 | 182 | </object> | 169 | </object> |
57 | 183 | <packing> | 170 | <packing> |
58 | 184 | <property name="left_attach">1</property> | 171 | <property name="left_attach">1</property> |
59 | 185 | <property name="right_attach">2</property> | ||
60 | 186 | <property name="top_attach">1</property> | 172 | <property name="top_attach">1</property> |
63 | 187 | <property name="bottom_attach">2</property> | 173 | <property name="width">1</property> |
64 | 188 | <property name="y_options"/> | 174 | <property name="height">1</property> |
65 | 189 | </packing> | 175 | </packing> |
66 | 190 | </child> | 176 | </child> |
67 | 191 | <child> | 177 | <child> |
68 | 192 | <object class="GtkLabel" id="label25"> | 178 | <object class="GtkLabel" id="label25"> |
69 | 193 | <property name="visible">True</property> | 179 | <property name="visible">True</property> |
70 | 194 | <property name="can_focus">False</property> | 180 | <property name="can_focus">False</property> |
71 | 181 | <property name="valign">start</property> | ||
72 | 195 | <property name="xalign">0</property> | 182 | <property name="xalign">0</property> |
73 | 196 | <property name="yalign">0</property> | 183 | <property name="yalign">0</property> |
74 | 197 | <property name="label" translatable="yes">Choose the action from the context menu of the package.</property> | 184 | <property name="label" translatable="yes">Choose the action from the context menu of the package.</property> |
75 | @@ -200,16 +187,16 @@ | |||
76 | 200 | </object> | 187 | </object> |
77 | 201 | <packing> | 188 | <packing> |
78 | 202 | <property name="left_attach">1</property> | 189 | <property name="left_attach">1</property> |
79 | 203 | <property name="right_attach">2</property> | ||
80 | 204 | <property name="top_attach">2</property> | 190 | <property name="top_attach">2</property> |
83 | 205 | <property name="bottom_attach">3</property> | 191 | <property name="width">1</property> |
84 | 206 | <property name="y_options"/> | 192 | <property name="height">1</property> |
85 | 207 | </packing> | 193 | </packing> |
86 | 208 | </child> | 194 | </child> |
87 | 209 | <child> | 195 | <child> |
88 | 210 | <object class="GtkLabel" id="label26"> | 196 | <object class="GtkLabel" id="label26"> |
89 | 211 | <property name="visible">True</property> | 197 | <property name="visible">True</property> |
90 | 212 | <property name="can_focus">False</property> | 198 | <property name="can_focus">False</property> |
91 | 199 | <property name="valign">start</property> | ||
92 | 213 | <property name="xalign">0</property> | 200 | <property name="xalign">0</property> |
93 | 214 | <property name="yalign">0</property> | 201 | <property name="yalign">0</property> |
94 | 215 | <property name="label" translatable="yes">Click on the status icon to open a menu that contains all actions.</property> | 202 | <property name="label" translatable="yes">Click on the status icon to open a menu that contains all actions.</property> |
95 | @@ -218,61 +205,94 @@ | |||
96 | 218 | </object> | 205 | </object> |
97 | 219 | <packing> | 206 | <packing> |
98 | 220 | <property name="left_attach">1</property> | 207 | <property name="left_attach">1</property> |
99 | 221 | <property name="right_attach">2</property> | ||
100 | 222 | <property name="top_attach">3</property> | 208 | <property name="top_attach">3</property> |
115 | 223 | <property name="bottom_attach">4</property> | 209 | <property name="width">1</property> |
116 | 224 | <property name="x_options">GTK_FILL</property> | 210 | <property name="height">1</property> |
117 | 225 | <property name="y_options">GTK_EXPAND</property> | 211 | </packing> |
118 | 226 | </packing> | 212 | </child> |
119 | 227 | </child> | 213 | <child> |
120 | 228 | <child> | 214 | <object class="GtkLabel" id="label1"> |
121 | 229 | <object class="GtkLabel" id="label20"> | 215 | <property name="visible">True</property> |
122 | 230 | <property name="visible">True</property> | 216 | <property name="can_focus">False</property> |
123 | 231 | <property name="can_focus">False</property> | 217 | <property name="halign">start</property> |
124 | 232 | <property name="xalign">0</property> | 218 | <property name="valign">start</property> |
125 | 233 | <property name="yalign">0</property> | 219 | <property name="xalign">0</property> |
126 | 234 | <property name="label" translatable="yes"> - </property> | 220 | <property name="yalign">0</property> |
127 | 235 | </object> | 221 | <property name="xpad">6</property> |
128 | 236 | <packing> | 222 | <property name="label" translatable="yes">-</property> |
129 | 223 | <property name="justify">fill</property> | ||
130 | 224 | <property name="wrap">True</property> | ||
131 | 225 | </object> | ||
132 | 226 | <packing> | ||
133 | 227 | <property name="left_attach">0</property> | ||
134 | 228 | <property name="top_attach">0</property> | ||
135 | 229 | <property name="width">1</property> | ||
136 | 230 | <property name="height">1</property> | ||
137 | 231 | </packing> | ||
138 | 232 | </child> | ||
139 | 233 | <child> | ||
140 | 234 | <object class="GtkLabel" id="label2"> | ||
141 | 235 | <property name="visible">True</property> | ||
142 | 236 | <property name="can_focus">False</property> | ||
143 | 237 | <property name="halign">start</property> | ||
144 | 238 | <property name="valign">start</property> | ||
145 | 239 | <property name="xalign">0</property> | ||
146 | 240 | <property name="yalign">0</property> | ||
147 | 241 | <property name="xpad">6</property> | ||
148 | 242 | <property name="label" translatable="yes">-</property> | ||
149 | 243 | <property name="justify">fill</property> | ||
150 | 244 | <property name="wrap">True</property> | ||
151 | 245 | </object> | ||
152 | 246 | <packing> | ||
153 | 247 | <property name="left_attach">0</property> | ||
154 | 237 | <property name="top_attach">1</property> | 248 | <property name="top_attach">1</property> |
158 | 238 | <property name="bottom_attach">2</property> | 249 | <property name="width">1</property> |
159 | 239 | <property name="x_options">GTK_FILL</property> | 250 | <property name="height">1</property> |
157 | 240 | <property name="y_options">GTK_FILL</property> | ||
160 | 241 | </packing> | 251 | </packing> |
161 | 242 | </child> | 252 | </child> |
162 | 243 | <child> | 253 | <child> |
164 | 244 | <object class="GtkLabel" id="label21"> | 254 | <object class="GtkLabel" id="label3"> |
165 | 245 | <property name="visible">True</property> | 255 | <property name="visible">True</property> |
166 | 246 | <property name="can_focus">False</property> | 256 | <property name="can_focus">False</property> |
167 | 257 | <property name="halign">start</property> | ||
168 | 258 | <property name="valign">start</property> | ||
169 | 247 | <property name="xalign">0</property> | 259 | <property name="xalign">0</property> |
170 | 248 | <property name="yalign">0</property> | 260 | <property name="yalign">0</property> |
172 | 249 | <property name="label" translatable="yes"> - </property> | 261 | <property name="xpad">6</property> |
173 | 262 | <property name="label" translatable="yes">-</property> | ||
174 | 263 | <property name="justify">fill</property> | ||
175 | 264 | <property name="wrap">True</property> | ||
176 | 250 | </object> | 265 | </object> |
177 | 251 | <packing> | 266 | <packing> |
178 | 267 | <property name="left_attach">0</property> | ||
179 | 252 | <property name="top_attach">2</property> | 268 | <property name="top_attach">2</property> |
183 | 253 | <property name="bottom_attach">3</property> | 269 | <property name="width">1</property> |
184 | 254 | <property name="x_options">GTK_FILL</property> | 270 | <property name="height">1</property> |
182 | 255 | <property name="y_options">GTK_FILL</property> | ||
185 | 256 | </packing> | 271 | </packing> |
186 | 257 | </child> | 272 | </child> |
187 | 258 | <child> | 273 | <child> |
189 | 259 | <object class="GtkLabel" id="label22"> | 274 | <object class="GtkLabel" id="label4"> |
190 | 260 | <property name="visible">True</property> | 275 | <property name="visible">True</property> |
191 | 261 | <property name="can_focus">False</property> | 276 | <property name="can_focus">False</property> |
192 | 277 | <property name="halign">start</property> | ||
193 | 278 | <property name="valign">start</property> | ||
194 | 262 | <property name="xalign">0</property> | 279 | <property name="xalign">0</property> |
195 | 263 | <property name="yalign">0</property> | 280 | <property name="yalign">0</property> |
197 | 264 | <property name="label" translatable="yes"> - </property> | 281 | <property name="xpad">6</property> |
198 | 282 | <property name="label" translatable="yes">-</property> | ||
199 | 283 | <property name="justify">fill</property> | ||
200 | 284 | <property name="wrap">True</property> | ||
201 | 265 | </object> | 285 | </object> |
202 | 266 | <packing> | 286 | <packing> |
203 | 287 | <property name="left_attach">0</property> | ||
204 | 267 | <property name="top_attach">3</property> | 288 | <property name="top_attach">3</property> |
208 | 268 | <property name="bottom_attach">4</property> | 289 | <property name="width">1</property> |
209 | 269 | <property name="x_options">GTK_FILL</property> | 290 | <property name="height">1</property> |
207 | 270 | <property name="y_options">GTK_FILL</property> | ||
210 | 271 | </packing> | 291 | </packing> |
211 | 272 | </child> | 292 | </child> |
212 | 273 | </object> | 293 | </object> |
213 | 274 | <packing> | 294 | <packing> |
215 | 275 | <property name="expand">False</property> | 295 | <property name="expand">True</property> |
216 | 276 | <property name="fill">True</property> | 296 | <property name="fill">True</property> |
217 | 277 | <property name="position">4</property> | 297 | <property name="position">4</property> |
218 | 278 | </packing> | 298 | </packing> |
219 | @@ -290,6 +310,7 @@ | |||
220 | 290 | <property name="visible">True</property> | 310 | <property name="visible">True</property> |
221 | 291 | <property name="can_focus">True</property> | 311 | <property name="can_focus">True</property> |
222 | 292 | <property name="receives_default">False</property> | 312 | <property name="receives_default">False</property> |
223 | 313 | <property name="valign">end</property> | ||
224 | 293 | <property name="use_underline">True</property> | 314 | <property name="use_underline">True</property> |
225 | 294 | <property name="xalign">0.5</property> | 315 | <property name="xalign">0.5</property> |
226 | 295 | <property name="draw_indicator">True</property> | 316 | <property name="draw_indicator">True</property> |
227 | @@ -297,6 +318,7 @@ | |||
228 | 297 | <packing> | 318 | <packing> |
229 | 298 | <property name="expand">False</property> | 319 | <property name="expand">False</property> |
230 | 299 | <property name="fill">False</property> | 320 | <property name="fill">False</property> |
231 | 321 | <property name="pack_type">end</property> | ||
232 | 300 | <property name="position">1</property> | 322 | <property name="position">1</property> |
233 | 301 | </packing> | 323 | </packing> |
234 | 302 | </child> | 324 | </child> |
235 | @@ -309,7 +331,7 @@ | |||
236 | 309 | </child> | 331 | </child> |
237 | 310 | </object> | 332 | </object> |
238 | 311 | <packing> | 333 | <packing> |
240 | 312 | <property name="expand">False</property> | 334 | <property name="expand">True</property> |
241 | 313 | <property name="fill">True</property> | 335 | <property name="fill">True</property> |
242 | 314 | <property name="position">1</property> | 336 | <property name="position">1</property> |
243 | 315 | </packing> | 337 | </packing> |
244 | 316 | 338 | ||
245 | === modified file 'gtk/rgmainwindow.cc' | |||
246 | --- gtk/rgmainwindow.cc 2012-11-21 18:52:17 +0000 | |||
247 | +++ gtk/rgmainwindow.cc 2012-11-22 11:55:47 +0000 | |||
248 | @@ -317,7 +317,6 @@ | |||
249 | 317 | _pkgList = GTK_TREE_MODEL(gtk_pkg_list_new(_lister)); | 317 | _pkgList = GTK_TREE_MODEL(gtk_pkg_list_new(_lister)); |
250 | 318 | gtk_tree_view_set_model(GTK_TREE_VIEW(_treeView), | 318 | gtk_tree_view_set_model(GTK_TREE_VIEW(_treeView), |
251 | 319 | GTK_TREE_MODEL(_pkgList)); | 319 | GTK_TREE_MODEL(_pkgList)); |
252 | 320 | |||
253 | 321 | if(setAdjustment) { | 320 | if(setAdjustment) { |
254 | 322 | gtk_adjustment_value_changed( | 321 | gtk_adjustment_value_changed( |
255 | 323 | gtk_tree_view_get_hadjustment(GTK_TREE_VIEW(_treeView))); | 322 | gtk_tree_view_get_hadjustment(GTK_TREE_VIEW(_treeView))); |
256 | @@ -329,10 +328,11 @@ | |||
257 | 329 | if(selectedPkg != NULL) { | 328 | if(selectedPkg != NULL) { |
258 | 330 | GtkTreeIter iter; | 329 | GtkTreeIter iter; |
259 | 331 | RPackage *pkg; | 330 | RPackage *pkg; |
261 | 332 | 331 | GtkTreePath *start = gtk_tree_path_new(); | |
262 | 333 | // make sure we have the keyboard focus after the refresh | 332 | // make sure we have the keyboard focus after the refresh |
263 | 334 | gtk_widget_grab_focus(_treeView); | 333 | gtk_widget_grab_focus(_treeView); |
264 | 335 | 334 | ||
265 | 335 | gtk_tree_view_get_visible_range(GTK_TREE_VIEW(_treeView), &start, NULL); | ||
266 | 336 | // find and select the pkg we are looking for | 336 | // find and select the pkg we are looking for |
267 | 337 | bool ok = gtk_tree_model_get_iter_first(_pkgList, &iter); | 337 | bool ok = gtk_tree_model_get_iter_first(_pkgList, &iter); |
268 | 338 | while(ok) { | 338 | while(ok) { |
269 | @@ -340,13 +340,15 @@ | |||
270 | 340 | if(pkg == selectedPkg) { | 340 | if(pkg == selectedPkg) { |
271 | 341 | GtkTreePath* path = gtk_tree_model_get_path(_pkgList, &iter); | 341 | GtkTreePath* path = gtk_tree_model_get_path(_pkgList, &iter); |
272 | 342 | gtk_tree_view_set_cursor(GTK_TREE_VIEW(_treeView), path, | 342 | gtk_tree_view_set_cursor(GTK_TREE_VIEW(_treeView), path, |
274 | 343 | NULL, false); | 343 | NULL, false); |
275 | 344 | gtk_tree_path_free(path); | 344 | gtk_tree_path_free(path); |
276 | 345 | break; | 345 | break; |
277 | 346 | } | 346 | } |
278 | 347 | 347 | ||
279 | 348 | ok = gtk_tree_model_iter_next(_pkgList, &iter); | 348 | ok = gtk_tree_model_iter_next(_pkgList, &iter); |
280 | 349 | } | 349 | } |
281 | 350 | gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(_treeView), start, NULL, true, 0.0, 0.0); | ||
282 | 351 | gtk_tree_path_free(start); | ||
283 | 350 | } | 352 | } |
284 | 351 | 353 | ||
285 | 352 | setStatusText(); | 354 | setStatusText(); |