From 7d030d0ecf3e22f3216217057d383eaacaf98be5 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Thu, 7 Feb 2008 21:13:28 +0000 Subject: [PATCH] - created a mockup of the Spritz files update interface - tesing a fix for IOError exception trapping git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1168 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- client/equo | 2 +- libraries/entropy.py | 2 +- spritz/gfx/button-conf.png | Bin 0 -> 744 bytes spritz/src/gui.py | 4 +- spritz/src/spritz.glade | 443 ++++++++++++++++++++++++++++++++++++- spritz/src/spritz.py | 16 ++ spritz/src/views.py | 35 ++- 7 files changed, 494 insertions(+), 8 deletions(-) create mode 100644 spritz/gfx/button-conf.png 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 0000000000000000000000000000000000000000..928a67995ee9713bc3c86159ed84c0bc568675d9 GIT binary patch literal 744 zcmVP)C zM?hT&K^TU_ag0(bxuPga?shwG47iJ;=-p^E`eetGTZ)3<>f+*}zG)Lh5mHLD)~WaG ze#v(I^78Tu$QPiLY5?5a+zsTCLRNN(nF&Tp`V7^WPItN~Ijy6m}ud zZnu+uX#&3BK@iYtwRR$4#!Cq>1bjs}pU+WBmBucFpwsCj{YnA=#^W)kr>BVkgVVPv zio{eBV2W@s7^K$!Y&NS*pxf2#V}hDF=55Q3wlqb(u10_+;NzP_g4? z1l|Aw_yWW>zZ&ogcmXtkCz}`lhCT2&*?ZtC@EQ04o + 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):