Ignore:
Timestamp:
Oct 24, 2016, 11:40:40 AM (3 years ago)
Author:
hectorgh
Message:

wip

Location:
lliurex-session-manager/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lliurex-session-manager/trunk/fuentes/install-files/usr/bin/lliurex-session-manager

    r2570 r2666  
    3535                self.max_seconds=15.0
    3636                self.current_second=0
    37                 self.progress_txt=_("%s will %s in %s seconds...")
     37                self.progress_txt=("%s will %s in %s seconds...")
    3838                self.can_suspend=True
    3939                self.can_hibernate=True
     
    249249                self.current_action_label.set_text(_("Log out now"))
    250250                self.execute_now_button.connect("clicked",self.execute_now,self.logout)
    251                 GLib.timeout_add(10,self.wait_to_execute,_("The session"),_("close"),self.logout)
     251                GLib.timeout_add(10,self.wait_to_execute,_("Session will close in %s seconds..."),self.logout)
    252252                self.cancel_button.set_visible(False)
    253253                self.back_button.set_visible(True)
     
    270270                self.current_action_label.set_text(_("Suspend now"))
    271271                self.execute_now_button.connect("clicked",self.execute_now,self.suspend)
    272                 GLib.timeout_add(10,self.wait_to_execute,_("The system"),_("suspend"),self.suspend)
     272                GLib.timeout_add(10,self.wait_to_execute,_("System will suspend in %s seconds..."),self.suspend)
    273273                self.cancel_button.set_visible(False)
    274274                self.back_button.set_visible(True)
     
    282282                self.current_action_label.set_text(_("Hibernate now"))
    283283                self.execute_now_button.connect("clicked",self.execute_now,self.hibernate)
    284                 GLib.timeout_add(10,self.wait_to_execute,_("The system"),_("hibernate"),self.hibernate)
     284                GLib.timeout_add(10,self.wait_to_execute,_("System will hibernate in %s seconds..."),self.hibernate)
    285285                self.cancel_button.set_visible(False)
    286286                self.back_button.set_visible(True)
     
    295295                self.current_action_label.set_text(_("Reboot now"))
    296296                self.execute_now_button.connect("clicked",self.execute_now,self.reboot)
    297                 GLib.timeout_add(10,self.wait_to_execute,_("The system"),_("reboot"),self.reboot)
     297                GLib.timeout_add(10,self.wait_to_execute,_("System will reboot in %s seconds..."),self.reboot)
    298298                self.cancel_button.set_visible(False)
    299299                self.back_button.set_visible(True)
     
    307307                self.current_action_label.set_text(_("Shutdown now"))
    308308                self.execute_now_button.connect("clicked",self.execute_now,self.shutdown)
    309                 GLib.timeout_add(10,self.wait_to_execute,_("The system"),_("shutdown"),self.shutdown)
     309                GLib.timeout_add(10,self.wait_to_execute,_("System will shutdown in %s seconds..."),self.shutdown)
    310310                self.cancel_button.set_visible(False)
    311311                self.back_button.set_visible(True)
     
    313313        #def shutdown_clicked
    314314       
    315         def wait_to_execute(self,what,how,callback):
     315        def wait_to_execute(self,txt,callback):
    316316               
    317317                if self.stack.get_visible_child_name()=="options":
     
    319319               
    320320                csecond=int(self.max_seconds+1-self.current_second)
    321                 self.progressbar.set_text(self.progress_txt%(what,how,csecond))
     321                self.progressbar.set_text(txt%(csecond))
    322322                self.progressbar.set_fraction(self.current_second/self.max_seconds)
    323323                self.current_second+=0.01
     
    325325                if self.current_second>=self.max_seconds:
    326326                        print "Executing callback..."
    327                         self.progressbar.set_text(self.progress_txt%(what,how,0))
     327                        self.progressbar.set_text(txt%(0))
    328328                        callback()
    329329                        self.exit(None)
  • lliurex-session-manager/trunk/fuentes/lliurex-po/lliurex-session-manager/lliurex-session-manager.pot

    r2548 r2666  
    99"Project-Id-Version: PACKAGE VERSION\n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2016-10-04 09:04+0200\n"
     11"POT-Creation-Date: 2016-10-24 11:39+0200\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    5858msgstr ""
    5959
    60 #: /tmp/lliurex-session-manager.py:36
     60#: /tmp/lliurex-session-manager.py:37
    6161#, python-format
    6262msgid "%s will %s in %s seconds..."
    6363msgstr ""
    6464
    65 #: /tmp/lliurex-session-manager.py:241
     65#: /tmp/lliurex-session-manager.py:249
    6666msgid "Log out now"
    6767msgstr ""
    6868
    69 #: /tmp/lliurex-session-manager.py:243
    70 msgid "The session"
     69#: /tmp/lliurex-session-manager.py:251
     70#, python-format
     71msgid "Session will close in %s seconds..."
    7172msgstr ""
    7273
    73 #: /tmp/lliurex-session-manager.py:243
    74 msgid "close"
    75 msgstr ""
    76 
    77 #: /tmp/lliurex-session-manager.py:262
     74#: /tmp/lliurex-session-manager.py:270
    7875msgid "Suspend now"
    7976msgstr ""
    8077
    81 #: /tmp/lliurex-session-manager.py:264 /tmp/lliurex-session-manager.py:276
    82 #: /tmp/lliurex-session-manager.py:289 /tmp/lliurex-session-manager.py:301
    83 msgid "The system"
     78#: /tmp/lliurex-session-manager.py:272
     79#, python-format
     80msgid "System will suspend in %s seconds..."
    8481msgstr ""
    8582
    86 #: /tmp/lliurex-session-manager.py:264
    87 msgid "suspend"
    88 msgstr ""
    89 
    90 #: /tmp/lliurex-session-manager.py:274
     83#: /tmp/lliurex-session-manager.py:282
    9184msgid "Hibernate now"
    9285msgstr ""
    9386
    94 #: /tmp/lliurex-session-manager.py:276
    95 msgid "hibernate"
     87#: /tmp/lliurex-session-manager.py:284
     88#, python-format
     89msgid "System will hibernate in %s seconds..."
    9690msgstr ""
    9791
    98 #: /tmp/lliurex-session-manager.py:287
     92#: /tmp/lliurex-session-manager.py:295
    9993msgid "Reboot now"
    10094msgstr ""
    10195
    102 #: /tmp/lliurex-session-manager.py:289
    103 msgid "reboot"
     96#: /tmp/lliurex-session-manager.py:297
     97#, python-format
     98msgid "System will reboot in %s seconds..."
    10499msgstr ""
    105100
    106 #: /tmp/lliurex-session-manager.py:299
     101#: /tmp/lliurex-session-manager.py:307
    107102msgid "Shutdown now"
    108103msgstr ""
    109104
    110 #: /tmp/lliurex-session-manager.py:301
    111 msgid "shutdown"
     105#: /tmp/lliurex-session-manager.py:309
     106#, python-format
     107msgid "System will shutdown in %s seconds..."
    112108msgstr ""
Note: See TracChangeset for help on using the changeset viewer.