Changeset 5451


Ignore:
Timestamp:
Jul 5, 2017, 10:27:17 AM (23 months ago)
Author:
hectorgh
Message:

wip

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  
    2121               
    2222                self.msg=_("System will shutdown in %s seconds. Please, save your files.")
     23               
    2324                self.countdown=wait_time*60
    2425                self.current_counter=0
     26               
    2527                self.start_gui()
     28               
    2629               
    2730        #def init
     
    3134                builder=Gtk.Builder()
    3235                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")
    3437                self.main_window=builder.get_object("shutdown_window")
    3538               
     
    5760                self.msg_label.set_text(self.msg%self.countdown)
    5861               
     62                # The way this is beeing executed, shutdown -h now is missing authentication to work
     63                self.shutdown_button.hide()
     64               
    5965                self.main_window.show()
    6066               
     
    8086        def shutdown_clicked(self,button):
    8187               
    82                 command="shutdown -h now"
     88                command="shutdown -c; shutdown -h now"
    8389                os.system(command)
    8490                Gtk.main_quit()
  • lliurex-shutdowner/trunk/fuentes/lliurex-shutdowner.install/usr/share/lliurex-shutdowner/LliurexShutdowner.py

    r5420 r5451  
    9999                self.main_window.connect("delete_event",self.check_changes)
    100100                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)
    101104               
    102105                self.cron_switch.connect("notify::active",self.cron_switch_changed)
     
    108111       
    109112        # SIGNALS ########################################################
     113       
     114        def entries_press_event(self,widget):
     115               
     116                self.login_clicked(None)
     117               
     118        #def entries_press_event
     119       
    110120       
    111121        def cron_switch_changed(self,widget,data):
     
    163173                self.login_msg_label.set_text(_("Validating user..."))
    164174               
    165                 widget.set_sensitive(False)
     175                self.login_button.set_sensitive(False)
    166176                self.validate_user(user,password)
    167177               
Note: See TracChangeset for help on using the changeset viewer.