Merge lp:~evfool/synaptic/jumpingtree into lp:synaptic

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
Reviewer Review Type Date Requested Status
Michael Vogt Pending
Review via email: mp+135653@code.launchpad.net

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
=== modified file 'gtk/gtkbuilder/dialog_welcome.ui'
--- gtk/gtkbuilder/dialog_welcome.ui 2012-10-17 20:05:41 +0000
+++ gtk/gtkbuilder/dialog_welcome.ui 2012-11-22 11:55:47 +0000
@@ -135,29 +135,14 @@
135 </packing>135 </packing>
136 </child>136 </child>
137 <child>137 <child>
138 <object class="GtkTable" id="table1">138 <object class="GtkGrid" id="grid1">
139 <property name="visible">True</property>139 <property name="visible">True</property>
140 <property name="can_focus">False</property>140 <property name="can_focus">False</property>
141 <property name="n_rows">4</property>
142 <property name="n_columns">2</property>
143 <property name="row_spacing">6</property>
144 <child>
145 <object class="GtkLabel" id="label19">
146 <property name="visible">True</property>
147 <property name="can_focus">False</property>
148 <property name="xalign">0</property>
149 <property name="yalign">0</property>
150 <property name="label" translatable="yes"> - </property>
151 </object>
152 <packing>
153 <property name="x_options">GTK_FILL</property>
154 <property name="y_options">GTK_FILL</property>
155 </packing>
156 </child>
157 <child>141 <child>
158 <object class="GtkLabel" id="label23">142 <object class="GtkLabel" id="label23">
159 <property name="visible">True</property>143 <property name="visible">True</property>
160 <property name="can_focus">False</property>144 <property name="can_focus">False</property>
145 <property name="valign">start</property>
161 <property name="xalign">0</property>146 <property name="xalign">0</property>
162 <property name="yalign">0</property>147 <property name="yalign">0</property>
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>
@@ -166,14 +151,16 @@
166 </object>151 </object>
167 <packing>152 <packing>
168 <property name="left_attach">1</property>153 <property name="left_attach">1</property>
169 <property name="right_attach">2</property>154 <property name="top_attach">0</property>
170 <property name="y_options"/>155 <property name="width">1</property>
156 <property name="height">1</property>
171 </packing>157 </packing>
172 </child>158 </child>
173 <child>159 <child>
174 <object class="GtkLabel" id="label24">160 <object class="GtkLabel" id="label24">
175 <property name="visible">True</property>161 <property name="visible">True</property>
176 <property name="can_focus">False</property>162 <property name="can_focus">False</property>
163 <property name="valign">start</property>
177 <property name="xalign">0</property>164 <property name="xalign">0</property>
178 <property name="yalign">0</property>165 <property name="yalign">0</property>
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>
@@ -182,16 +169,16 @@
182 </object>169 </object>
183 <packing>170 <packing>
184 <property name="left_attach">1</property>171 <property name="left_attach">1</property>
185 <property name="right_attach">2</property>
186 <property name="top_attach">1</property>172 <property name="top_attach">1</property>
187 <property name="bottom_attach">2</property>173 <property name="width">1</property>
188 <property name="y_options"/>174 <property name="height">1</property>
189 </packing>175 </packing>
190 </child>176 </child>
191 <child>177 <child>
192 <object class="GtkLabel" id="label25">178 <object class="GtkLabel" id="label25">
193 <property name="visible">True</property>179 <property name="visible">True</property>
194 <property name="can_focus">False</property>180 <property name="can_focus">False</property>
181 <property name="valign">start</property>
195 <property name="xalign">0</property>182 <property name="xalign">0</property>
196 <property name="yalign">0</property>183 <property name="yalign">0</property>
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>
@@ -200,16 +187,16 @@
200 </object>187 </object>
201 <packing>188 <packing>
202 <property name="left_attach">1</property>189 <property name="left_attach">1</property>
203 <property name="right_attach">2</property>
204 <property name="top_attach">2</property>190 <property name="top_attach">2</property>
205 <property name="bottom_attach">3</property>191 <property name="width">1</property>
206 <property name="y_options"/>192 <property name="height">1</property>
207 </packing>193 </packing>
208 </child>194 </child>
209 <child>195 <child>
210 <object class="GtkLabel" id="label26">196 <object class="GtkLabel" id="label26">
211 <property name="visible">True</property>197 <property name="visible">True</property>
212 <property name="can_focus">False</property>198 <property name="can_focus">False</property>
199 <property name="valign">start</property>
213 <property name="xalign">0</property>200 <property name="xalign">0</property>
214 <property name="yalign">0</property>201 <property name="yalign">0</property>
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>
@@ -218,61 +205,94 @@
218 </object>205 </object>
219 <packing>206 <packing>
220 <property name="left_attach">1</property>207 <property name="left_attach">1</property>
221 <property name="right_attach">2</property>
222 <property name="top_attach">3</property>208 <property name="top_attach">3</property>
223 <property name="bottom_attach">4</property>209 <property name="width">1</property>
224 <property name="x_options">GTK_FILL</property>210 <property name="height">1</property>
225 <property name="y_options">GTK_EXPAND</property>211 </packing>
226 </packing>212 </child>
227 </child>213 <child>
228 <child>214 <object class="GtkLabel" id="label1">
229 <object class="GtkLabel" id="label20">215 <property name="visible">True</property>
230 <property name="visible">True</property>216 <property name="can_focus">False</property>
231 <property name="can_focus">False</property>217 <property name="halign">start</property>
232 <property name="xalign">0</property>218 <property name="valign">start</property>
233 <property name="yalign">0</property>219 <property name="xalign">0</property>
234 <property name="label" translatable="yes"> - </property>220 <property name="yalign">0</property>
235 </object>221 <property name="xpad">6</property>
236 <packing>222 <property name="label" translatable="yes">-</property>
223 <property name="justify">fill</property>
224 <property name="wrap">True</property>
225 </object>
226 <packing>
227 <property name="left_attach">0</property>
228 <property name="top_attach">0</property>
229 <property name="width">1</property>
230 <property name="height">1</property>
231 </packing>
232 </child>
233 <child>
234 <object class="GtkLabel" id="label2">
235 <property name="visible">True</property>
236 <property name="can_focus">False</property>
237 <property name="halign">start</property>
238 <property name="valign">start</property>
239 <property name="xalign">0</property>
240 <property name="yalign">0</property>
241 <property name="xpad">6</property>
242 <property name="label" translatable="yes">-</property>
243 <property name="justify">fill</property>
244 <property name="wrap">True</property>
245 </object>
246 <packing>
247 <property name="left_attach">0</property>
237 <property name="top_attach">1</property>248 <property name="top_attach">1</property>
238 <property name="bottom_attach">2</property>249 <property name="width">1</property>
239 <property name="x_options">GTK_FILL</property>250 <property name="height">1</property>
240 <property name="y_options">GTK_FILL</property>
241 </packing>251 </packing>
242 </child>252 </child>
243 <child>253 <child>
244 <object class="GtkLabel" id="label21">254 <object class="GtkLabel" id="label3">
245 <property name="visible">True</property>255 <property name="visible">True</property>
246 <property name="can_focus">False</property>256 <property name="can_focus">False</property>
257 <property name="halign">start</property>
258 <property name="valign">start</property>
247 <property name="xalign">0</property>259 <property name="xalign">0</property>
248 <property name="yalign">0</property>260 <property name="yalign">0</property>
249 <property name="label" translatable="yes"> - </property>261 <property name="xpad">6</property>
262 <property name="label" translatable="yes">-</property>
263 <property name="justify">fill</property>
264 <property name="wrap">True</property>
250 </object>265 </object>
251 <packing>266 <packing>
267 <property name="left_attach">0</property>
252 <property name="top_attach">2</property>268 <property name="top_attach">2</property>
253 <property name="bottom_attach">3</property>269 <property name="width">1</property>
254 <property name="x_options">GTK_FILL</property>270 <property name="height">1</property>
255 <property name="y_options">GTK_FILL</property>
256 </packing>271 </packing>
257 </child>272 </child>
258 <child>273 <child>
259 <object class="GtkLabel" id="label22">274 <object class="GtkLabel" id="label4">
260 <property name="visible">True</property>275 <property name="visible">True</property>
261 <property name="can_focus">False</property>276 <property name="can_focus">False</property>
277 <property name="halign">start</property>
278 <property name="valign">start</property>
262 <property name="xalign">0</property>279 <property name="xalign">0</property>
263 <property name="yalign">0</property>280 <property name="yalign">0</property>
264 <property name="label" translatable="yes"> - </property>281 <property name="xpad">6</property>
282 <property name="label" translatable="yes">-</property>
283 <property name="justify">fill</property>
284 <property name="wrap">True</property>
265 </object>285 </object>
266 <packing>286 <packing>
287 <property name="left_attach">0</property>
267 <property name="top_attach">3</property>288 <property name="top_attach">3</property>
268 <property name="bottom_attach">4</property>289 <property name="width">1</property>
269 <property name="x_options">GTK_FILL</property>290 <property name="height">1</property>
270 <property name="y_options">GTK_FILL</property>
271 </packing>291 </packing>
272 </child>292 </child>
273 </object>293 </object>
274 <packing>294 <packing>
275 <property name="expand">False</property>295 <property name="expand">True</property>
276 <property name="fill">True</property>296 <property name="fill">True</property>
277 <property name="position">4</property>297 <property name="position">4</property>
278 </packing>298 </packing>
@@ -290,6 +310,7 @@
290 <property name="visible">True</property>310 <property name="visible">True</property>
291 <property name="can_focus">True</property>311 <property name="can_focus">True</property>
292 <property name="receives_default">False</property>312 <property name="receives_default">False</property>
313 <property name="valign">end</property>
293 <property name="use_underline">True</property>314 <property name="use_underline">True</property>
294 <property name="xalign">0.5</property>315 <property name="xalign">0.5</property>
295 <property name="draw_indicator">True</property>316 <property name="draw_indicator">True</property>
@@ -297,6 +318,7 @@
297 <packing>318 <packing>
298 <property name="expand">False</property>319 <property name="expand">False</property>
299 <property name="fill">False</property>320 <property name="fill">False</property>
321 <property name="pack_type">end</property>
300 <property name="position">1</property>322 <property name="position">1</property>
301 </packing>323 </packing>
302 </child>324 </child>
@@ -309,7 +331,7 @@
309 </child>331 </child>
310 </object>332 </object>
311 <packing>333 <packing>
312 <property name="expand">False</property>334 <property name="expand">True</property>
313 <property name="fill">True</property>335 <property name="fill">True</property>
314 <property name="position">1</property>336 <property name="position">1</property>
315 </packing>337 </packing>
316338
=== modified file 'gtk/rgmainwindow.cc'
--- gtk/rgmainwindow.cc 2012-11-21 18:52:17 +0000
+++ gtk/rgmainwindow.cc 2012-11-22 11:55:47 +0000
@@ -317,7 +317,6 @@
317 _pkgList = GTK_TREE_MODEL(gtk_pkg_list_new(_lister));317 _pkgList = GTK_TREE_MODEL(gtk_pkg_list_new(_lister));
318 gtk_tree_view_set_model(GTK_TREE_VIEW(_treeView),318 gtk_tree_view_set_model(GTK_TREE_VIEW(_treeView),
319 GTK_TREE_MODEL(_pkgList));319 GTK_TREE_MODEL(_pkgList));
320
321 if(setAdjustment) {320 if(setAdjustment) {
322 gtk_adjustment_value_changed(321 gtk_adjustment_value_changed(
323 gtk_tree_view_get_hadjustment(GTK_TREE_VIEW(_treeView)));322 gtk_tree_view_get_hadjustment(GTK_TREE_VIEW(_treeView)));
@@ -329,10 +328,11 @@
329 if(selectedPkg != NULL) {328 if(selectedPkg != NULL) {
330 GtkTreeIter iter;329 GtkTreeIter iter;
331 RPackage *pkg;330 RPackage *pkg;
332 331 GtkTreePath *start = gtk_tree_path_new();
333 // make sure we have the keyboard focus after the refresh332 // make sure we have the keyboard focus after the refresh
334 gtk_widget_grab_focus(_treeView);333 gtk_widget_grab_focus(_treeView);
335334
335 gtk_tree_view_get_visible_range(GTK_TREE_VIEW(_treeView), &start, NULL);
336 // find and select the pkg we are looking for336 // find and select the pkg we are looking for
337 bool ok = gtk_tree_model_get_iter_first(_pkgList, &iter); 337 bool ok = gtk_tree_model_get_iter_first(_pkgList, &iter);
338 while(ok) {338 while(ok) {
@@ -340,13 +340,15 @@
340 if(pkg == selectedPkg) {340 if(pkg == selectedPkg) {
341 GtkTreePath* path = gtk_tree_model_get_path(_pkgList, &iter);341 GtkTreePath* path = gtk_tree_model_get_path(_pkgList, &iter);
342 gtk_tree_view_set_cursor(GTK_TREE_VIEW(_treeView), path, 342 gtk_tree_view_set_cursor(GTK_TREE_VIEW(_treeView), path,
343 NULL, false);343 NULL, false);
344 gtk_tree_path_free(path);344 gtk_tree_path_free(path);
345 break;345 break;
346 }346 }
347347
348 ok = gtk_tree_model_iter_next(_pkgList, &iter);348 ok = gtk_tree_model_iter_next(_pkgList, &iter);
349 }349 }
350 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(_treeView), start, NULL, true, 0.0, 0.0);
351 gtk_tree_path_free(start);
350 }352 }
351353
352 setStatusText();354 setStatusText();

Subscribers

People subscribed via source and target branches

to status/vote changes: