# 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/gui/dashboard/timeline/TimeLineGraphBase.py
# def colors_from_file_gdk():
# def colors_from_file():
#     def __init__(self,connector,dashboard):
#     def __conector_widgets(self):
#     def _handle_selection(self,obj,selection):
#     def grab_data(self):
#     def update_grabber(self):
#     def descr_by_graphmode(self):
#     def title_by_graphmode(self, useselection=False):
#         def adjust(date):
#     def bounds_by_graphmode(self):
#     def _update_graph_data(self,obj,*args):
#     def _update_date(self,obj,arg):
# class TimeLineBase(CalendarManager, DataGrabber):
# 
# Path: umit/icm/agent/gui/dashboard/timeline/TimeLineGraphBase.py
# def colors_from_file_gdk():
# def colors_from_file():
#     def __init__(self,connector,dashboard):
#     def __conector_widgets(self):
#     def _handle_selection(self,obj,selection):
#     def grab_data(self):
#     def update_grabber(self):
#     def descr_by_graphmode(self):
#     def title_by_graphmode(self, useselection=False):
#         def adjust(date):
#     def bounds_by_graphmode(self):
#     def _update_graph_data(self,obj,*args):
#     def _update_date(self,obj,arg):
# class TimeLineBase(CalendarManager, DataGrabber):
# 
# Path: umit/icm/agent/gui/dashboard/timeline/TimeLineGraphBase.py
# def colors_from_file_gdk():
# def colors_from_file():
#     def __init__(self,connector,dashboard):
#     def __conector_widgets(self):
#     def _handle_selection(self,obj,selection):
#     def grab_data(self):
#     def update_grabber(self):
#     def descr_by_graphmode(self):
#     def title_by_graphmode(self, useselection=False):
#         def adjust(date):
#     def bounds_by_graphmode(self):
#     def _update_graph_data(self,obj,*args):
#     def _update_date(self,obj,arg):
# class TimeLineBase(CalendarManager, DataGrabber):


import pygtk
import gtk, gobject
from umit.icm.agent.I18N import _
from umit.icm.agent.gui.dashboard.timeline.TimeLineGraphBase import view_mode,view_mode_order
from umit.icm.agent.gui.dashboard.timeline.TimeLineGraphBase import view_kind,view_kind_order
from umit.icm.agent.gui.dashboard.timeline.TimeLineGraphBase import view_mode_descr 
            
        self.combo_view_mode.set_active(option)
        
        self.combo_view_mode.connect('changed',self.change_graph_mode)
        
        
        return self.packed(self.combo_view_mode)

    def change_graph_mode(self,event):
        """
        Viewing Mode Setting 
        """
        mode = view_mode_order[event.get_active()]
        self.connector.emit('data_changed',mode,'category')
    
    def graph_time_box(self):
        """
        Time Choice and Apply button
        """
        self.time_box = TimeBox(self.connector,self.timeline_base)
        
        return self.packed(self.time_box)
        
        
    def graph_kind_ui(self):
        """
        Graph kind: Line and Area
        """
        modes = _("Line Graph"), _("Area Graph")
        self.combo_graph_kind = gtk.combo_box_new_text()

# 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/gui/dashboard/timeline/TimeLineGraphBase.py
# def colors_from_file_gdk():
# def colors_from_file():
#     def __init__(self,connector,dashboard):
#     def __conector_widgets(self):
#     def _handle_selection(self,obj,selection):
#     def grab_data(self):
#     def update_grabber(self):
#     def descr_by_graphmode(self):
#     def title_by_graphmode(self, useselection=False):
#         def adjust(date):
#     def bounds_by_graphmode(self):
#     def _update_graph_data(self,obj,*args):
#     def _update_date(self,obj,arg):
# class TimeLineBase(CalendarManager, DataGrabber):
# 
# Path: umit/icm/agent/gui/dashboard/timeline/TimeLineGraphBase.py
# def colors_from_file_gdk():
# def colors_from_file():
#     def __init__(self,connector,dashboard):
#     def __conector_widgets(self):
#     def _handle_selection(self,obj,selection):
#     def grab_data(self):
#     def update_grabber(self):
#     def descr_by_graphmode(self):
#     def title_by_graphmode(self, useselection=False):
#         def adjust(date):
#     def bounds_by_graphmode(self):
#     def _update_graph_data(self,obj,*args):
#     def _update_date(self,obj,arg):
# class TimeLineBase(CalendarManager, DataGrabber):
# 
# Path: umit/icm/agent/gui/dashboard/timeline/TimeLineGraphBase.py
# def colors_from_file_gdk():
# def colors_from_file():
#     def __init__(self,connector,dashboard):
#     def __conector_widgets(self):
#     def _handle_selection(self,obj,selection):
#     def grab_data(self):
#     def update_grabber(self):
#     def descr_by_graphmode(self):
#     def title_by_graphmode(self, useselection=False):
#         def adjust(date):
#     def bounds_by_graphmode(self):
#     def _update_graph_data(self,obj,*args):
#     def _update_date(self,obj,arg):
# class TimeLineBase(CalendarManager, DataGrabber):


# Path: umit/icm/agent/gui/dashboard/timeline/TimeLineGraphToolbar.py
import pygtk
import gtk, gobject
from umit.icm.agent.I18N import _
from umit.icm.agent.gui.dashboard.timeline.TimeLineGraphBase import view_mode,view_mode_order
from umit.icm.agent.gui.dashboard.timeline.TimeLineGraphBase import view_kind,view_kind_order
from umit.icm.agent.gui.dashboard.timeline.TimeLineGraphBase import view_mode_descr 

            
        self.combo_view_mode.set_active(option)
        
        self.combo_view_mode.connect('changed',self.change_graph_mode)
        
        
        return self.packed(self.combo_view_mode)

    def change_graph_mode(self,event):
        """
        Viewing Mode Setting 
        """
        mode = view_mode_order[event.get_active()]
        self.connector.emit('data_changed',mode,'category')
    
    def graph_time_box(self):
        """
        Time Choice and Apply button
        """
        self.time_box = TimeBox(self.connector,self.timeline_base)
        
        return self.packed(self.time_box)
        
        
    def graph_kind_ui(self):
        """
        Graph kind: Line and Area
        """
        modes = _("Line Graph"), _("Area Graph")
        self.combo_graph_kind = gtk.combo_box_new_text()

        self.combo_graph_kind.append_text(_("Select a graph style"))