← Back to team overview

zeitgeist team mailing list archive

[Merge] lp:~dhananjaysathe/zeitgeist-explorer/zeitgeist-explorer into lp:zeitgeist-explorer

 

dhananjaysathe has proposed merging lp:~dhananjaysathe/zeitgeist-explorer/zeitgeist-explorer into lp:zeitgeist-explorer.

Requested reviews:
  Manish Sinha (मनीष सिन्हा) (manishsinha)

For more details, see:
https://code.launchpad.net/~dhananjaysathe/zeitgeist-explorer/zeitgeist-explorer/+merge/97531

Gtk3 code refactoring
-- 
https://code.launchpad.net/~dhananjaysathe/zeitgeist-explorer/zeitgeist-explorer/+merge/97531
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist-explorer.
=== modified file '.bzrignore' (properties changed: -x to +x)
=== modified file 'zgexplorer/__init__.py' (properties changed: -x to +x)
=== modified file 'zgexplorer/eventwidgets.py' (properties changed: -x to +x)
--- zgexplorer/eventwidgets.py	2012-03-12 20:57:29 +0000
+++ zgexplorer/eventwidgets.py	2012-03-14 22:39:19 +0000
@@ -9,12 +9,12 @@
 # under the terms of the GNU Lesser General Public License as published
 # by the Free Software Foundation, either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 # See the GNU Lesser General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU Lesser General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 #
@@ -30,59 +30,38 @@
         super(TimeRangeViewer, self).__init__()
 
         timerange_label = Gtk.Label("Time Range")
-        self.pack_start(timerange_label, False, False, 12)
-
-        self.always_radio = Gtk.RadioButton()
-        self.always_radio.set_label("Always")
-        self.always_radio.set_margin_left(24)
-        self.pack_start(self.always_radio, False, False, 12)
-
-        self.custom_radio = Gtk.RadioButton.new_from_widget(self.always_radio)
-        self.custom_radio.set_label("Custom")
-        self.custom_radio.set_margin_left(24)
-        self.pack_start(self.custom_radio, False, False, 12)
-
+        self.pack_start(timerange_label,False,False,12)
+
+        self.always_radio = Gtk.RadioButton(label= "Always",margin_left= 24)
+        self.pack_start(self.always_radio,False,False,12)
+
+        self.custom_radio = Gtk.RadioButton(label= "Custom",margin_left= 24)
+        self.custom_radio.join_group(self.always_radio)
+        self.pack_start(self.custom_radio,False,False,12)
 
 
 class TemplateViewer(Gtk.VBox):
     def __init__(self):
        super(TemplateViewer, self).__init__()
 
-       self.table = Gtk.Table(10, 2, False)
-       self.table.set_border_width(1)
+       self.table = Gtk.Table(10, 2, False,border_width=1)
        self.pack_start(self.table, True, True, 0)
 
        event_label = Gtk.Label()
        event_label.set_markup("Event")
-       self.table.attach(event_label, 0, 2, 0, 1, xpadding=6, ypadding=6)
 
        # Event Interpretation
        event_inter_label = Gtk.Label("Interpretation")
-       self.table.attach(event_inter_label, 0, 1, 1, 2, xpadding=6, ypadding=6)
-       self.event_inter_entry = Gtk.Entry()
-       self.event_inter_entry.set_width_chars(40)
-       self.table.attach(self.event_inter_entry, 1, 2, 1, 2, xpadding=6, ypadding=6)
+       self.event_inter_entry = Gtk.Entry(width_chars=40)
 
        # Event Manifesation
        event_manifes_label = Gtk.Label("Manifestation")
-       self.table.attach(event_manifes_label, 0, 1, 2, 3, xpadding=6, ypadding=6)
-       self.event_manifes_entry = Gtk.Entry()
-       self.event_manifes_entry.set_width_chars(40)
-       self.table.attach(self.event_manifes_entry, 1, 2, 2, 3, xpadding=6, ypadding=6)
- 
-       # Event Actor
-       #actor_hbox = Gtk.HBox()
-       #actor_hbox.set_margin_bottom(6)
-       #self.table.attach(actor_hbox, 0, 2, 3, 4)
+       self.event_manifes_entry = Gtk.Entry(width_chars=40)
 
        actor_label = Gtk.Label("Actor")
