~dylanmccall/update-manager/dialogs-refactor

« back to all changes in this revision

Viewing changes to UpdateManager/backend/InstallBackendAptdaemon.py

  • Committer: Dylan McCall
  • Date: 2013-05-21 05:41:51 UTC
  • Revision ID: dylanmccall@ubuntu.com-20130521054151-wgryz6h491fz6uju
Progress dialog is resizable while downloading packages, too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
        If the expander is expanded afterwards the window won't change its
189
189
        size anymore. So we have to do this manually. See LP#840942
190
190
        """
191
 
        if expander.get_expanded() and expander.terminal.is_visible():
 
191
        if expander.get_expanded():
192
192
            win_width, win_height = self.window_main.get_size()
193
193
            exp_width = expander.get_allocation().width
194
194
            exp_height = expander.get_allocation().height
195
 
            terminal_width = expander.terminal.get_char_width() * 80
196
 
            terminal_height = expander.terminal.get_char_height() * 24
197
 
            new_width = terminal_width - exp_width + win_width
198
 
            new_height = terminal_height - exp_height + win_height
 
195
            if expander.terminal.get_visible():
 
196
                terminal_width = expander.terminal.get_char_width() * 80
 
197
                terminal_height = expander.terminal.get_char_height() * 24
 
198
                new_width = terminal_width - exp_width + win_width
 
199
                new_height = terminal_height - exp_height + win_height
 
200
            else:
 
201
                new_width = win_width + 100
 
202
                new_height = win_height + 200
199
203
            self.window_main.begin_user_resizable(new_width, new_height)
200
 
        else:
201
 
            self.window_main.end_user_resizable()
202
204
 
203
205
    def _on_medium_required(self, transaction, medium, drive):
204
206
        dialog = AptMediumRequiredDialog(medium, drive, self.window_main)