diff --git a/client/equo b/client/equo index c6103544a..fd53b57dd 100644 --- a/client/equo +++ b/client/equo @@ -341,7 +341,7 @@ except exceptionTools.RepositoryError, e: sys.exit(101) except SystemExit: pass -except IOError, (errno,errstr): +except IOError, (errno, strerror): reset_cache() if errno != 32: raise diff --git a/libraries/entropy.py b/libraries/entropy.py index 8e2e43747..e1ed99d9f 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -2035,7 +2035,7 @@ class EquoInterface(TextInterface): ''' Repository interface :: end ''' - + ''' Configuration files (updates, not entropy related) interface :: begin ''' diff --git a/spritz/gfx/button-conf.png b/spritz/gfx/button-conf.png new file mode 100644 index 000000000..928a67995 Binary files /dev/null and b/spritz/gfx/button-conf.png differ diff --git a/spritz/src/gui.py b/spritz/src/gui.py index 8365c981a..1f074fb84 100644 --- a/spritz/src/gui.py +++ b/spritz/src/gui.py @@ -273,8 +273,9 @@ class SpritzGUI: self.Entropy = EquoConnection self.etpbase = etpbase self.queue = SpritzQueue() - self.queueView = YumexQueueView(self.ui.queueView,self.queue) + self.queueView = EntropyQueueView(self.ui.queueView,self.queue) self.pkgView = EntropyPackageView(self.ui.viewPkg,self.queueView, self.ui, self.etpbase) + self.filesView = EntropyFilesView(self.ui.filesView) self.queue.connect_objects(self.Entropy, self.etpbase, self.pkgView, self.ui) #self.catView = YumexCategoryView(self.ui.tvCategory) self.catsView = CategoriesView(self.ui.tvComps,self.queueView) @@ -362,6 +363,7 @@ class SpritzGUI: self.ui.pageImage0.set_from_file ( const.PIXMAPS_PATH + '/button-repo.png' ) self.ui.pageImage3.set_from_file ( const.PIXMAPS_PATH + '/button-group.png' ) self.ui.pageImage4.set_from_file ( const.PIXMAPS_PATH + '/button-queue.png' ) + self.ui.pageImage5.set_from_file ( const.PIXMAPS_PATH + '/button-conf.png' ) def createButton( self, text, icon, page,first = None ): if first: diff --git a/spritz/src/spritz.glade b/spritz/src/spritz.glade index 2ec819c6d..f1338ea1a 100644 --- a/spritz/src/spritz.glade +++ b/spritz/src/spritz.glade @@ -2780,20 +2780,455 @@ + 6 True False - 0 + 6 - + + True + False + 0 + + + + True + <span size="xx-large" color="black">Files Update</span> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + gtk-missing-image + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + GTK_PACK_END + + + + + 0 + False + True + - + + True + False + 0 + + + + 6 + True + GTK_BUTTONBOX_SPREAD + 0 + + + + True + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-zoom-fit + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + C_hanges + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + + True + True + True + gtk-edit + True + GTK_RELIEF_NORMAL + True + + + + + + True + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-apply + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + M_erge + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + + True + True + True + gtk-delete + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + False + + + + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + 0 + True + True + - + + True + GTK_BUTTONBOX_END + 24 + + + + True + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-delete + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Dele_te all + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + + True + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-apply + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Merge all + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + 0 + False + False + diff --git a/spritz/src/spritz.py b/spritz/src/spritz.py index 1fb5f3246..d06630303 100644 --- a/spritz/src/spritz.py +++ b/spritz/src/spritz.py @@ -313,6 +313,8 @@ class SpritzController(Controller): def on_PageButton_changed( self, widget, page ): ''' Left Side Toolbar Handler''' + if page == "filesconf": + self.populateFilesUpdate() self.setNotebookPage(const.PAGES[page]) def on_category_selected(self,widget): @@ -671,6 +673,20 @@ class SpritzApplication(SpritzController,SpritzGUI): if alone: self.progress.total.show() + def populateFilesUpdate(self): + # load filesUpdate interface and fill self.filesView + cached = None + try: + cached = self.Equo.FileUpdates.load_cache() + except exceptionTools.CacheCorruptionError: + pass + if cached == None: + self.startWorking() + cached = self.Equo.FileUpdates.scanfs() + self.endWorking() + if cached: + self.filesView.populate(cached) + def updateRepositories(self, repos): self.setPage('output') self.startWorking() diff --git a/spritz/src/views.py b/spritz/src/views.py index fc4378316..aaecde401 100644 --- a/spritz/src/views.py +++ b/spritz/src/views.py @@ -491,7 +491,7 @@ class EntropyPackageView: else: cell.set_property( 'visible', False ) -class YumexQueueView: +class EntropyQueueView: """ Queue View Class""" def __init__( self, widget, queue ): self.view = widget @@ -567,6 +567,39 @@ class YumexQueueView: for pkg in list: self.model.append( parent, [str( pkg ), pkg.description] ) +class EntropyFilesView: + """ Queue View Class""" + def __init__( self, widget ): + self.view = widget + self.model = self.setup_view() + + def setup_view( self ): + """ Create Notebook list for single page """ + model = gtk.TreeStore( gobject.TYPE_STRING, gobject.TYPE_STRING ) + self.view.set_model( model ) + cell1 = gtk.CellRendererText() + column1 = gtk.TreeViewColumn( _( "Configuration file" ), cell1, markup = 0 ) + column1.set_sizing( gtk.TREE_VIEW_COLUMN_FIXED ) + column1.set_fixed_width( 500 ) + column1.set_resizable( True ) + self.view.append_column( column1 ) + + cell2 = gtk.CellRendererText() + column2 = gtk.TreeViewColumn( _( "Rev." ), cell2, text=1 ) + column2.set_resizable( True ) + column2.set_sizing( gtk.TREE_VIEW_COLUMN_FIXED ) + column2.set_fixed_width( 30 ) + self.view.append_column( column2 ) + model.set_sort_column_id( 0, gtk.SORT_ASCENDING ) + self.view.get_selection().set_mode( gtk.SELECTION_MULTIPLE ) + return model + + def populate( self, scandata ): + self.model.clear() + keys = scandata.keys() + keys.sort() + for key in keys: + self.model.append(None,[scandata[key]['destination'],scandata[key]['revision']]) class CategoriesView: def __init__( self, treeview,qview):