-       self.table.attach(actor_label, 0, 1, 3, 4, xpadding=6, ypadding=6)
-       self.actor_entry = Gtk.Entry()
-       self.table.attach(self.actor_entry, 1, 2, 3, 4, xpadding=6, ypadding=6)
-       
-       actor_hbox = Gtk.HBox()
-       actor_hbox.set_margin_bottom(6)
-       self.table.attach(actor_hbox, 1, 2, 4, 5, xpadding=6, ypadding=6)
+       self.actor_entry = Gtk.Entry(width_chars=40)
+
+       actor_hbox = Gtk.HBox(margin_bottom=6)
        self.actor_button = Gtk.Button()
        self.actor_button.set_size_request(32, 32)
        actor_hbox.pack_start(self.actor_button, False, False, 12)
@@ -91,38 +70,46 @@
 
        subj_label = Gtk.Label()
        subj_label.set_markup("Subject")
-       self.table.attach(subj_label, 0, 2, 5, 6, xpadding=6, ypadding=6)
 
 
        # Subject Interpretation
        subj_inter_label = Gtk.Label("Interpretation")
-       self.table.attach(subj_inter_label, 0, 1, 6, 7, xpadding=6, ypadding=6)
-       self.subj_inter_entry = Gtk.Entry()
-       self.subj_inter_entry.set_width_chars(40)
-       self.table.attach(self.subj_inter_entry, 1, 2, 6, 7, xpadding=6, ypadding=6)
+       self.subj_inter_entry = Gtk.Entry(width_chars=40)
 
        # Subject Manifesation
        subj_manifes_label = Gtk.Label("Manifestation")
-       self.table.attach(subj_manifes_label, 0, 1, 7, 8, xpadding=6, ypadding=6)
-       self.subj_manifes_entry = Gtk.Entry()
-       self.subj_manifes_entry.set_width_chars(40)
-       self.table.attach(self.subj_manifes_entry, 1, 2, 7, 8, xpadding=6, ypadding=6)
+       self.subj_manifes_entry = Gtk.Entry(width_chars=40)
 
        # Mimetype
        mimetype_label = Gtk.Label("Mimetype")
-       self.table.attach(mimetype_label, 0, 1, 8, 9, xpadding=6, ypadding=6)
-       self.mimetype_entry = Gtk.Entry()
-       self.mimetype_entry.set_width_chars(40)
-       self.table.attach(self.mimetype_entry, 1, 2, 8, 9, xpadding=6, ypadding=6)
- 
+       self.mimetype_entry = Gtk.Entry(width_chars=40)
+
        # Storage
        storage_label = Gtk.Label("Storage")
-       self.table.attach(storage_label, 0, 1, 9, 10, xpadding=6, ypadding=6)
-       self.storage_entry = Gtk.Entry()
-       self.storage_entry.set_width_chars(40)
-       self.table.attach(self.storage_entry, 1, 2, 9, 10, xpadding=6, ypadding=6)
- 
-       self.show_all()
+       self.storage_entry = Gtk.Entry(width_chars=40)
+
+       attach_list = (
+            (event_label,(0, 2, 0, 1)),
+            (event_inter_label,(0, 1, 1, 2)),
+            (self.event_inter_entry,(1, 2, 1, 2)),
+            (event_manifes_label,(0, 1, 2, 3)),
+            (self.event_manifes_entry,(1, 2, 2, 3)),
+            (actor_label,(0, 1, 3, 4)),
+            (self.actor_entry,(1, 2, 3, 4)),
+            (actor_hbox,(1, 2, 4, 5)),
+            (subj_label,(0, 2, 5, 6)),
+            (subj_inter_label,(0, 1, 6, 7)),
+            (self.subj_inter_entry,(1, 2, 6, 7)),
+            (subj_manifes_label,(0, 1, 7, 8)),
+            (self.subj_manifes_entry,(1, 2, 7, 8)),
+            (mimetype_label,(0, 1, 8, 9)),
+            (self.mimetype_entry,(1, 2, 8, 9)),
+            (storage_label,(0, 1, 9, 10)),
+            (self.storage_entry,(1, 2, 9, 10))
+        )
+       for widget_entry in attach_list :
+           widget,pos = widget_entry
+           self.table.attach(widget,pos[0],pos[1], pos[2], pos[3], xpadding=6, ypadding=6)
 
     def set_fields_enable(self, enable):
         self.event_inter_entry.set_sensitive(enable)
