Skip to content

Commit

Permalink
remove "default" session because useless.
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Sep 17, 2024
1 parent e89b2c7 commit b41ccb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/module/lightdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ def __authentication_complete(self, greeter):
# Check session is valid
if self.__session == None:
self.__session = ""
if self.__session not in self.get_session_list() + [""]:
if self.__session == "":
self.__session = self.get_session_list()[0]
if self.__session not in self.get_session_list():
self.__show_message(greeter, _(
"Invalid session : {}").format(self.__session))
self.__session = ""
if not is_debian_based() and self.__session == "":
self.__session = self.get_session_list()[0]
try:
# Start session
if not self.greeter.start_session_sync(self.__session):
Expand Down
7 changes: 0 additions & 7 deletions src/module/sessionlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def load_sessionlist():
_sessionlist_loaded = True
box = loginwindow.o("ui_box_session")
sessions = lightdm.get_session_list()
if is_debian_based():
sessions = ["default"] + sessions
for session in sessions:
session_buttons[session] = sessionButton(session)

Expand All @@ -66,11 +64,6 @@ def button_event(widget):
session_buttons[session].connect("clicked", button_event)
box.add(session_buttons[session])
box.show_all()
if is_debian_based():
session_buttons["default"].session = ""
session_buttons["default"].session_name = _("Default")
session_buttons["default"].session_name = _("Default")
session_buttons["default"].label.set_text(" "+_("Default"))
last_session = gsettings_get("last-session")
if last_session == "" or last_session not in sessions:
last_session = sessions[0]
Expand Down

0 comments on commit b41ccb5

Please sign in to comment.