Skip to content

Commit

Permalink
should fix part of Antergos#317 and all of Antergos#318
Browse files Browse the repository at this point in the history
  • Loading branch information
lots0logs committed Apr 29, 2015
1 parent dbbe3dd commit 1ae5471
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[2015-04-29 02:45:27 -0500] working on #317 and #318 Dustin Falgout {dbbe3dd}
[2015-04-29 00:41:33 -0500] fix typo in postinstall, other small changes related to screen lock.. Dustin Falgout {5e59c8e}
[2015-04-29 07:03:22 +0200] Tries to address issue #317 karasu {5382fa2}
[2015-04-27 11:01:43 +0200] Cleaned advanced code. NEEDS TESTING karasu {3ae177b}
Expand Down
2 changes: 1 addition & 1 deletion cnchi/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

""" Set some Cnchi global constants """

CNCHI_VERSION = "0.8.80"
CNCHI_VERSION = "0.8.81"
CNCHI_WEBSITE = "http://www.antergos.com"

if __name__ == '__main__':
Expand Down
10 changes: 9 additions & 1 deletion cnchi/installation/advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def __init__(self, params, prev_page="installation_ask", next_page="user_info"):
self.lv_partitions = []
self.disks_changed = []

self.check_ok_once = False

# Store here all LUKS options for each partition (if any)
# stores tuple (use_luks, vol_name, password)
# uses partition uid as index
Expand Down Expand Up @@ -1727,8 +1729,14 @@ def check_mount_points(self):

self.forward_button.set_sensitive(check_ok)
if check_ok:
self.forward_button.set_name('fwd_btn_install_now')
txt = _("Install now!")
self.forward_button.set_label(txt)
self.forward_button.set_label(txt)
self.check_ok_once = True
elif self.check_ok_once:
self.forward_button.set_name('fwd_btn')
self.forward_button.set_label('')
self.check_ok_once = False

def get_changes(self):
""" Grab all changes for confirmation """
Expand Down
22 changes: 13 additions & 9 deletions cnchi/user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ def translate_ui(self):
txt = _("Your computer's name:")
label.set_markup(txt)

label = self.ui.get_object('hostname')
txt = _("Hostname")
label.set_placeholder_text(txt)

label = self.ui.get_object('username_label')
txt = _("Pick a username:")
label.set_markup(txt)
Expand Down Expand Up @@ -202,6 +206,8 @@ def prepare(self, direction):
else:
self.login['auto'].set_sensitive(False)
# if not self.settings.get('z_hidden'):
self.forward_button.set_label('')
self.forward_button.set_name('fwd_btn')
self.forward_button.set_sensitive(False)

def on_checkbutton_show_password_toggled(self, widget):
Expand Down Expand Up @@ -269,15 +275,15 @@ def info_loop(self, widget):
self.image_is_ok['fullname'].set_from_icon_name(ICON_WARNING, Gtk.IconSize.LARGE_TOOLBAR)
self.image_is_ok['fullname'].show()

if widget == self.entry['hostname']:
elif widget == self.entry['hostname']:
hostname = self.entry['hostname'].get_text()
self.validate('hostname', hostname)

if widget == self.entry['username']:
elif widget == self.entry['username']:
username = self.entry['username'].get_text()
self.validate('username', username)

if widget == self.entry['password'] or widget == self.entry['verified_password']:
elif widget == self.entry['password'] or widget == self.entry['verified_password']:
validation.check_password(
self.entry['password'],
self.entry['verified_password'],
Expand All @@ -287,16 +293,14 @@ def info_loop(self, widget):

# Check if all fields are filled and ok
all_ok = True
# FIXME: Whith latest changes (set_from_stock to set_from_icon_name) this does not work
'''
ok_widgets = self.image_is_ok.values()
if not self.settings.get('z_hidden'):
for ok_widget in ok_widgets:
(icon_name, icon_size) = ok_widget.get_icon_name()
visible = ok_widget.get_visible()
if visible == False or icon_name != ICON_OK:
icon_name = ok_widget.get_property('icon-name')
visible = ok_widget.is_visible()
if not visible or icon_name != ICON_OK:
all_ok = False
'''

self.forward_button.set_sensitive(all_ok)

# When testing, no _() is available
Expand Down
14 changes: 14 additions & 0 deletions data/css/gtk-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ GtkProgressBar.progressbar {
font-size: 11px;
}

#fwd_btn_install_now {
background-color: #2EA3F2;
color: #ffffff;
}
#fwd_btn_install_now .label {
font-size: 10px;
font-weight: 500;
}
#fwd_btn_install_now:active {
color: #333A4C;
box-shadow: inset 0px -3px 1px rgba(255, 255, 255, 0.4), inset 0 0px 3px rgba(95, 95, 95, 0.80);
}


.header-bar .close_button {
padding-left: 5px;
padding-right: 0px;
Expand Down

0 comments on commit 1ae5471

Please sign in to comment.