Google
  Web www.spinics.net

Re: [PATCH 3/3] Add layout preview functionality to the KeyboardSpoke

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


> @@ -239,8 +240,18 @@ class KeyboardSpoke(NormalSpoke):
>          store.swap(cur, nxt)
>          selection.emit("changed")
>  
> -    def on_settings_clicked(self, button):
> -        pass
> +    def on_preview_clicked(self, button):
> +        selection = self.builder.get_object("layoutSelection")
> +        (store, cur) = selection.get_selected()
> +        layout_description = store[cur]
> +        layout_name = self._xkl_wrapper.description_to_name.get(layout_description, None)
> +        if not layout_name:
> +            return
> +
> +        dialog = Gkbd.KeyboardDrawing.dialog_new()
> +        Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg,
> +                                               layout_name)
> +        dialog.show_all()
>  
>      def on_selection_changed(self, *args):
>          self.layout_selection_changed(self.builder.get_object("layoutSelection"))

I believe you want to write this in a lightbox.

- Chris

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


[Home]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Red Hat 9 Bible]     [Fedora Bible]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net