Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Wayland support

  • Loading branch information...
commit 37e3913e2aedf4a308ae1f02c4451892c2b05447 1 parent 9d32055
@Nano77 authored
View
19 gdm3setup.in
@@ -526,6 +526,7 @@ class MainWindow(Gtk.ApplicationWindow) :
self.Action_fingerprint_authentication = Gio.SimpleAction.new_stateful('authentication-fingerprint', None, GLib.Variant('b', False))
self.Action_password_authentication = Gio.SimpleAction.new_stateful('authentication-password', None, GLib.Variant('b', False))
self.Action_smartcard_authentication = Gio.SimpleAction.new_stateful('authentication-smartcard', None, GLib.Variant('b', False))
+ self.Switch_wayland = self.Builder.get_object("wayland-switch")
self.listbox = self.Builder.get_object("listbox1")
@@ -567,6 +568,7 @@ class MainWindow(Gtk.ApplicationWindow) :
self.Action_fingerprint_authentication.connect('activate', self.fingerprint_authentication_changed)
self.Action_password_authentication.connect('activate', self.password_authentication_changed)
self.Action_smartcard_authentication.connect('activate', self.smartcard_authentication_changed)
+ self.Switch_wayland.connect("state-set",self.wayland_toggled)
self.listbox.connect("row-activated",self.row_activated)
app.add_action(self.Action_allowed_failures)
@@ -574,7 +576,6 @@ class MainWindow(Gtk.ApplicationWindow) :
app.add_action(self.Action_password_authentication)
app.add_action(self.Action_smartcard_authentication)
-
def load_shell_list(self):
lst_shell_themes = os.listdir('/usr/share/themes')
@@ -615,6 +616,7 @@ class MainWindow(Gtk.ApplicationWindow) :
self.FINGERPRINT_AUTHENTICATION = GdmSetupClient.GetFingerprintAuthentication()
self.PASSWORD_AUTHENTICATION = GdmSetupClient.GetPasswordAuthentication()
self.SMARTCARD_AUTHENTICATION = GdmSetupClient.GetSmartcardAuthentication()
+ self.WAYLAND = GdmSetupClient.GetWaylandEnable()
self.ComboBox_shell10.set_value(self.SHELL_THEME)
self.ComboBox_icon.set_value(self.ICON_THEME)
self.ComboBox_cursor.set_value(self.CURSOR_THEME)
@@ -637,6 +639,7 @@ class MainWindow(Gtk.ApplicationWindow) :
self.icon_status.set_text(self.ComboBox_icon.get_value())
self.cursor_status.set_text(self.ComboBox_cursor.get_value())
self.allowed_failures_status.set_text(str(self.ALLOWED_FAILURES))
+ self.Switch_wayland.set_active(self.WAYLAND)
def set_autologin(self,autologin,username,timed,time):
if self.SetAutoLogin(autologin,username,timed,time)=="OK" :
@@ -842,6 +845,16 @@ class MainWindow(Gtk.ApplicationWindow) :
action.set_state(GLib.Variant('i',self.ALLOWED_FAILURES))
self.Popover_allowed_failure.hide()
+ def wayland_toggled(self,e,state):
+ wayland = self.Switch_wayland.get_active()
+ if self.WAYLAND != wayland :
+ if GdmSetupClient.SetWaylandEnable(wayland) :
+ self.WAYLAND = wayland
+ print ("Wayland Enable Changed : " + str(self.WAYLAND))
+ else:
+ self.Switch_wayland.set_active(self.WAYLAND)
+ return True
+
def row_activated(self,listbox,row):
row_name = Gtk.Buildable.get_name(row)
@@ -873,7 +886,9 @@ class MainWindow(Gtk.ApplicationWindow) :
elif row_name == "seconds-row":
active = self.Switch_clock_seconds10.get_active()
self.Switch_clock_seconds10.set_active( not active )
-
+ elif row_name == "wayland-row":
+ active = self.Switch_wayland.get_active()
+ self.Switch_wayland.set_active( not active )
#-----------------------------------------------
def get_setting(name,data):
View
42 gdm3setup.ui
@@ -932,6 +932,48 @@ File must be in /usr/share or /usr/local/share</property>
</child>
</object>
</child>
+ <child>
+ <object class="GtkListBoxRow" id="wayland-row">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkBox" id="box_wayland">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_start">16</property>
+ <property name="margin_end">16</property>
+ <child>
+ <object class="GtkLabel" id="label_wayland">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">6</property>
+ <property name="label" translatable="yes">Enable Wayland</property>
+ <property name="ellipsize">end</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="wayland-switch">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="valign">center</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
View
4 po/gdm3setup-fr.po
@@ -215,6 +215,10 @@ msgstr "Afficher la date sur l'horloge"
msgid "Show Seconds in Clock"
msgstr "Afficher les secondes sur l'horloge"
+# gdm3setup.ui:951
+msgid "Enable Wayland"
+msgstr "Activer Wayland"
+
#: app-menu.ui:6
msgid "_About"
msgstr "_À propos"
View
4 po/gdm3setup.pot
@@ -212,6 +212,10 @@ msgstr ""
msgid "Show Seconds in Clock"
msgstr ""
+# gdm3setup.ui:951
+msgid "Enable Wayland"
+msgstr ""
+
#: app-menu.ui:6
msgid "_About"
msgstr ""
Please sign in to comment.
Something went wrong with that request. Please try again.