@@ -178,10 +165,10 @@
                 if type(subj_inter) is Symbol else "")
         self.subj_inter_entry.set_tooltip_text(subj_inter.doc \
                 if type(subj_inter) is Symbol else "")
-        
+
         # Event Manifestation
         subj_manifes =  subj.get_manifestation()
-        self.subj_manifes_entry.set_text(subj_manifes.name 
+        self.subj_manifes_entry.set_text(subj_manifes.name
                 if type(subj_manifes) is Symbol else "")
         self.subj_manifes_entry.set_tooltip_text(subj_manifes.doc \
                 if type(subj_manifes) is Symbol else "")
@@ -194,136 +181,114 @@
     def __init__(self):
         super(EventViewer, self).__init__()
 
-        self.table = Gtk.Table(18, 4, False)
+        self.table = Gtk.Table(18, 4, False,border_width=1)
         self.pack_start(self.table, False, False, 6)
-        self.table.set_border_width(1)
 
-        id_label = Gtk.Label()
+        id_label = Gtk.Label(xalign=0,yalign=0.5)
         id_label.set_markup("<b>%s</b>" %("Event ID"))
-        id_label.set_alignment(0, 0.5)
-        self.table.attach(id_label, 0, 1, 0, 1, xpadding = 6, ypadding =6 )
-
-        self.id_entry = Gtk.Label()
-        self.id_entry.set_alignment(0, 0.5)
-        self.table.attach(self.id_entry, 1, 2, 0, 1, xpadding = 6, ypadding =6)
-
-        time_label = Gtk.Label()
+
+        self.id_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        time_label = Gtk.Label(xalign=0,yalign=0.5)
         time_label.set_markup("<b>%s</b>" %("Timestamp"))
-        time_label.set_alignment(0, 0.5)
-        self.table.attach(time_label, 2, 3, 0, 1, xpadding = 6, ypadding = 6)
-
-        self.time_entry = Gtk.Label()
-        self.time_entry.set_alignment(0, 0.5)
-        self.table.attach(self.time_entry, 3, 4, 0, 1, xpadding = 6, ypadding = 6)
-
-        event_int_label = Gtk.Label()
+
+        self.time_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        event_int_label = Gtk.Label(xalign=0,yalign=0.5)
         event_int_label.set_markup("<b>%s</b>" %("Interpretation"))
-        event_int_label.set_alignment(0, 0.5)
-        self.table.attach(event_int_label, 0, 1, 1, 2, xpadding = 6, ypadding = 6)
-
-        self.event_int_entry = Gtk.Label()
-        self.event_int_entry.set_alignment(0, 0.5)
-        self.table.attach(self.event_int_entry, 1, 4, 1, 2, xpadding = 6, ypadding = 6)
-
-        event_manifes_label = Gtk.Label()
+
+        self.event_int_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        event_manifes_label = Gtk.Label(xalign=0,yalign=0.5)
         event_manifes_label.set_markup("<b>%s</b>" %("Manifestation"))
-        event_manifes_label.set_alignment(0, 0.5)
-        self.table.attach(event_manifes_label, 0, 1, 2, 3, xpadding = 6, ypadding = 6)
-
-        self.event_manifes_entry = Gtk.Label()
-        self.event_manifes_entry.set_alignment(0, 0.5)
-        self.table.attach(self.event_manifes_entry, 1, 4, 2, 3, xpadding = 6, ypadding = 6)
-
-        actor_label = Gtk.Label()
+
+        self.event_manifes_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        actor_label = Gtk.Label(xalign=0,yalign=0.5)
         actor_label.set_markup("<b>%s</b>" %("Actor"))
-        actor_label.set_alignment(0, 0.5)
-        self.table.attach(actor_label, 0, 1, 3, 4, xpadding = 6, ypadding = 6)
 
-        self.actor_entry = Gtk.Label()
-        self.actor_entry.set_alignment(0, 0.5)
-        self.table.attach(self.actor_entry, 1, 2, 3, 4, xpadding = 6, ypadding =6)
+        self.actor_entry = Gtk.Label(xalign=0,yalign=0.5)
 
         actor_box = Gtk.HBox()
-        self.table.attach(actor_box, 2, 4, 3, 4, xpadding = 6, ypadding = 6)
-        self.image_entry = Gtk.Image()
-        self.image_entry.set_alignment(0, 0.5)
+        self.image_entry = Gtk.Image(xalign=0,yalign=0.5)
         actor_box.pack_start(self.image_entry, False, False, 6)
-        self.actor_name_entry = Gtk.Label()
-        self.actor_name_entry.set_alignment(0, 0.5)
+        self.actor_name_entry = Gtk.Label(xalign=0,yalign=0.5)
         actor_box.pack_start(self.actor_name_entry, False, False, 6)
 
-        uri_label = Gtk.Label()
+        uri_label = Gtk.Label(xalign=0,yalign=0.5)
         uri_label.set_markup("<b>%s</b>" %("URI"))
-        uri_label.set_alignment(0, 0.5)
-        self.table.attach(uri_label, 0, 1, 4, 5, xpadding = 6, ypadding = 6)
-
-        self.uri_entry = Gtk.Label()
-        self.uri_entry.set_alignment(0, 0.5)
-        self.table.attach(self.uri_entry, 1, 4, 4, 5, xpadding = 6, ypadding = 6)
-
-        current_uri_label = Gtk.Label()
+
+        self.uri_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        current_uri_label = Gtk.Label(xalign=0,yalign=0.5)
         current_uri_label.set_markup("<b>%s</b>" %("Current URI"))
-        current_uri_label.set_alignment(0, 0.5)
-        self.table.attach(current_uri_label, 0, 1, 5, 6, xpadding = 6, ypadding = 6)
-        
-        self.current_uri_entry = Gtk.Label()
-        self.current_uri_entry.set_alignment(0, 0.5)
-        self.table.attach(self.current_uri_entry, 1, 4, 5, 6, xpadding = 6, ypadding = 6)
-
-        subj_int_label = Gtk.Label()
+
+        self.current_uri_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        subj_int_label = Gtk.Label(xalign=0,yalign=0.5)
         subj_int_label.set_markup("<b>%s</b>" %("Interpretation"))
-        subj_int_label.set_alignment(0, 0.5)
-        self.table.attach(subj_int_label, 0, 1, 6, 7, xpadding = 6, ypadding = 6)
-
-        self.subj_int_entry = Gtk.Label()
-        self.subj_int_entry.set_alignment(0, 0.5)
-        self.table.attach(self.subj_int_entry, 1, 4, 6, 7, xpadding = 6, ypadding = 6)
-
-        subj_manifes_label = Gtk.Label()
+
+        self.subj_int_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        subj_manifes_label = Gtk.Label(xalign=0,yalign=0.5)
         subj_manifes_label.set_markup("<b>%s</b>" %("Manifestation"))
-        subj_manifes_label.set_alignment(0, 0.5)
-        self.table.attach(subj_manifes_label, 0, 1, 7, 8, xpadding = 6, ypadding = 6)
-
-        self.subj_manifes_entry = Gtk.Label()
-        self.subj_manifes_entry.set_alignment(0, 0.5)
-        self.table.attach(self.subj_manifes_entry, 1, 4, 7, 8, xpadding = 6, ypadding = 6)
-
-
-        origin_label = Gtk.Label()
+
+        self.subj_manifes_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+
+        origin_label = Gtk.Label(xalign=0,yalign=0.5)
         origin_label.set_markup("<b>%s</b>" %("Origin"))
-        origin_label.set_alignment(0, 0.5)
-        self.table.attach(origin_label, 0, 1, 8, 9, xpadding = 6, ypadding = 6)
-
-        self.origin_entry = Gtk.Label()
-        self.origin_entry.set_alignment(0, 0.5)
-        self.table.attach(self.origin_entry, 1, 2, 8, 9, xpadding = 6, ypadding =6)
-
-        mimetype_label = Gtk.Label()
+
+        self.origin_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        mimetype_label = Gtk.Label(xalign=0,yalign=0.5)
         mimetype_label.set_markup("<b>%s</b>" %("Mimetype"))
-        mimetype_label.set_alignment(0, 0.5)
-        self.table.attach(mimetype_label, 2, 3, 8, 9, xpadding = 6, ypadding = 6)
-
-        self.mime_entry = Gtk.Label()
-        self.mime_entry.set_alignment(0, 0.5)
-        self.table.attach(self.mime_entry, 3, 4, 8, 9, xpadding = 6, ypadding = 6)
-
-        text_label = Gtk.Label()
+
+        self.mime_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        text_label = Gtk.Label(xalign=0,yalign=0.5)
         text_label.set_markup("<b>%s</b>" %("Text"))
-        text_label.set_alignment(0, 0.5)
-        self.table.attach(text_label, 0, 1, 9, 10, xpadding = 6, ypadding = 6)
-
-        self.text_entry = Gtk.Label()
-        self.text_entry.set_alignment(0, 0.5)
-        self.table.attach(self.text_entry, 1, 2, 9, 10, xpadding = 6, ypadding =6)
-
-        storage_label = Gtk.Label()
+
+        self.text_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        storage_label = Gtk.Label(xalign=0,yalign=0.5)
         storage_label.set_markup("<b>%s</b>" %("Storage"))
-        storage_label.set_alignment(0, 0.5)
-        self.table.attach(storage_label, 2, 3, 9, 10, xpadding = 6, ypadding = 6)
-        
-        self.storage_entry = Gtk.Label()
-        self.storage_entry.set_alignment(0, 0.5)
-        self.table.attach(self.storage_entry, 3, 4, 9, 10, xpadding = 6, ypadding = 6)
+
+        self.storage_entry = Gtk.Label(xalign=0,yalign=0.5)
+
+        attach_list = (
+            (id_label,(0, 1, 0, 1)),
+            (self.id_entry,(1, 2, 0, 1)),
+            (time_label,(2, 3, 0, 1)),
+            (self.time_entry,(3, 4, 0, 1)),
+            (event_int_label,(0, 1, 1, 2)),
+            (self.event_int_entry,(1, 4, 1, 2)),
+            (event_manifes_label,(0, 1, 2, 3)),
+            (self.event_manifes_entry,(1, 4, 2, 3)),
+            (actor_label,(0, 1, 3, 4)),
+            (self.actor_entry,(1, 2, 3, 4)),
+            (actor_box,(2, 4, 3, 4)),
+            (uri_label,(0, 1, 4, 5)),
+            (self.uri_entry,(1, 4, 4, 5)),
+            (current_uri_label,(0, 1, 5, 6)),
+            (self.current_uri_entry,(1, 4, 5, 6)),
+            (subj_int_label,(0, 1, 6, 7)),
+            (self.subj_int_entry,(1, 4, 6, 7)),
+            (subj_manifes_label,(0, 1, 7, 8)),
+            (self.subj_manifes_entry,(1, 4, 7, 8)),
+            (origin_label,(0, 1, 8, 9)),
+            (self.origin_entry,(1, 2, 8, 9)),
+            (mimetype_label,(2, 3, 8, 9)),
+            (self.mime_entry,(3, 4, 8, 9)),
+            (text_label,(0, 1, 9, 10)),
+            (self.text_entry,(1, 2, 9, 10)),
+            (storage_label,(2, 3, 9, 10)),
+            (self.storage_entry,(3, 4, 9, 10))
+         )
+        for widget_entry in attach_list :
+           widget,pos = widget_entry
+           self.table.attach(widget,pos[0],pos[1], pos[2], pos[3], xpadding=6, ypadding=6)
+
 
 
     def map(self, event):

=== modified file 'zgexplorer/filtermanager.py' (properties changed: -x to +x)
--- zgexplorer/filtermanager.py	2012-03-13 20:59:11 +0000
+++ zgexplorer/filtermanager.py	2012-03-14 22:39:19 +0000
@@ -9,12 +9,12 @@
 # under the terms of the GNU Lesser General Public License as published
 # by the Free Software Foundation, either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 # See the GNU Lesser General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU Lesser General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 #
@@ -29,15 +29,13 @@
     def __init__(self):
         super(FilterManagerDialog, self).__init__()
         self.set_destroy_with_parent(True)
-        self.set_title("Filter Manager")
+        self.set_properties('title',"Filter Manager",'margin',12,'content-area-spacing',6) #Check Value
         self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
         self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
         self.set_size_request(600, 700)
-        self.spacing = 6
-        self.margin = 12
-
-        box = self.get_content_area() 
-        
+
+        box = self.get_content_area()
+
         self.notebook = Gtk.Notebook()
         box.pack_start(self.notebook, True, True, 0)
 
@@ -49,7 +47,7 @@
     def add_predefined_tab(self):
         self.predefined_box = Gtk.VBox()
         self.notebook.append_page(self.predefined_box, Gtk.Label("Predefined Filter"))
-        
+
         self.predefined_store = Gtk.ListStore(int, str)
         self.builtin = BuiltInFilters()
         for i in self.builtin:
@@ -59,22 +57,18 @@
         self.predefined_view.connect("cursor-changed", self.on_cursor_changed)
         column_pix_name = Gtk.TreeViewColumn(_('Name'))
         self.predefined_view.append_column(column_pix_name)
-        name_rend = Gtk.CellRendererText()
-        name_rend.set_property("ellipsize", Pango.EllipsizeMode.END)
+        name_rend = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END)
         column_pix_name.pack_start(name_rend, False)
         column_pix_name.add_attribute(name_rend, "markup", 1)
         column_pix_name.set_resizable(True)
 
-        self.predefined_view.set_headers_visible(False)
-        self.predefined_view.set_rules_hint(True)
-        
-        self.predefined_scroll = Gtk.ScrolledWindow()
+        self.predefined_view.set_properties('headers-visible',False,'rules-hint',True)
+
+        self.predefined_scroll = Gtk.ScrolledWindow(shadow_type=Gtk.ShadowType.IN,border_width=1)
         self.predefined_scroll.add(self.predefined_view)
         self.predefined_scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
-        self.predefined_scroll.set_shadow_type(Gtk.ShadowType.IN)
-        self.predefined_scroll.set_border_width(1)
         self.predefined_box.pack_start(self.predefined_scroll, True, True, 6)
-        
+
         # See the Template values
         self.predefined_viewer = TemplateViewer()
         self.predefined_viewer.set_fields_enable(False)
@@ -91,22 +85,18 @@
 
         column_pix_name = Gtk.TreeViewColumn(_('Name'))
         self.custom_view.append_column(column_pix_name)
-        name_rend = Gtk.CellRendererText()
-        name_rend.set_property("ellipsize", Pango.EllipsizeMode.END)
+        name_rend = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END)
         column_pix_name.pack_start(name_rend, False)
         column_pix_name.add_attribute(name_rend, "markup", 1)
         column_pix_name.set_resizable(True)
 
