Changeset 5451
- Timestamp:
- Jul 5, 2017, 10:27:17 AM (4 years ago)
- Location:
- lliurex-shutdowner/trunk/fuentes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-shutdowner/trunk/fuentes/lliurex-shutdowner-common.install/usr/sbin/shutdown-lliurex-dialog
r5448 r5451 21 21 22 22 self.msg=_("System will shutdown in %s seconds. Please, save your files.") 23 23 24 self.countdown=wait_time*60 24 25 self.current_counter=0 26 25 27 self.start_gui() 28 26 29 27 30 #def init … … 31 34 builder=Gtk.Builder() 32 35 builder.set_translation_domain('lliurex-shutdowner-common') 33 builder.add_from_file("/usr/share/lliurex-shutdowner/rsrc /shutdowner-lliurex-dialog.ui")36 builder.add_from_file("/usr/share/lliurex-shutdowner/rsrcs/shutdowner-lliurex-dialog.ui") 34 37 self.main_window=builder.get_object("shutdown_window") 35 38 … … 57 60 self.msg_label.set_text(self.msg%self.countdown) 58 61 62 # The way this is beeing executed, shutdown -h now is missing authentication to work 63 self.shutdown_button.hide() 64 59 65 self.main_window.show() 60 66 … … 80 86 def shutdown_clicked(self,button): 81 87 82 command="shutdown - h now"88 command="shutdown -c; shutdown -h now" 83 89 os.system(command) 84 90 Gtk.main_quit() -
lliurex-shutdowner/trunk/fuentes/lliurex-shutdowner.install/usr/share/lliurex-shutdowner/LliurexShutdowner.py
r5420 r5451 99 99 self.main_window.connect("delete_event",self.check_changes) 100 100 self.login_button.connect("clicked",self.login_clicked) 101 self.user_entry.connect("activate",self.entries_press_event) 102 self.password_entry.connect("activate",self.entries_press_event) 103 self.server_ip_entry.connect("activate",self.entries_press_event) 101 104 102 105 self.cron_switch.connect("notify::active",self.cron_switch_changed) … … 108 111 109 112 # SIGNALS ######################################################## 113 114 def entries_press_event(self,widget): 115 116 self.login_clicked(None) 117 118 #def entries_press_event 119 110 120 111 121 def cron_switch_changed(self,widget,data): … … 163 173 self.login_msg_label.set_text(_("Validating user...")) 164 174 165 widget.set_sensitive(False)175 self.login_button.set_sensitive(False) 166 176 self.validate_user(user,password) 167 177
Note: See TracChangeset
for help on using the changeset viewer.