Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

gdialog: create body objects *before* menubar

This should ease some class of initialization order
problems.

For example the history dialog creates its graphview object
in get_body. Menu item states might depend on what's in the
body (e.g. initial toggle calls for "view" menu items)

Changeset 6d11661bbb00

Parent 05a9ce1e6050

by Adrian Buehlmann

Changes to one file · Browse files at 6d11661bbb00 Showing diff from parent 05a9ce1e6050 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​gdialog.py Stacked
 
408
409
410
 
 
 
 
 
 
 
 
 
 
 
 
 
411
412
413
 
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
 
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
 
463
464
465
 
 
 
 
 
 
 
 
 
 
 
 
 
466
467
468
@@ -408,6 +408,19 @@
  if x >= 0 and x < w and y >= 0 and y < h:   self.move(x, y)   + self.tooltips = gtk.Tooltips() + toolbar = gtk.Toolbar() + tbuttons = self.get_tbbuttons() + for tbutton in tbuttons: + toolbar.insert(tbutton, -1) + self.toolbar = toolbar + + # Subclass returns the main body + body = self.get_body() + + # Subclass provides extra stuff in bottom hbox + extras = self.get_extras() +   menus = self.get_menu_list()   if menus:   allmenus = [ @@ -450,19 +463,6 @@
  item.set_right_justified(rightjustified)   menubar.append(item)   - self.tooltips = gtk.Tooltips() - toolbar = gtk.Toolbar() - tbuttons = self.get_tbbuttons() - for tbutton in tbuttons: - toolbar.insert(tbutton, -1) - self.toolbar = toolbar - - # Subclass returns the main body - body = self.get_body() - - # Subclass provides extra stuff in bottom hbox - extras = self.get_extras() -   vbox = gtk.VBox(False, 0)   self.add(vbox)   if menus: