Changeset 8011


Ignore:
Timestamp:
Sep 5, 2018, 10:29:08 AM (12 months ago)
Author:
Juanma
Message:

reworked gui

File:
1 edited

Legend:

Unmodified
Added
Removed
  • llx-network-config/trunk/fuentes/install-files/usr/share/llx-network-config/llx-network-config.py

    r8010 r8011  
    3434                self.client=xmlrpclib.ServerProxy("https://localhost:9779")
    3535                try:
    36 #                       if self.client.get_variable("","VariablesManager","INTERFACE_REPLICATION")!=None:
    37 #                               self.open_dialog(_("Network Configuration"),_("Network reconfiguration is only allowed on independent servers"),"dialog-information")
    38 #                       else:
    39                         self.start_gui2()
     36                        if self.client.get_variable("","VariablesManager","INTERFACE_REPLICATION")!=None:
     37                                self.open_dialog(_("Network Configuration"),_("Network reconfiguration is only allowed on independent servers"),"dialog-information")
     38                        else:
     39                                self.start_gui()
    4040                except Exception as e:
    4141                        print(e)
     
    4646
    4747        def quit(self,*args):
     48                #aborts exit if app is applying changes
    4849                if self.spinner.props.active:
    4950                        return True
    5051                Gtk.main_quit()
    5152
    52         def start_gui2(self):
     53        def start_gui(self):
    5354                self._set_css_info()
    5455                self.window=Gtk.Window()
    5556                self.window.set_title("Netconf")
    56 #               builder=Gtk.Builder()
    57 #               builder.set_translation_domain("llx-network-config")
    5857                if os.path.exists("./rsrc/llx_network.png"):
    59 #                       builder.add_from_file("./rsrc/network-config.glade")
    6058                        banner="./rsrc/llx_network.png"
    6159                else:
    62 #                       builder.add_from_file("/usr/share/llx-network-config/rsrc/network-config.glade")
    6360                        banner="/usr/share/llx-network-config/rsrc/llx_network.png"
    6461                self.window.connect("delete-event",self.quit)
     
    147144                else:
    148145                        self.open_dialog(_("Network Configuration"),_("Error getting values.")+"\n[<b>"+str(ret[1])+"</b>]")
    149         #def start_gui2
     146        #def start_gui
    150147
    151148        def _format_grid_label(self,label_text=None):
Note: See TracChangeset for help on using the changeset viewer.