Exemple #1
0
 def __initData__(self, gtkLock=False):
     """
     @summary: Set data to dialog.
     """        
     if (self.__item__ != None):
         lOperations = self.__item__.getOperations()
         if (lOperations != None):
             for key, op in lOperations.iteritems():
                 newRowData = [key, op.getOp(), op.toString(), False]
                 UIUtils.addIterListView(self.__model__,
                                         newRowData,
                                         doGObject=gtkLock)
                 __log__.info("New file inserted into operations treeview. %s" % key)
Exemple #2
0
 def addOperation(self, data):
     """
     @summary: Adds an operation in operation treeview.
     @param data: Tuple with operation data. (id, name, value, step)
     @return: New iter inserted.
     """
     return UIUtils.addIterListView(self.__opsModel__, data)
Exemple #3
0
    def __fillLanguages__(self, gtkLock=False):
        """
        @summary: Fill combobox with available languages.
        @param gtkLock: True to lock gtk-loop. 
        """
        
        if (not hasattr(self, "__lsLanguages__")):
            self.__lsLanguages__ = gtk.ListStore(gobject.TYPE_STRING,
                                                     gobject.TYPE_STRING)
            render_text = gtk.CellRendererText()
            UIUtils.setModelTreeview(self.__cbLanguages__, self.__lsLanguages__, doGObject=gtkLock)
            
            self.__cbLanguages__.pack_start(render_text)
            self.__cbLanguages__.add_attribute(render_text, 'text', __COLUMN_TEXT__)
        
        iterSelected = None
        for key, lang in self.__langs__.iteritems():
            if (lang == ""):
                continue
            iter = UIUtils.addIterListView(self.__lsLanguages__, (lang, key), doGObject=gtkLock)
            if (key == self.__currLang__):
                iterSelected = iter

        if (iterSelected != None):
            UIUtils.setActiveIter(self.__cbLanguages__, iterSelected, doGObject=gtkLock)
        else:
            UIUtils.setActiveIter(self.__cbLanguages__, 0, doGObject=gtkLock)
Exemple #4
0
 def __initData__(self, gtkLock=False):
     """
     @summary: Set data to dialog.
     """
     mPlugins = Loader.pluginsLoaded
     if (mPlugins != None):
         for key, lPlugins in mPlugins.iteritems():
             for plugin, pluginRef in lPlugins:
                 obj = gobject.GObject()
                 obj.set_data("plugin", plugin)
                 newRowData = [plugin.getId(), plugin.getName(), PLUGIN_TYPE.getTypeDescription(plugin.getType()), obj]
                 UIUtils.addIterListView(self.__model__,
                                         newRowData,
                                         doGObject=gtkLock)
                 __log__.info("New file inserted into plugins treeview. %s" % plugin.getId())
     else:
         __log__.debug("There are not plugins")