Re: [f16-branch] Regenerate tasklist when a repo is removed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It will work, but I prefer separate "create" and "init" methods over one method which has to work for both cases. But if you do not mind making the old gui more messy than it already is, push it :)

----- Original Message -----
> Resolves: rhbz#746573
> ---
>  pyanaconda/iw/task_gui.py |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/pyanaconda/iw/task_gui.py b/pyanaconda/iw/task_gui.py
> index 7ff96ab..21b5587 100644
> --- a/pyanaconda/iw/task_gui.py
> +++ b/pyanaconda/iw/task_gui.py
> @@ -96,7 +96,7 @@ class RepoEditor:
>      def on_mirrorlistCheckbox_toggled(self, widget, *args):
>          pass
>  
> -    def __init__(self, anaconda, repoObj):
> +    def __init__(self, anaconda, repoObj,
> group_update_cb=lambda:None):
>          self.anaconda = anaconda
>          self.backend = self.anaconda.backend
>          self.intf = self.anaconda.intf
> @@ -126,6 +126,8 @@ class RepoEditor:
>  
>          self.dialog.set_title(_("Edit Repository"))
>  
> +        self.group_update_cb = group_update_cb
> +
>          # Remove these until they are actually implemented
>          self.typeComboBox.remove_text(3)
>  
> @@ -394,6 +396,7 @@ class RepoEditor:
>                  # update groups information
>                  try:
>                      self.anaconda.backend.ayum.doGroupSetup()
> +                    self.group_update_cb()
>                  except Exception as e:
>                      log.debug("unable to reset group information
>                      after UI repo edit: %s"
>                                % e)
> @@ -536,7 +539,7 @@ class TaskWindow(InstallWindow):
>                  return gtk.RESPONSE_CANCEL
>  
>  
> -        dialog = RepoEditor(self.anaconda, repo)
> +        dialog = RepoEditor(self.anaconda, repo,
> self._refresh_task_list)
>          dialog.createDialog()
>          dialog.run()
>  
> @@ -596,11 +599,12 @@ class TaskWindow(InstallWindow):
>  
>          store.set_value(i, 0, not wasChecked)
>  
> -    def _createTaskStore(self):
> +    def _refresh_task_list(self):
>          store = gtk.ListStore(gobject.TYPE_BOOLEAN,
>                                gobject.TYPE_STRING,
>                                gobject.TYPE_PYOBJECT)
>          tl = self.xml.get_widget("taskList")
> +        map(lambda col: tl.remove_column(col) , tl.get_columns())
>          tl.set_model(store)
>  
>          cbr = gtk.CellRendererToggle()
> @@ -697,7 +701,7 @@ class TaskWindow(InstallWindow):
>          else:
>              self.xml.get_widget("customRadio").set_active(False)
>  
> -        self.ts = self._createTaskStore()
> +        self.ts = self._refresh_task_list()
>          self.rs = self._createRepoStore()
>  
>          if len(self.ts.get_model()) == 0:
> --
> 1.7.6.4
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> 

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux