Exemple #1
0
 def init(self):
     #language label
     GuiComponent.createLabel(self._('Language'),[0,1,0,1],self, aligment='right')
     #init language comboBox
     self.createLanguageListStore()
     self.languageComboBox = Gtk.ComboBox.new_with_model(self.languageListStore)
     defaultPosition = self.setting['language'].getLanguageList().index(self.setting['userSetting'].language['name'])
     GuiComponent.createComboBox(self.languageComboBox, [1,3,0,1],self , defaultPosition)
     #Automatic check update
     GuiComponent.createLabel(self._('Automatic update'),[0,1,1,2],self, aligment='right')
     GuiComponent.createSwitchButton([2,3,1,2], self, self.automaticCheckUpdate, self.setting['userSetting'].version['autoCheck'])
     #save
     GuiComponent.createButton(self._('Save'),[2,3,9,10], self, self.saveSetting)
Exemple #2
0
 def init(self):
     self.store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING, GObject.TYPE_STRING)
     self.setting['userSetting'].getApStore(self.store)
     self.treeview = Gtk.TreeView(model=self.store)
     GuiComponent.createTextViewColumn(self.treeview, [self._('AP name'),self._('Interface1'),self._('Interface2')])
     scrolled_window = Gtk.ScrolledWindow()
     scrolled_window.set_policy(
         Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
     scrolled_window.add(self.treeview)
     #delete AP buton
     GuiComponent.createButton(self._('Delete'),[1,2,9,10], self, self.deleteAP)
     #create AP button
     GuiComponent.createButton(self._('Create'),[2,3,9,10], self, self.createAP)
     self.attach(scrolled_window, 0, 3, 0, 9)
Exemple #3
0
 def init(self):
     self.store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING,
                                GObject.TYPE_STRING)
     self.setting['userSetting'].getApStore(self.store)
     self.treeview = Gtk.TreeView(model=self.store)
     GuiComponent.createTextViewColumn(
         self.treeview,
         [self._('AP name'),
          self._('Interface1'),
          self._('Interface2')])
     scrolled_window = Gtk.ScrolledWindow()
     scrolled_window.set_policy(Gtk.PolicyType.NEVER,
                                Gtk.PolicyType.AUTOMATIC)
     scrolled_window.add(self.treeview)
     #delete AP buton
     GuiComponent.createButton(self._('Delete'), [1, 2, 9, 10], self,
                               self.deleteAP)
     #create AP button
     GuiComponent.createButton(self._('Create'), [2, 3, 9, 10], self,
                               self.createAP)
     self.attach(scrolled_window, 0, 3, 0, 9)
Exemple #4
0
 def init(self):
     self.refreshingInterface = False
     self.interfaceListSignal = GObject.GObject()
     self.interfaceListSignal.connect('interfaceListMsg', self.readInterfaceList)
     self.initInterfaceList()
     #create New Form
     #acces point name
     GuiComponent.createLabel(self._('AP name'),[0,1,0,1], self, aligment='right')
     #access point name set text
     self.apName = Gtk.Entry()
     GuiComponent.createEntry(self.apName, [1,3,0,1],self, "")
     #acces point password
     GuiComponent.createLabel(self._('Password'),[0,1,1,2],self, aligment='right')
     #access point password set text
     self.apPassword = Gtk.Entry()
     GuiComponent.createEntry(self.apPassword, [1,3,1,2],self,"",False)
     #Show password
     self.showPassword = Gtk.CheckButton(self._("Show password"),self)
     GuiComponent.createCheckButton(self.showPassword, [1,3,2,3],self , self.showHidePasswd, True)
     #wifi interface label
     GuiComponent.createLabel(self._('Wifi interface'),[0,1,3,4],self, aligment='right')
     #wifi interface Combobox
     self.interface1ComboBox = Gtk.ComboBox.new_with_model(self.interfaceListStore)
     GuiComponent.createComboBox(self.interface1ComboBox, [1,3,3,4],self , None)
     #interface with internet Label
     GuiComponent.createLabel(self._('Interface with Internet'),[0,1,4,5],self, aligment='right')
     #interface with internet Combobox
     self.interface2ComboBox = Gtk.ComboBox.new_with_model(self.interfaceListStore)
     GuiComponent.createComboBox( self.interface2ComboBox, [1,3,4,5], self, None)
     #refresh interface list button
     GuiComponent.createButton(self._('Refresh'),[2,3,5,6], self, self.refreshInterfaceList)
     #Save and Create AP
     GuiComponent.createButton(self._("Only Create"), [1,2,9,10], self, self.onlyCreateAction)
     GuiComponent.createButton(self._("Save and Create"), [2,3,9,10], self, self.saveCreateAction)
Exemple #5
0
 def init(self):
     self.refreshingInterface = False
     self.interfaceListSignal = GObject.GObject()
     self.interfaceListSignal.connect('interfaceListMsg',
                                      self.readInterfaceList)
     self.initInterfaceList()
     #create New Form
     #acces point name
     GuiComponent.createLabel(self._('AP name'), [0, 1, 0, 1],
                              self,
                              aligment='right')
     #access point name set text
     self.apName = Gtk.Entry()
     GuiComponent.createEntry(self.apName, [1, 3, 0, 1], self, "")
     #acces point password
     GuiComponent.createLabel(self._('Password'), [0, 1, 1, 2],
                              self,
                              aligment='right')
     #access point password set text
     self.apPassword = Gtk.Entry()
     GuiComponent.createEntry(self.apPassword, [1, 3, 1, 2], self, "",
                              False)
     #Show password
     self.showPassword = Gtk.CheckButton(self._("Show password"), self)
     GuiComponent.createCheckButton(self.showPassword, [1, 3, 2, 3], self,
                                    self.showHidePasswd, True)
     #wifi interface label
     GuiComponent.createLabel(self._('Wifi interface'), [0, 1, 3, 4],
                              self,
                              aligment='right')
     #wifi interface Combobox
     self.interface1ComboBox = Gtk.ComboBox.new_with_model(
         self.interfaceListStore)
     GuiComponent.createComboBox(self.interface1ComboBox, [1, 3, 3, 4],
                                 self, None)
     #interface with internet Label
     GuiComponent.createLabel(self._('Interface with Internet'),
                              [0, 1, 4, 5],
                              self,
                              aligment='right')
     #interface with internet Combobox
     self.interface2ComboBox = Gtk.ComboBox.new_with_model(
         self.interfaceListStore)
     GuiComponent.createComboBox(self.interface2ComboBox, [1, 3, 4, 5],
                                 self, None)
     #refresh interface list button
     GuiComponent.createButton(self._('Refresh'), [2, 3, 5, 6], self,
                               self.refreshInterfaceList)
     #Save and Create AP
     GuiComponent.createButton(self._("Only Create"), [1, 2, 9, 10], self,
                               self.onlyCreateAction)
     GuiComponent.createButton(self._("Save and Create"), [2, 3, 9, 10],
                               self, self.saveCreateAction)
Exemple #6
0
 def init(self):
     #status label
     self.statusTitleLabel = Gtk.Label(self.setting['runningAp'].status['text'])
     pangoFont = Pango.FontDescription("Sans 40")
     self.statusTitleLabel.modify_font(pangoFont)
     self.attach(self.statusTitleLabel, 0,3,0,3)
     #information about conection
     #Name
     GuiComponent.createLabel(self._('AP name'),[0,1,3,4], self, aligment='right')
     self.statusNameAp = Gtk.Label()
     GuiComponent.createLabel('None', [1,3,3,4], self, self.statusNameAp, aligment='left')
     #wifi interface 1
     GuiComponent.createLabel(self._('Wifi interface'),[0,1,4,5], self, aligment='right')
     self.statusInterface1 = Gtk.Label()
     GuiComponent.createLabel('None', [1,3,4,5], self, self.statusInterface1, aligment='left')
     #wifi interface 2
     GuiComponent.createLabel(self._('Interface with Internet'),[0,1,5,6], self, aligment='right')
     self.statusInterface2 = Gtk.Label()
     GuiComponent.createLabel('None', [1,3,5,6], self, self.statusInterface2, aligment='left')
     #Receiving
     GuiComponent.createLabel(self._('Receiving'),[0,1,6,7], self, aligment='right')
     self.statusReciving = Gtk.Label()
     GuiComponent.createLabel(self._('None'), [1,2,6,7], self, self.statusReciving, aligment='left')
     #Total Received
     GuiComponent.createLabel(self._('Total Received'),[0,1,7,8],self, aligment='right')
     self.statusTotalReciving = Gtk.Label()
     GuiComponent.createLabel(self._('None'), [1,2,7,8],self, self.statusTotalReciving, aligment='left')
     #Sending
     GuiComponent.createLabel(self._('Sending'),[1,2,6,7],self, aligment='right')
     self.statusSending = Gtk.Label()
     GuiComponent.createLabel(self._('None'), [2,3,6,7],self, self.statusSending, aligment='left')
     #Total Sent
     GuiComponent.createLabel(self._('Total Sent'),[1,2,7,8],self, aligment='right')
     self.statusTotalSending = Gtk.Label()
     GuiComponent.createLabel(self._('None'), [2,3,7,8], self, self.statusTotalSending, aligment='left')
     #connect / disconect button
     self.errorButton = Gtk.Button()
     GuiComponent.createButton(self._('Error details'),[2,3,9,10],self,self.errorButtonAction,self.errorButton)
     #connect / disconect button
     self.connectButton = Gtk.Button()
     GuiComponent.createButton(self._('Connect'),[2,3,9,10],self,self.connectButtonAction,self.connectButton)
     #connect / disconect button
     self.disconnectButton = Gtk.Button()
     GuiComponent.createButton(self._('Disconnect'),[2,3,9,10],self,self.disconnectButtonAction,self.disconnectButton)
Exemple #7
0
 def init(self):
     #status label
     self.statusTitleLabel = Gtk.Label(
         self.setting['runningAp'].status['text'])
     pangoFont = Pango.FontDescription("Sans 40")
     self.statusTitleLabel.modify_font(pangoFont)
     self.attach(self.statusTitleLabel, 0, 3, 0, 3)
     #information about conection
     #Name
     GuiComponent.createLabel(self._('AP name'), [0, 1, 3, 4],
                              self,
                              aligment='right')
     self.statusNameAp = Gtk.Label()
     GuiComponent.createLabel('None', [1, 3, 3, 4],
                              self,
                              self.statusNameAp,
                              aligment='left')
     #wifi interface 1
     GuiComponent.createLabel(self._('Wifi interface'), [0, 1, 4, 5],
                              self,
                              aligment='right')
     self.statusInterface1 = Gtk.Label()
     GuiComponent.createLabel('None', [1, 3, 4, 5],
                              self,
                              self.statusInterface1,
                              aligment='left')
     #wifi interface 2
     GuiComponent.createLabel(self._('Interface with Internet'),
                              [0, 1, 5, 6],
                              self,
                              aligment='right')
     self.statusInterface2 = Gtk.Label()
     GuiComponent.createLabel('None', [1, 3, 5, 6],
                              self,
                              self.statusInterface2,
                              aligment='left')
     #Receiving
     GuiComponent.createLabel(self._('Receiving'), [0, 1, 6, 7],
                              self,
                              aligment='right')
     self.statusReciving = Gtk.Label()
     GuiComponent.createLabel(self._('None'), [1, 2, 6, 7],
                              self,
                              self.statusReciving,
                              aligment='left')
     #Total Received
     GuiComponent.createLabel(self._('Total Received'), [0, 1, 7, 8],
                              self,
                              aligment='right')
     self.statusTotalReciving = Gtk.Label()
     GuiComponent.createLabel(self._('None'), [1, 2, 7, 8],
                              self,
                              self.statusTotalReciving,
                              aligment='left')
     #Sending
     GuiComponent.createLabel(self._('Sending'), [1, 2, 6, 7],
                              self,
                              aligment='right')
     self.statusSending = Gtk.Label()
     GuiComponent.createLabel(self._('None'), [2, 3, 6, 7],
                              self,
                              self.statusSending,
                              aligment='left')
     #Total Sent
     GuiComponent.createLabel(self._('Total Sent'), [1, 2, 7, 8],
                              self,
                              aligment='right')
     self.statusTotalSending = Gtk.Label()
     GuiComponent.createLabel(self._('None'), [2, 3, 7, 8],
                              self,
                              self.statusTotalSending,
                              aligment='left')
     #connect / disconect button
     self.errorButton = Gtk.Button()
     GuiComponent.createButton(self._('Error details'), [2, 3, 9, 10], self,
                               self.errorButtonAction, self.errorButton)
     #connect / disconect button
     self.connectButton = Gtk.Button()
     GuiComponent.createButton(self._('Connect'), [2, 3, 9, 10], self,
                               self.connectButtonAction, self.connectButton)
     #connect / disconect button
     self.disconnectButton = Gtk.Button()
     GuiComponent.createButton(self._('Disconnect'), [2, 3, 9, 10], self,
                               self.disconnectButtonAction,
                               self.disconnectButton)