-        self.custom_view.set_headers_visible(False)
-        self.custom_view.set_rules_hint(True)
-        
-        self.custom_scroll = Gtk.ScrolledWindow()
+        self.custom_view.set_properties('headers-visible',False,'rules-hint',True)
+
+        self.custom_scroll = Gtk.ScrolledWindow(shadow_type=Gtk.ShadowType.IN,border_width=1)
         self.custom_scroll.add(self.custom_view)
         self.custom_scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
-        self.custom_scroll.set_shadow_type(Gtk.ShadowType.IN)
-        self.custom_scroll.set_border_width(1)
         self.custom_box.pack_start(self.custom_scroll, True, True, 6)
-        
+
         # See the Template values
         self.custom_viewer = TemplateViewer()
         self.custom_viewer.set_fields_enable(False)
@@ -140,7 +130,7 @@
     def on_cursor_changed(self, treeview):
         index = self.get_selected_index()
         if index is not None:
-            self.predefined_viewer.set_values(self.builtin[index]) 
+            self.predefined_viewer.set_values(self.builtin[index])
 
     def on_custom_cursor_changed(self, treeview):
         pass

=== modified file 'zgexplorer/monitorviewer.py' (properties changed: -x to +x)
--- zgexplorer/monitorviewer.py	2012-03-12 20:57:29 +0000
+++ zgexplorer/monitorviewer.py	2012-03-14 22:39:19 +0000
@@ -9,12 +9,12 @@
 # under the terms of the GNU Lesser General Public License as published
 # by the Free Software Foundation, either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 # See the GNU Lesser General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU Lesser General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 #
@@ -45,50 +45,36 @@
 
         self.spacing = 6
         self.margin = 12
-        
+
         self.builtin = BuiltInFilters()
 
-        #desc_label = Gtk.Label()
-        #desc_label.set_alignment(0, 0)
-        #desc_label.set_markup("<b>%s</b>" %("Description"))
-        #self.pack_start(desc_label, False, False, 6)
-
-        self.desc_entry = Gtk.Label()
-        self.desc_entry.set_alignment(0, 0)
-        self.desc_entry.set_line_wrap(True)
-        self.desc_entry.set_line_wrap_mode(Pango.WrapMode.WORD)
+        self.desc_entry = Gtk.Label(xalign=0,yalign=0,wrap=True)
         self.pack_start(self.desc_entry, False, False, 6)
 
 
         # ButtonBox
-        self.button_box = Gtk.HButtonBox()
-        self.button_box.set_homogeneous(False)
+        self.button_box = Gtk.HButtonBox(False)
         self.button_box.set_layout(Gtk.ButtonBoxStyle.START)
         self.pack_start(self.button_box, False, False, 6)
 
-        self.start = Gtk.Button()
-        self.start.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_MEDIA_PLAY, 
-                Gtk.IconSize.BUTTON))
+        self.start = Gtk.Button(image=Gtk.Image.new_from_stock(
+            Gtk.STOCK_MEDIA_PLAY,Gtk.IconSize.BUTTON))
         self.start.connect("clicked", self.start_monitor)
         self.button_box.pack_start(self.start, False, False, 6)
 
