297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
|
r[wn]["row:selected"] = paths[0]
# gtk.Toolbar
if t == gtk.Toolbar:
r[wn]["icon_size"] = int(w.get_icon_size())
r[wn]["style"] = int(w.get_style())
# gtk.Notebook
if t == gtk.Notebook:
r[wn]["page"] = w.get_current_page()
r[wn]["tab_pos"] = int(w.get_tab_pos())
#print(r)
return r
gtk_position_type_enum = [gtk.POS_LEFT, gtk.POS_RIGHT, gtk.POS_TOP, gtk.POS_BOTTOM]
#-- restore window and widget properties
|
<
>
>
|
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
|
r[wn]["row:selected"] = paths[0]
# gtk.Toolbar
if t == gtk.Toolbar:
r[wn]["icon_size"] = int(w.get_icon_size())
r[wn]["style"] = int(w.get_style())
# gtk.Notebook
if t == gtk.Notebook:
r[wn]["tab_pos"] = int(w.get_tab_pos())
r[wn]["tab_order"] = [w.get_menu_label_text(w.get_nth_page(i)) for i in xrange(0, w.get_n_pages())]
r[wn]["tab_current"] = w.get_menu_label_text(w.get_nth_page(w.get_current_page()))
#print(r)
return r
gtk_position_type_enum = [gtk.POS_LEFT, gtk.POS_RIGHT, gtk.POS_TOP, gtk.POS_BOTTOM]
#-- restore window and widget properties
|
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
|
w.get_selection().select_path(tuple(args))
# gtk.Toolbar
if method == "icon_size":
w.set_icon_size(args)
if method == "style":
w.set_style(args)
# gtk.Notebook
if method == "page":
w.set_current_page(args)
if method == "tab_pos":
w.set_tab_pos(r[wn]["tab_pos"])
pass
#-- Save-As dialog
#
@staticmethod
|
|
|
|
|
|
>
>
>
>
>
>
>
>
|
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
|
w.get_selection().select_path(tuple(args))
# gtk.Toolbar
if method == "icon_size":
w.set_icon_size(args)
if method == "style":
w.set_style(args)
# gtk.Notebook
if method == "tab_pos":
w.set_tab_pos(r[wn]["tab_pos"])
if method == "tab_order":
tab_current = r[wn].get("tab_current")
for pos,ord_tabname in enumerate(args):
# compare current label list on each reordering round
for i in range(0, w.get_n_pages()):
w_tab = w.get_nth_page(i)
w_label = w.get_menu_label_text(w_tab)
if w_label == ord_tabname:
w.reorder_child(w_tab, pos)
if tab_current == ord_tabname:
w_set_current_page(pos)
pass
#-- Save-As dialog
#
@staticmethod
|