Skip to content

Commit

Permalink
fixed AttributeError, improved spacing on Welcome Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Batcastle committed Apr 1, 2023
1 parent b5d27a4 commit c267aa3
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 42 deletions.
2 changes: 1 addition & 1 deletion DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: drauger-welcome
Version: 4.9.7
Version: 4.9.8
Maintainer: Thomas Castleman <contact@draugeros.org>
Section: misc
Homepage: https://github.com/drauger-os-development/drauger-welcome
Expand Down
2 changes: 1 addition & 1 deletion usr/bin/drauger-welcome
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from __future__ import print_function
import sys
import drauger_welcome
VERSION = "4.9.7"
VERSION = "4.9.8"
HELP = """
drauger-welcome, Version %s
\t-h, --help print this help dialoge.
Expand Down
68 changes: 30 additions & 38 deletions usr/lib/python3/dist-packages/drauger_welcome/main_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,128 +250,120 @@ def reset(self, button):
Drauger OS %s
""" % (s) + "</b>")
self.label.set_justify(Gtk.Justification.CENTER)
self.label = self._set_default_margins(self.label)
self.grid.attach(self.label, 1, 1, 8, 1)

self.label = Gtk.Label()
self.label.set_markup(welcome_label)
self.label.set_justify(Gtk.Justification.CENTER)
self.label = self._set_default_margins(self.label)
self.grid.attach(self.label, 1, 2, 8, 1)

self.label1 = Gtk.Label()
self.label1.set_markup(website)
self.label1.set_justify(Gtk.Justification.CENTER)
self.label1 = self._set_default_margins(self.label1)
self.grid.attach(self.label1, 1, 3, 1, 1)

self.button1 = Gtk.Button.new_from_icon_name("cs-network", 3)
self.button1.connect("clicked", self.onwebclicked)
self.button1 = self._set_default_margins(self.button1)
self.grid.attach(self.button1, 1, 4, 1, 1)

self.label2 = Gtk.Label()
self.label2.set_markup(README)
self.label2.set_justify(Gtk.Justification.CENTER)
self.label2 = self._set_default_margins(self.label2)
self.grid.attach(self.label2, 6, 3, 1, 1)

self.button2 = Gtk.Button.new_from_icon_name("document", 3)
self.button2.connect("clicked", self.show_readme)
self.button2 = self._set_default_margins(self.button2)
self.grid.attach(self.button2, 6, 4, 1, 1)

self.label3 = Gtk.Label()
self.label3.set_markup(tutorial_label)
self.label3.set_justify(Gtk.Justification.CENTER)
self.label3 = self._set_default_margins(self.label3)
self.grid.attach(self.label3, 1, 5, 1, 1)

self.button3 = Gtk.Button.new_from_icon_name("dictionary", 3)
self.button3.connect("clicked", self.tutorial)
self.button3 = self._set_default_margins(self.button3)
self.grid.attach(self.button3, 1, 6, 1, 1)

self.label4 = Gtk.Label()
self.label4.set_markup(help_button)
self.label4.set_justify(Gtk.Justification.CENTER)
self.label4 = self._set_default_margins(self.label4)
self.grid.attach(self.label4, 1, 7, 1, 1)

self.button4 = Gtk.Button.new_from_icon_name("help", 3)
self.button4.connect("clicked", self.onhelpclicked)
self.button4 = self._set_default_margins(self.button4)
self.grid.attach(self.button4, 1, 8, 1, 1)

self.label5 = Gtk.Label()
self.label5.set_markup(drivers)
self.label5.set_justify(Gtk.Justification.CENTER)
self.label5 = self._set_default_margins(self.label5)
self.grid.attach(self.label5, 6, 7, 1, 1)

self.button5 = Gtk.Button.new_from_icon_name("jockey", 3)
self.button5.connect("clicked", self.ondriveclicked)
self.button5 = self._set_default_margins(self.button5)
self.grid.attach(self.button5, 6, 8, 1, 1)

self.label6 = Gtk.Label()
self.label6.set_markup(lang_sup)
self.label6.set_justify(Gtk.Justification.CENTER)
self.label6 = self._set_default_margins(self.label6)
self.grid.attach(self.label6, 4, 5, 1, 1)

self.button6 = Gtk.Button.new_from_icon_name("accessibility", 3)
self.button6.connect("clicked", self.show_accessibility_settings)
self.button6 = self._set_default_margins(self.button6)
self.grid.attach(self.button6, 4, 6, 1, 1)