-        self.stop = Gtk.Button()
-        self.stop.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_MEDIA_STOP,
-                Gtk.IconSize.BUTTON))
+        self.stop = Gtk.Button(image= Gtk.Image.new_from_stock(
+            Gtk.STOCK_MEDIA_STOP,Gtk.IconSize.BUTTON))
         self.stop.connect("clicked", self.stop_monitor)
         self.stop.set_sensitive(False)
         self.button_box.pack_start(self.stop, False, False, 6)
 
-        self.clear = Gtk.Button()
-        self.clear.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_CLEAR,
-                Gtk.IconSize.BUTTON))
+        self.clear = Gtk.Button(image=Gtk.Image.new_from_stock(
+            Gtk.STOCK_CLEAR,Gtk.IconSize.BUTTON))
         self.clear.connect("clicked", self.clear_events)
         self.button_box.pack_start(self.clear, False, False, 6)
 
-        self.scroll = Gtk.ScrolledWindow(None, None)
+        self.scroll = Gtk.ScrolledWindow(None, None,border_width=1,shadow_type=Gtk.ShadowType.IN)
         self.scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
-        self.scroll.set_shadow_type(Gtk.ShadowType.IN)
-        self.scroll.set_border_width(1)
         self.pack_start(self.scroll, True, True, 6)
 
         # Event Id, TimeStamp, Interpretation, Manifestation, Actor
@@ -156,7 +142,7 @@
 
             timestamp = int(str(event.get_timestamp()))
             time = datetime.fromtimestamp(timestamp/1000).strftime("%Y-%m-%d %I:%M:%S %p")
-            
+
             actor = event.get_actor()
 
             event_inter = str(event.get_interpretation())

=== modified file 'zgexplorer/templates.py' (properties changed: -x to +x)
--- zgexplorer/templates.py	2012-03-10 13:39:20 +0000
+++ zgexplorer/templates.py	2012-03-14 22:39:19 +0000
@@ -9,12 +9,12 @@
 # under the terms of the GNU Lesser General Public License as published
 # by the Free Software Foundation, either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 # See the GNU Lesser General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU Lesser General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 #
@@ -31,7 +31,7 @@
                    template1,\
                    TimeRange.always(), \
                    ResultType.MostRecentEvents]
