Changeset 23 for conseil.py

Show
Ignore:
Timestamp:
07/08/06 12:06:18 (3 years ago)
Author:
ploum
Message:

#3 columns are not re-orderable in the search results

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • conseil.py

    r20 r23  
    33import sys 
    44import string 
     5#subfolders are added to the path 
     6sys.path[1:1]=["storage", "protocols"] 
    57try: 
    68        import pygtk 
     
    1719from protocol_launchpadweb import protocol 
    1820from bug import bug 
     21from bookmarks_store import * 
    1922 
    2023class MainWindow : 
     
    5558                column = gtk.TreeViewColumn("Bug #", renderer, text=0) 
    5659                column.set_resizable(1) 
     60                column.set_sort_column_id(0) 
    5761                column2 = gtk.TreeViewColumn("Product", renderer, text=1) 
    5862                column2.set_resizable(1) 
     63                column2.set_sort_column_id(1) 
    5964                column3 = gtk.TreeViewColumn("Titre", renderer, text=2) 
    6065                column3.set_resizable(1) 
     66                column3.set_sort_column_id(2) 
    6167                column4 = gtk.TreeViewColumn("Importance", renderer, text=3) 
    6268                column4.set_resizable(1) 
     69                column4.set_sort_column_id(3) 
    6370                column5 = gtk.TreeViewColumn("Status", renderer, text=4) 
    6471                column5.set_resizable(1) 
     72                column5.set_sort_column_id(4) 
    6573                tree.append_column(column) 
    6674                tree.append_column(column2) 
     
    8189                # 3- package search 
    8290                # 4- advanced search 
    83                 listing = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_INT, gobject.TYPE_STRING) 
     91                self.bookmarks = bookmarks_store() 
     92                listing = self.bookmarks.get() 
    8493                treeV.set_model(listing) 
    85                 # essai temporaire 
    86                 # normalement ici on lit le fichier de préférences 
    87                 listing.insert_before(None, ["3 results", 2, "nautilus evolution crash"]) 
    88                 listing.insert_before(None, ["many results", 2, "microsoft has majority"]) 
    89                 listing.insert_before(None, ["Evo's bugs", 3, "evolution refresh folder"]) 
    90                 listing.insert_before(None, ["Bug #42", 1, "42"]) 
    91                 listing.insert_before(None, ["Content in +text mode", 1, "51835"]) 
    92                 listing.insert_before(None, ["Search in bugs+text", 1, "51836"]) 
    9394                renderer = gtk.CellRendererText() 
    9495                column = gtk.TreeViewColumn("title", renderer, text=0) 
     
    206207 
    207208        # This function takes a bug Object and then display it nicely 
    208         # (it will be nicely one day, I swear...) 
     209        # (it will be nice one day, I swear...) 
    209210        def __bugDisplay(self, zebug) : 
    210211                bugnbr=str(zebug.getNbr())