コード例 #1
0
 def click_plugin(self, widget):
     ref_indx = self.menu_items.index(widget)
     state = get_state(self.menu_refs[ref_indx].__class__.__name__)
     if state:
         self.menu_refs[ref_indx].set_active_in_settings(False)
     elif not state:
         if isinstance(self.menu_refs[ref_indx], MailSubMenu):
             windows.open_set_credentials()
         self.menu_refs[ref_indx].set_active_in_settings(True)
     else:
         print("State:", state)
         raise RuntimeError
コード例 #2
0
 def on_set_credentials_clicked(widget):
     windows.open_set_credentials()