# Path: umit/icm/agent/I18N.py
#     LC_ALL = locale.setlocale(locale.LC_ALL,'')
#     LC_ALL = locale.setlocale(locale.LC_ALL, None)        
# LANG = None
# ENC = None
#     LANG = "en_US"
#     LANG = "zh_CN"
#     LANG = "pt"
#     LANG = "ja"
#     LANG, ENC = locale.getdefaultlocale()
#     ENC = "utf8"
#     LANG = "en_US"   
# 
# Path: umit/icm/agent/Application.py
# def main_is_frozen():
#     def __init__(self):
#     def _init_components(self, aggregator):
#     def _load_from_db(self):
#     def init_after_running(self, port=None, username=None, password=None,
#                            server_enabled=True, skip_server_check=False):
#     def check_aggregator_success(self,response):
#     def login_window_show(self):       
#     def check_aggregator_failed(self,message):
#     def login_without_gui(self):
#     def check_software_auto(self):
#     def register_agent(self, username, password):
#     def _handle_register(self, result):
#     def _handle_errback(self, failure):
#     def login(self, username, password, save_login=False, login_only=False):
#     def check_username(self,username="",password=""):
#     def _login_after_register_callback(self, message, username,
#                                        password, save_login, login_only):
#     def _handle_login_errback(self,failure):
#     def _handle_login(self, result, username, password, save_login,login_only=False):
#     def login_simulate(self):
#     def task_loop_manager(self):
#     def logout(self):
#     def _handle_logout(self, result):
#     def start(self, run_reactor=True, managed_mode=False, aggregator=None):
#     def quit_window_in_wrong(self,primary_text = "",secondary_text = ""):
#     def terminate(self):
#     def on_quit(self):
# class Application(object):


import gtk
from deps.higwidgets.higdialogs import HIGDialog
from deps.higwidgets.higlabels import HIGLabel
from deps.higwidgets.higentries import HIGTextEntry
from deps.higwidgets.higtables import HIGTable
from deps.higwidgets.higboxes import HIGHBox, HIGVBox,hig_box_space_holder
from deps.higwidgets.higbuttons import HIGStockButton,HIGButton
from umit.icm.agent.I18N import _
from umit.icm.agent.Global import *
from umit.icm.agent.Application import theApp
    """"""
    def __init__(self,title=_('Settings')):
        """Constructor"""
        HIGDialog.__init__(self, title=title, flags=gtk.DIALOG_MODAL)
        
        self.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
        self.set_default_response(gtk.RESPONSE_ACCEPT)
        self.set_keep_above(True)
        self.set_size_request(480,100)
        self.set_border_width(2)
        
        self._create_widgets()
        self._pack_widgets()
        self._connect_widgets() 
        self._load_settings()
    
    def _load_settings(self):
        """"""
        aggregator_url = g_config.get('network', 'aggregator_url')
        self.aggregator_ip_entry.set_text(aggregator_url)
          
    def _create_widgets(self):
        """"""
        self.web_listen_port_label = HIGLabel(_("Web Listen PORT"))
        self.web_listen_port_entry = HIGTextEntry()
        
        self.aggregator_ip_label = HIGLabel(_("Aggregator URL"))
        self.aggregator_ip_entry = HIGTextEntry()
        
        

# Path: umit/icm/agent/I18N.py
#     LC_ALL = locale.setlocale(locale.LC_ALL,'')
#     LC_ALL = locale.setlocale(locale.LC_ALL, None)        
# LANG = None
# ENC = None
#     LANG = "en_US"
#     LANG = "zh_CN"
#     LANG = "pt"
#     LANG = "ja"
#     LANG, ENC = locale.getdefaultlocale()
#     ENC = "utf8"
#     LANG = "en_US"   
# 
# Path: umit/icm/agent/Application.py
# def main_is_frozen():
#     def __init__(self):
#     def _init_components(self, aggregator):
#     def _load_from_db(self):
#     def init_after_running(self, port=None, username=None, password=None,
#                            server_enabled=True, skip_server_check=False):
#     def check_aggregator_success(self,response):
#     def login_window_show(self):       
#     def check_aggregator_failed(self,message):
#     def login_without_gui(self):
#     def check_software_auto(self):
#     def register_agent(self, username, password):
#     def _handle_register(self, result):
#     def _handle_errback(self, failure):
#     def login(self, username, password, save_login=False, login_only=False):
#     def check_username(self,username="",password=""):
#     def _login_after_register_callback(self, message, username,
#                                        password, save_login, login_only):
#     def _handle_login_errback(self,failure):
#     def _handle_login(self, result, username, password, save_login,login_only=False):
#     def login_simulate(self):
#     def task_loop_manager(self):
#     def logout(self):
#     def _handle_logout(self, result):
#     def start(self, run_reactor=True, managed_mode=False, aggregator=None):
#     def quit_window_in_wrong(self,primary_text = "",secondary_text = ""):
#     def terminate(self):
#     def on_quit(self):
# class Application(object):


# Path: umit/icm/agent/gui/Settings.py
import gtk
from deps.higwidgets.higdialogs import HIGDialog
from deps.higwidgets.higlabels import HIGLabel
from deps.higwidgets.higentries import HIGTextEntry
from deps.higwidgets.higtables import HIGTable
from deps.higwidgets.higboxes import HIGHBox, HIGVBox,hig_box_space_holder
from deps.higwidgets.higbuttons import HIGStockButton,HIGButton
from umit.icm.agent.I18N import _
from umit.icm.agent.Global import *
from umit.icm.agent.Application import theApp

    """"""
    def __init__(self,title=_('Settings')):
        """Constructor"""
        HIGDialog.__init__(self, title=title, flags=gtk.DIALOG_MODAL)
        
        self.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
        self.set_default_response(gtk.RESPONSE_ACCEPT)
        self.set_keep_above(True)
        self.set_size_request(480,100)
        self.set_border_width(2)
        
        self._create_widgets()
        self._pack_widgets()
        self._connect_widgets() 
        self._load_settings()
    
    def _load_settings(self):
        """"""
        aggregator_url = g_config.get('network', 'aggregator_url')
        self.aggregator_ip_entry.set_text(aggregator_url)
          
    def _create_widgets(self):
        """"""
        self.web_listen_port_label = HIGLabel(_("Web Listen PORT"))
        self.web_listen_port_entry = HIGTextEntry()
        
        self.aggregator_ip_label = HIGLabel(_("Aggregator URL"))
        self.aggregator_ip_entry = HIGTextEntry()
        
        

        self.network_listen_port_label = HIGLabel(_("Peer Listen PORT"))