self.label7 = Gtk.Label()
self.label7.set_markup(donate)
self.label.set_justify(Gtk.Justification.CENTER)
self.label7.set_justify(Gtk.Justification.CENTER)
self.label7 = self._set_default_margins(self.label7)
self.grid.attach(self.label7, 4, 7, 1, 1)

self.button7 = Gtk.Button.new_from_icon_name("money-manager-ex", 3)
self.button7.connect("clicked", self.ondonateclicked)
self.button7 = self._set_default_margins(self.button7)
self.grid.attach(self.button7, 4, 8, 1, 1)

self.label8 = Gtk.Label()
self.label8.set_markup(shortcuts)
self.label8.set_justify(Gtk.Justification.CENTER)
self.label8 = self._set_default_margins(self.label8)
self.grid.attach(self.label8, 6, 5, 1, 1)

self.button8 = Gtk.Button.new_from_icon_name("keyboard", 3)
self.button8.connect("clicked", self.onshortcutclicked)
self.button8 = self._set_default_margins(self.button8)
self.grid.attach(self.button8, 6, 6, 1, 1)

self.label10 = Gtk.Label()
self.label10.set_markup(lang_sup2)
self.label10.set_justify(Gtk.Justification.CENTER)
self.grid.attach(self.label10, 4, 3, 1, 1)
self.label9 = Gtk.Label()
self.label9.set_markup(lang_sup2)
self.label9.set_justify(Gtk.Justification.CENTER)
self.label9 = self._set_default_margins(self.label9)
self.grid.attach(self.label9, 4, 3, 1, 1)

self.button10 = Gtk.Button.new_from_icon_name("preferences-desktop-locale", 3)
self.button10.connect("clicked", self.onlangsupportclicked)
self.grid.attach(self.button10, 4, 4, 1, 1)
self.button9 = Gtk.Button.new_from_icon_name("preferences-desktop-locale", 3)
self.button9.connect("clicked", self.onlangsupportclicked)
self.button9 = self._set_default_margins(self.button9)
self.grid.attach(self.button9, 4, 4, 1, 1)

self.start_up = Gtk.CheckButton.new_with_label(start_up_label)
self.start_up.set_active(show_at_start_up)
self.start_up.connect("toggled", self.start_up_toggle)
self.start_up= self._set_default_margins(self.start_up)
self.grid.attach(self.start_up, 1, 13, 2, 1)

width = self.get_size()[0]
width = int(width * 0.125)
self.button10.set_margin_start(width)
self.button10.set_margin_end(width)
self.button6.set_margin_start(width)
self.button6.set_margin_end(width)
self.button4.set_margin_start(width)
self.button2.set_margin_end(width)
self.button3.set_margin_start(width)
self.button1.set_margin_start(width)
self.button8.set_margin_end(width)
self.button7.set_margin_end(width)
self.button7.set_margin_start(width)
self.button5.set_margin_end(width)
self.label2.set_margin_end(width)
self.label8.set_margin_end(width)
self.label5.set_margin_end(width)
self.label7.set_margin_end(width)
self.label7.set_margin_start(width)
self.label4.set_margin_start(width)
self.label10.set_margin_start(width)
self.label9.set_margin_start(width)
self.label10.set_margin_end(width)
self.label6.set_margin_end(width)
self.label6.set_margin_start(width)
self.label1.set_margin_start(width)
self.start_up.set_margin_start(int(width / 2))
self.start_up.set_margin_bottom(int(width / 2))

self.show_all()

def show_readme(self, widget):
Expand Down Expand Up @@ -1081,7 +1073,7 @@ def onshortcutclicked(self, button):
self.button1.set_margin_bottom(int(width / 10))

self.show_all()

def onyesclicked(self, button):
self.onuninstallclicked("clicked")

Expand Down
4 changes: 2 additions & 2 deletions usr/share/applications/Drauger_Welcome.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Drauger Welcome
Version=4.6
Exec=/usr/share/drauger-welcome/main_ui.py
Version=4.9.8
Exec=/usr/bin/drauger-welcome
Comment=Welcome Screen for Drauger OS
Icon=/usr/share/icons/Drauger/scalable/menus/drauger_os-logo.svg
Type=Application
Expand Down

0 comments on commit c267aa3

Please sign in to comment.