Re: [PATCH 2/2] Replace the last layout instead of removing (KeyboardSpoke)

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

 



> @@ -165,6 +169,9 @@ class KeyboardSpoke(NormalSpoke):
>                  if item in dialog.chosen_layouts:
>                      duplicates.add(item)
>                  itr = self._store.iter_next(itr)
> +            if self._remove_last_attempt:
> +                self._store.remove(self._store.get_iter_first())
> +                self._remove_last_attempt = False
>              for layout in dialog.chosen_layouts:
>                  if layout not in duplicates:
>                      self._addLayout(self._store, layout)

Please add some blank lines between blocks.

> @@ -181,8 +188,12 @@ class KeyboardSpoke(NormalSpoke):
>              itr2 = store.iter_next(itr2)
>              if itr2: #next one existing
>                  selection.select_iter(itr2)
> -            #nothing left to be selected
> -            store.remove(itr)
> +                store.remove(itr)
> +                return
> +            #nothing left, run AddLayout dialog to replace the current layout
> +            self._remove_last_attempt = True
> +            add_button = self.builder.get_object("addLayoutButton")
> +            GLib.idle_add(self.on_add_clicked, add_button)
>              return
>  

Why is the idle_add call necessary?

- Chris

_______________________________________________
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