Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/lib-tk/tkSimpleDialog.py

    r2 r391  
    4747        Toplevel.__init__(self, parent)
    4848
     49        self.withdraw() # remain invisible for now
    4950        # If the master is not viewable, don't
    5051        # make the child transient, or else it
     
    6667        self.buttonbox()
    6768
    68         self.wait_visibility() # window needs to be visible for the grab
    69         self.grab_set()
    7069
    7170        if not self.initial_focus:
     
    7877                                      parent.winfo_rooty()+50))
    7978
     79        self.deiconify() # become visibile now
     80
    8081        self.initial_focus.focus_set()
    8182
     83        # wait for window to appear on screen before calling grab_set
     84        self.wait_visibility()
     85        self.grab_set()
    8286        self.wait_window(self)
    8387
     
    197201        self.entry.grid(row=1, padx=5, sticky=W+E)
    198202
    199         if self.initialvalue:
     203        if self.initialvalue is not None:
    200204            self.entry.insert(0, self.initialvalue)
    201205            self.entry.select_range(0, END)
     
    280284class _QueryString(_QueryDialog):
    281285    def __init__(self, *args, **kw):
    282         if kw.has_key("show"):
     286        if "show" in kw:
    283287            self.__show = kw["show"]
    284288            del kw["show"]
Note: See TracChangeset for help on using the changeset viewer.