Beispiel #1
0
 def on_statusToggleSwitch_notify(self, widget, user_data=None):
     if not user_data.name == 'active':
         return
     if not self.done_setting_up:
         return
     if widget.get_active() and not Apache.is_running():
         self.status.set(_("Starting Apache..."), Status.Types.TOGGLE);
         Apache.start()
         self.status.clear(Status.Types.TOGGLE)
     else:
         self.status.set(_("Stopping Apache..."), Status.Types.TOGGLE);
         Apache.stop()
         self.status.clear(Status.Types.TOGGLE)