# 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.insert(self.graph_time_box(),4)                #Time choice 
        
    def __connected_widgets(self):
        """"""
        pass
    
    def packed(self,*widgets):
        """
        Pack Widgets in a gtk.Hbox and return a gtk.ToolItem
        """
        box = gtk.HBox()
        box.set_border_width(5)
        for w in widgets:
            box.pack_start(w,False,False,0)
            
        item = gtk.ToolItem()
        item.add(box)
        
        return item
    
    def graph_mode_ui(self,graph_mode = None):
        """
        Graph Mode: Year, Month, Day, Hour viewing modes
        """
        self.combo_view_mode = gtk.combo_box_new_text()
        
        for mode in view_mode_order:
            self.combo_view_mode.append_text(view_mode[mode])
            
        if graph_mode:

# 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.insert(self.graph_time_box(),4)                #Time choice 
        
    def __connected_widgets(self):
        """"""
        pass
    
    def packed(self,*widgets):
        """
        Pack Widgets in a gtk.Hbox and return a gtk.ToolItem
        """
        box = gtk.HBox()
        box.set_border_width(5)
        for w in widgets:
            box.pack_start(w,False,False,0)
            
        item = gtk.ToolItem()
        item.add(box)
        
        return item
    
    def graph_mode_ui(self,graph_mode = None):
        """
        Graph Mode: Year, Month, Day, Hour viewing modes
        """
        self.combo_view_mode = gtk.combo_box_new_text()
        
        for mode in view_mode_order:
            self.combo_view_mode.append_text(view_mode[mode])
            
        if graph_mode:

            option = view_mode_order.index(graph_mode)