Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0.2, 1.0.3, and 1.0.4

stable gdialog: disable entire dialog till it's ready

If a dialog contains the calculation which takes lots of time,
GDialog.after_init() function is not called till that calculation
is finished.

For example, QuickOp dialog needs to check dirstate of working tree.

Fixes #1101, #1132

Changeset e5ee122d6672

Parent f96c9e5be541

by Yuki KODAMA

Changes to one file · Browse files at e5ee122d6672 Showing diff from parent f96c9e5be541 Diff from another changeset...

 
731
732
733
 
 
 
734
735
736
 
799
800
801
 
 
 
 
 
 
 
 
 
 
802
803
804
 
856
857
858
859
860
861
862
863
864
865
866
867
868
 
731
732
733
734
735
736
737
738
739
 
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
 
869
870
871
 
 
 
 
 
 
 
872
873
874
@@ -731,6 +731,9 @@
  # signal handler   self.connect('realize', self.realized)   + # disable entire dialog + self.set_sensitive(False) +   ### Overridable Functions ###     def get_title(self, reponame): @@ -799,6 +802,16 @@
  # add Abort button   self.action_area.add(self.buttons['abort'])   + # enable entire dialog + self.set_sensitive(True) + + # focus on default button if needs + name = self.get_default_button() + if name: + btn = self.buttons.get(name) + if btn: + btn.grab_focus() +   def do_switch_to(self, mode, cmd=True):   if mode == MODE_NORMAL:   normal = True @@ -856,13 +869,6 @@
  gtklib.idle_add_single_call(self.destroy)   return   - # focus on default button if needs - name = self.get_default_button() - if name: - btn = self.buttons.get(name) - if btn: - btn.grab_focus() -   # signal handler   self.connect('response', self.dialog_response)