-        
+
         template2  = Event.new_for_values(interpretation = \
             Interpretation.ACCESS_EVENT)
         self[1] = ["Access Events", \

=== modified file 'zgexplorer/window.py' (properties changed: -x to +x)
--- zgexplorer/window.py	2012-03-13 20:59:11 +0000
+++ zgexplorer/window.py	2012-03-14 22:39:19 +0000
@@ -9,12 +9,12 @@
 # under the terms of the GNU Lesser General Public License as published
 # by the Free Software Foundation, either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 # See the GNU Lesser General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU Lesser General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 #
@@ -34,7 +34,7 @@
         self.connect("destroy", Gtk.main_quit)
         self.set_title("Zeitgeist Explorer")
         self.set_size_request(1400, 900)
-        
+
         self.client = ZeitgeistClient()
 
         main_box = Gtk.VBox()
@@ -45,19 +45,15 @@
         toolbar = Gtk.Toolbar()
 
         # New Tool Item
-        toolitem_new = Gtk.ToolButton()
-        toolitem_new.set_label("New")
-        toolitem_new.set_icon_name("add")
+        toolitem_new = Gtk.ToolButton(label="New",icon_name="add")
         toolitem_new.connect("clicked", self.toolitem_new_clicked)
         toolbar.insert(toolitem_new, -1)
 
         # Load Tool Item
-        toolitem_load = Gtk.ToolButton()
-        toolitem_load.set_stock_id(Gtk.STOCK_OPEN)
-        toolitem_load.set_label("Load")
-        toolitem_load.connect("clicked", self.toolitem_load_clicked) 
+        toolitem_load = Gtk.ToolButton(stock_id=Gtk.STOCK_OPEN,label="Load")
+        toolitem_load.connect("clicked", self.toolitem_load_clicked)
         toolbar.insert(toolitem_load, -1)
-        
+
         #main_box.pack_start(toolbar, False, True, 0)
 
         self.filter_manager = FilterManagerDialog()
@@ -84,7 +80,7 @@
 
 
 class MonitorWindow(Gtk.VBox):
-    
+
     monitor_builtin = {}
     monitor_custom = {}
     selected_monitor_view = None
@@ -107,10 +103,8 @@
         self.monitor_tree = Gtk.TreeView(self.monitors)
         self.monitor_tree.connect("cursor-changed", self.on_treeview_selected)
         self.monitor_tree.set_size_request(200, 600)
-        self.monitor_tree.set_border_width(1)
-        self.monitor_tree.set_visible(True)
-        self.monitor_tree.set_rules_hint(True)
-        self.monitor_tree.set_headers_visible(False)
+        self.monitor_tree.set_properties('border_width',1,'visible',True
+                            ,'rules_hint',True,'headers_visible',False)
 
         scroll = Gtk.ScrolledWindow(None, None)
         scroll.add(self.monitor_tree)
@@ -121,15 +115,13 @@
 
         column_pix_name = Gtk.TreeViewColumn(_('Name'))
         self.monitor_tree.append_column(column_pix_name)
-        name_rend = Gtk.CellRendererText()
-        name_rend.set_property("ellipsize", Pango.EllipsizeMode.END)
+        name_rend = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END)
         column_pix_name.pack_start(name_rend, False)
         column_pix_name.add_attribute(name_rend, "markup", 1)
         column_pix_name.set_resizable(True)
 
-        self.toolbar = Gtk.Toolbar()
+        self.toolbar = Gtk.Toolbar(icon_size=1)
         self.toolbar.set_style(Gtk.ToolbarStyle.ICONS)
-        self.toolbar.set_icon_size(1)
         self.toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR)
         self.toolbar.get_style_context().set_junction_sides(Gtk.JunctionSides.TOP)
         list_vbox.pack_start(self.toolbar, False, False, 0)
@@ -221,34 +213,27 @@
         super(ExplorerWindow, self).__init__()
 
 class ConfirmMonitorStop(Gtk.Dialog):
-    
+
     def __init__(self):
         super(ConfirmMonitorStop, self).__init__()
-        self.margin = 6
-        self.padding = 12
-        self.set_title("Confirm Monitor Stop")
-        self.set_resizable(False)
-        self.set_modal(True)
-        self.set_decorated(False)
+        self.set_properties('margin',6,'padding',12,'title',
+            "Confirm Monitor Stop",'resizable',False,'modal',True,'decorated',False)
         self.set_size_request(100, 50)
 
         self.add_button(Gtk.STOCK_YES, Gtk.ResponseType.YES)
         self.add_button(Gtk.STOCK_NO, Gtk.ResponseType.NO)
 
         box = self.get_content_area()
-        
-        label1 = Gtk.Label()
-        label1.set_markup("<b>%s</b>" 
+
+        label1 = Gtk.Label(xalign=0,yalign=0.5,margin_top=12,
+                            margin_right=12,margin_left=12)
+        label1.set_markup("<b>%s</b>"
         %("The monitor which you are trying to remove is still running"))
-        label1.set_alignment(0, 0.5)
-        label1.set_margin_top(12)
-        label1.set_margin_left(12)
-        label1.set_margin_right(12)
-        label2 = Gtk.Label()
+
+        label2 = Gtk.Label(xalign=0,yalign=0.5,margin_top=12,
+                            margin_right=12,margin_left=12)
         label2.set_markup("Going ahead will stop the monitor before removing it")
-        label2.set_alignment(0, 0.5)
-        label2.set_margin_left(12)
-        label2.set_margin_right(12)
+
         box.pack_start(label1, False, False, 6)
         box.pack_start(label2, False, False, 6)
 


Follow ups