Merge lp:~dhananjaysathe/zeitgeist-explorer/zeitgeist-explorer into lp:~zeitgeist/zeitgeist-explorer/trunk
- zeitgeist-explorer
- Merge into trunk
Proposed by
dhananjaysathe
Status: | Merged |
---|---|
Merged at revision: | 14 |
Proposed branch: | lp:~dhananjaysathe/zeitgeist-explorer/zeitgeist-explorer |
Merge into: | lp:~zeitgeist/zeitgeist-explorer/trunk |
Diff against target: |
765 lines (+190/-264) 5 files modified
zgexplorer/eventwidgets.py (+133/-168) zgexplorer/filtermanager.py (+18/-28) zgexplorer/monitorviewer.py (+13/-27) zgexplorer/templates.py (+3/-3) zgexplorer/window.py (+23/-38) |
To merge this branch: | bzr merge lp:~dhananjaysathe/zeitgeist-explorer/zeitgeist-explorer |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Manish Sinha (मनीष सिन्हा) | Approve | ||
Review via email: mp+97531@code.launchpad.net |
Commit message
Description of the change
Gtk3 code refactoring
To post a comment you must log in.
Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote : | # |
review:
Approve
- 14. By dhananjaysathe
-
Modified the code to use new style Gtk3, no other changes
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' (properties changed: -x to +x) | |||
2 | === modified file 'zgexplorer/__init__.py' (properties changed: -x to +x) | |||
3 | === modified file 'zgexplorer/eventwidgets.py' (properties changed: -x to +x) | |||
4 | --- zgexplorer/eventwidgets.py 2012-03-12 20:57:29 +0000 | |||
5 | +++ zgexplorer/eventwidgets.py 2012-03-14 22:39:19 +0000 | |||
6 | @@ -9,12 +9,12 @@ | |||
7 | 9 | # under the terms of the GNU Lesser General Public License as published | 9 | # under the terms of the GNU Lesser General Public License as published |
8 | 10 | # by the Free Software Foundation, either version 2 of the License, or | 10 | # by the Free Software Foundation, either version 2 of the License, or |
9 | 11 | # (at your option) any later version. | 11 | # (at your option) any later version. |
11 | 12 | # | 12 | # |
12 | 13 | # This program is distributed in the hope that it will be useful, but | 13 | # This program is distributed in the hope that it will be useful, but |
13 | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
15 | 16 | # See the GNU Lesser General Public License for more details. | 16 | # See the GNU Lesser General Public License for more details. |
17 | 17 | # | 17 | # |
18 | 18 | # You should have received a copy of the GNU Lesser General Public License | 18 | # You should have received a copy of the GNU Lesser General Public License |
19 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; |
20 | 20 | # | 20 | # |
21 | @@ -30,59 +30,38 @@ | |||
22 | 30 | super(TimeRangeViewer, self).__init__() | 30 | super(TimeRangeViewer, self).__init__() |
23 | 31 | 31 | ||
24 | 32 | timerange_label = Gtk.Label("Time Range") | 32 | timerange_label = Gtk.Label("Time Range") |
37 | 33 | self.pack_start(timerange_label, False, False, 12) | 33 | self.pack_start(timerange_label,False,False,12) |
38 | 34 | 34 | ||
39 | 35 | self.always_radio = Gtk.RadioButton() | 35 | self.always_radio = Gtk.RadioButton(label= "Always",margin_left= 24) |
40 | 36 | self.always_radio.set_label("Always") | 36 | self.pack_start(self.always_radio,False,False,12) |
41 | 37 | self.always_radio.set_margin_left(24) | 37 | |
42 | 38 | self.pack_start(self.always_radio, False, False, 12) | 38 | self.custom_radio = Gtk.RadioButton(label= "Custom",margin_left= 24) |
43 | 39 | 39 | self.custom_radio.join_group(self.always_radio) | |
44 | 40 | self.custom_radio = Gtk.RadioButton.new_from_widget(self.always_radio) | 40 | self.pack_start(self.custom_radio,False,False,12) |
33 | 41 | self.custom_radio.set_label("Custom") | ||
34 | 42 | self.custom_radio.set_margin_left(24) | ||
35 | 43 | self.pack_start(self.custom_radio, False, False, 12) | ||
36 | 44 | |||
45 | 45 | 41 | ||
46 | 46 | 42 | ||
47 | 47 | class TemplateViewer(Gtk.VBox): | 43 | class TemplateViewer(Gtk.VBox): |
48 | 48 | def __init__(self): | 44 | def __init__(self): |
49 | 49 | super(TemplateViewer, self).__init__() | 45 | super(TemplateViewer, self).__init__() |
50 | 50 | 46 | ||
53 | 51 | self.table = Gtk.Table(10, 2, False) | 47 | self.table = Gtk.Table(10, 2, False,border_width=1) |
52 | 52 | self.table.set_border_width(1) | ||
54 | 53 | self.pack_start(self.table, True, True, 0) | 48 | self.pack_start(self.table, True, True, 0) |
55 | 54 | 49 | ||
56 | 55 | event_label = Gtk.Label() | 50 | event_label = Gtk.Label() |
57 | 56 | event_label.set_markup("Event") | 51 | event_label.set_markup("Event") |
58 | 57 | self.table.attach(event_label, 0, 2, 0, 1, xpadding=6, ypadding=6) | ||
59 | 58 | 52 | ||
60 | 59 | # Event Interpretation | 53 | # Event Interpretation |
61 | 60 | event_inter_label = Gtk.Label("Interpretation") | 54 | event_inter_label = Gtk.Label("Interpretation") |
66 | 61 | self.table.attach(event_inter_label, 0, 1, 1, 2, xpadding=6, ypadding=6) | 55 | self.event_inter_entry = Gtk.Entry(width_chars=40) |
63 | 62 | self.event_inter_entry = Gtk.Entry() | ||
64 | 63 | self.event_inter_entry.set_width_chars(40) | ||
65 | 64 | self.table.attach(self.event_inter_entry, 1, 2, 1, 2, xpadding=6, ypadding=6) | ||
67 | 65 | 56 | ||
68 | 66 | # Event Manifesation | 57 | # Event Manifesation |
69 | 67 | event_manifes_label = Gtk.Label("Manifestation") | 58 | event_manifes_label = Gtk.Label("Manifestation") |
79 | 68 | self.table.attach(event_manifes_label, 0, 1, 2, 3, xpadding=6, ypadding=6) | 59 | self.event_manifes_entry = Gtk.Entry(width_chars=40) |
71 | 69 | self.event_manifes_entry = Gtk.Entry() | ||
72 | 70 | self.event_manifes_entry.set_width_chars(40) | ||
73 | 71 | self.table.attach(self.event_manifes_entry, 1, 2, 2, 3, xpadding=6, ypadding=6) | ||
74 | 72 | |||
75 | 73 | # Event Actor | ||
76 | 74 | #actor_hbox = Gtk.HBox() | ||
77 | 75 | #actor_hbox.set_margin_bottom(6) | ||
78 | 76 | #self.table.attach(actor_hbox, 0, 2, 3, 4) | ||
80 | 77 | 60 | ||
81 | 78 | actor_label = Gtk.Label("Actor") | 61 | actor_label = Gtk.Label("Actor") |
89 | 79 | self.table.attach(actor_label, 0, 1, 3, 4, xpadding=6, ypadding=6) | 62 | self.actor_entry = Gtk.Entry(width_chars=40) |
90 | 80 | self.actor_entry = Gtk.Entry() | 63 | |
91 | 81 | self.table.attach(self.actor_entry, 1, 2, 3, 4, xpadding=6, ypadding=6) | 64 | actor_hbox = Gtk.HBox(margin_bottom=6) |
85 | 82 | |||
86 | 83 | actor_hbox = Gtk.HBox() | ||
87 | 84 | actor_hbox.set_margin_bottom(6) | ||
88 | 85 | self.table.attach(actor_hbox, 1, 2, 4, 5, xpadding=6, ypadding=6) | ||
92 | 86 | self.actor_button = Gtk.Button() | 65 | self.actor_button = Gtk.Button() |
93 | 87 | self.actor_button.set_size_request(32, 32) | 66 | self.actor_button.set_size_request(32, 32) |
94 | 88 | actor_hbox.pack_start(self.actor_button, False, False, 12) | 67 | actor_hbox.pack_start(self.actor_button, False, False, 12) |
95 | @@ -91,38 +70,46 @@ | |||
96 | 91 | 70 | ||
97 | 92 | subj_label = Gtk.Label() | 71 | subj_label = Gtk.Label() |
98 | 93 | subj_label.set_markup("Subject") | 72 | subj_label.set_markup("Subject") |
99 | 94 | self.table.attach(subj_label, 0, 2, 5, 6, xpadding=6, ypadding=6) | ||
100 | 95 | 73 | ||
101 | 96 | 74 | ||
102 | 97 | # Subject Interpretation | 75 | # Subject Interpretation |
103 | 98 | subj_inter_label = Gtk.Label("Interpretation") | 76 | subj_inter_label = Gtk.Label("Interpretation") |
108 | 99 | self.table.attach(subj_inter_label, 0, 1, 6, 7, xpadding=6, ypadding=6) | 77 | self.subj_inter_entry = Gtk.Entry(width_chars=40) |
105 | 100 | self.subj_inter_entry = Gtk.Entry() | ||
106 | 101 | self.subj_inter_entry.set_width_chars(40) | ||
107 | 102 | self.table.attach(self.subj_inter_entry, 1, 2, 6, 7, xpadding=6, ypadding=6) | ||
109 | 103 | 78 | ||
110 | 104 | # Subject Manifesation | 79 | # Subject Manifesation |
111 | 105 | subj_manifes_label = Gtk.Label("Manifestation") | 80 | subj_manifes_label = Gtk.Label("Manifestation") |
116 | 106 | self.table.attach(subj_manifes_label, 0, 1, 7, 8, xpadding=6, ypadding=6) | 81 | self.subj_manifes_entry = Gtk.Entry(width_chars=40) |
113 | 107 | self.subj_manifes_entry = Gtk.Entry() | ||
114 | 108 | self.subj_manifes_entry.set_width_chars(40) | ||
115 | 109 | self.table.attach(self.subj_manifes_entry, 1, 2, 7, 8, xpadding=6, ypadding=6) | ||
117 | 110 | 82 | ||
118 | 111 | # Mimetype | 83 | # Mimetype |
119 | 112 | mimetype_label = Gtk.Label("Mimetype") | 84 | mimetype_label = Gtk.Label("Mimetype") |
125 | 113 | self.table.attach(mimetype_label, 0, 1, 8, 9, xpadding=6, ypadding=6) | 85 | self.mimetype_entry = Gtk.Entry(width_chars=40) |
126 | 114 | self.mimetype_entry = Gtk.Entry() | 86 | |
122 | 115 | self.mimetype_entry.set_width_chars(40) | ||
123 | 116 | self.table.attach(self.mimetype_entry, 1, 2, 8, 9, xpadding=6, ypadding=6) | ||
124 | 117 | |||
127 | 118 | # Storage | 87 | # Storage |
128 | 119 | storage_label = Gtk.Label("Storage") | 88 | storage_label = Gtk.Label("Storage") |
135 | 120 | self.table.attach(storage_label, 0, 1, 9, 10, xpadding=6, ypadding=6) | 89 | self.storage_entry = Gtk.Entry(width_chars=40) |
136 | 121 | self.storage_entry = Gtk.Entry() | 90 | |
137 | 122 | self.storage_entry.set_width_chars(40) | 91 | attach_list = ( |
138 | 123 | self.table.attach(self.storage_entry, 1, 2, 9, 10, xpadding=6, ypadding=6) | 92 | (event_label,(0, 2, 0, 1)), |
139 | 124 | 93 | (event_inter_label,(0, 1, 1, 2)), | |
140 | 125 | self.show_all() | 94 | (self.event_inter_entry,(1, 2, 1, 2)), |
141 | 95 | (event_manifes_label,(0, 1, 2, 3)), | ||
142 | 96 | (self.event_manifes_entry,(1, 2, 2, 3)), | ||
143 | 97 | (actor_label,(0, 1, 3, 4)), | ||
144 | 98 | (self.actor_entry,(1, 2, 3, 4)), | ||
145 | 99 | (actor_hbox,(1, 2, 4, 5)), | ||
146 | 100 | (subj_label,(0, 2, 5, 6)), | ||
147 | 101 | (subj_inter_label,(0, 1, 6, 7)), | ||
148 | 102 | (self.subj_inter_entry,(1, 2, 6, 7)), | ||
149 | 103 | (subj_manifes_label,(0, 1, 7, 8)), | ||
150 | 104 | (self.subj_manifes_entry,(1, 2, 7, 8)), | ||
151 | 105 | (mimetype_label,(0, 1, 8, 9)), | ||
152 | 106 | (self.mimetype_entry,(1, 2, 8, 9)), | ||
153 | 107 | (storage_label,(0, 1, 9, 10)), | ||
154 | 108 | (self.storage_entry,(1, 2, 9, 10)) | ||
155 | 109 | ) | ||
156 | 110 | for widget_entry in attach_list : | ||
157 | 111 | widget,pos = widget_entry | ||
158 | 112 | self.table.attach(widget,pos[0],pos[1], pos[2], pos[3], xpadding=6, ypadding=6) | ||
159 | 126 | 113 | ||
160 | 127 | def set_fields_enable(self, enable): | 114 | def set_fields_enable(self, enable): |
161 | 128 | self.event_inter_entry.set_sensitive(enable) | 115 | self.event_inter_entry.set_sensitive(enable) |
162 | @@ -178,10 +165,10 @@ | |||
163 | 178 | if type(subj_inter) is Symbol else "") | 165 | if type(subj_inter) is Symbol else "") |
164 | 179 | self.subj_inter_entry.set_tooltip_text(subj_inter.doc \ | 166 | self.subj_inter_entry.set_tooltip_text(subj_inter.doc \ |
165 | 180 | if type(subj_inter) is Symbol else "") | 167 | if type(subj_inter) is Symbol else "") |
167 | 181 | 168 | ||
168 | 182 | # Event Manifestation | 169 | # Event Manifestation |
169 | 183 | subj_manifes = subj.get_manifestation() | 170 | subj_manifes = subj.get_manifestation() |
171 | 184 | self.subj_manifes_entry.set_text(subj_manifes.name | 171 | self.subj_manifes_entry.set_text(subj_manifes.name |
172 | 185 | if type(subj_manifes) is Symbol else "") | 172 | if type(subj_manifes) is Symbol else "") |
173 | 186 | self.subj_manifes_entry.set_tooltip_text(subj_manifes.doc \ | 173 | self.subj_manifes_entry.set_tooltip_text(subj_manifes.doc \ |
174 | 187 | if type(subj_manifes) is Symbol else "") | 174 | if type(subj_manifes) is Symbol else "") |
175 | @@ -194,136 +181,114 @@ | |||
176 | 194 | def __init__(self): | 181 | def __init__(self): |
177 | 195 | super(EventViewer, self).__init__() | 182 | super(EventViewer, self).__init__() |
178 | 196 | 183 | ||
180 | 197 | self.table = Gtk.Table(18, 4, False) | 184 | self.table = Gtk.Table(18, 4, False,border_width=1) |
181 | 198 | self.pack_start(self.table, False, False, 6) | 185 | self.pack_start(self.table, False, False, 6) |
182 | 199 | self.table.set_border_width(1) | ||
183 | 200 | 186 | ||
185 | 201 | id_label = Gtk.Label() | 187 | id_label = Gtk.Label(xalign=0,yalign=0.5) |
186 | 202 | id_label.set_markup("<b>%s</b>" %("Event ID")) | 188 | id_label.set_markup("<b>%s</b>" %("Event ID")) |
195 | 203 | id_label.set_alignment(0, 0.5) | 189 | |
196 | 204 | self.table.attach(id_label, 0, 1, 0, 1, xpadding = 6, ypadding =6 ) | 190 | self.id_entry = Gtk.Label(xalign=0,yalign=0.5) |
197 | 205 | 191 | ||
198 | 206 | self.id_entry = Gtk.Label() | 192 | time_label = Gtk.Label(xalign=0,yalign=0.5) |
191 | 207 | self.id_entry.set_alignment(0, 0.5) | ||
192 | 208 | self.table.attach(self.id_entry, 1, 2, 0, 1, xpadding = 6, ypadding =6) | ||
193 | 209 | |||
194 | 210 | time_label = Gtk.Label() | ||
199 | 211 | time_label.set_markup("<b>%s</b>" %("Timestamp")) | 193 | time_label.set_markup("<b>%s</b>" %("Timestamp")) |
208 | 212 | time_label.set_alignment(0, 0.5) | 194 | |
209 | 213 | self.table.attach(time_label, 2, 3, 0, 1, xpadding = 6, ypadding = 6) | 195 | self.time_entry = Gtk.Label(xalign=0,yalign=0.5) |
210 | 214 | 196 | ||
211 | 215 | self.time_entry = Gtk.Label() | 197 | event_int_label = Gtk.Label(xalign=0,yalign=0.5) |
204 | 216 | self.time_entry.set_alignment(0, 0.5) | ||
205 | 217 | self.table.attach(self.time_entry, 3, 4, 0, 1, xpadding = 6, ypadding = 6) | ||
206 | 218 | |||
207 | 219 | event_int_label = Gtk.Label() | ||
212 | 220 | event_int_label.set_markup("<b>%s</b>" %("Interpretation")) | 198 | event_int_label.set_markup("<b>%s</b>" %("Interpretation")) |
221 | 221 | event_int_label.set_alignment(0, 0.5) | 199 | |
222 | 222 | self.table.attach(event_int_label, 0, 1, 1, 2, xpadding = 6, ypadding = 6) | 200 | self.event_int_entry = Gtk.Label(xalign=0,yalign=0.5) |
223 | 223 | 201 | ||
224 | 224 | self.event_int_entry = Gtk.Label() | 202 | event_manifes_label = Gtk.Label(xalign=0,yalign=0.5) |
217 | 225 | self.event_int_entry.set_alignment(0, 0.5) | ||
218 | 226 | self.table.attach(self.event_int_entry, 1, 4, 1, 2, xpadding = 6, ypadding = 6) | ||
219 | 227 | |||
220 | 228 | event_manifes_label = Gtk.Label() | ||
225 | 229 | event_manifes_label.set_markup("<b>%s</b>" %("Manifestation")) | 203 | event_manifes_label.set_markup("<b>%s</b>" %("Manifestation")) |
234 | 230 | event_manifes_label.set_alignment(0, 0.5) | 204 | |
235 | 231 | self.table.attach(event_manifes_label, 0, 1, 2, 3, xpadding = 6, ypadding = 6) | 205 | self.event_manifes_entry = Gtk.Label(xalign=0,yalign=0.5) |
236 | 232 | 206 | ||
237 | 233 | self.event_manifes_entry = Gtk.Label() | 207 | actor_label = Gtk.Label(xalign=0,yalign=0.5) |
230 | 234 | self.event_manifes_entry.set_alignment(0, 0.5) | ||
231 | 235 | self.table.attach(self.event_manifes_entry, 1, 4, 2, 3, xpadding = 6, ypadding = 6) | ||
232 | 236 | |||
233 | 237 | actor_label = Gtk.Label() | ||
238 | 238 | actor_label.set_markup("<b>%s</b>" %("Actor")) | 208 | actor_label.set_markup("<b>%s</b>" %("Actor")) |
239 | 239 | actor_label.set_alignment(0, 0.5) | ||
240 | 240 | self.table.attach(actor_label, 0, 1, 3, 4, xpadding = 6, ypadding = 6) | ||
241 | 241 | 209 | ||
245 | 242 | self.actor_entry = Gtk.Label() | 210 | self.actor_entry = Gtk.Label(xalign=0,yalign=0.5) |
243 | 243 | self.actor_entry.set_alignment(0, 0.5) | ||
244 | 244 | self.table.attach(self.actor_entry, 1, 2, 3, 4, xpadding = 6, ypadding =6) | ||
246 | 245 | 211 | ||
247 | 246 | actor_box = Gtk.HBox() | 212 | actor_box = Gtk.HBox() |
251 | 247 | self.table.attach(actor_box, 2, 4, 3, 4, xpadding = 6, ypadding = 6) | 213 | self.image_entry = Gtk.Image(xalign=0,yalign=0.5) |
249 | 248 | self.image_entry = Gtk.Image() | ||
250 | 249 | self.image_entry.set_alignment(0, 0.5) | ||
252 | 250 | actor_box.pack_start(self.image_entry, False, False, 6) | 214 | actor_box.pack_start(self.image_entry, False, False, 6) |
255 | 251 | self.actor_name_entry = Gtk.Label() | 215 | self.actor_name_entry = Gtk.Label(xalign=0,yalign=0.5) |
254 | 252 | self.actor_name_entry.set_alignment(0, 0.5) | ||
256 | 253 | actor_box.pack_start(self.actor_name_entry, False, False, 6) | 216 | actor_box.pack_start(self.actor_name_entry, False, False, 6) |
257 | 254 | 217 | ||
259 | 255 | uri_label = Gtk.Label() | 218 | uri_label = Gtk.Label(xalign=0,yalign=0.5) |
260 | 256 | uri_label.set_markup("<b>%s</b>" %("URI")) | 219 | uri_label.set_markup("<b>%s</b>" %("URI")) |
269 | 257 | uri_label.set_alignment(0, 0.5) | 220 | |
270 | 258 | self.table.attach(uri_label, 0, 1, 4, 5, xpadding = 6, ypadding = 6) | 221 | self.uri_entry = Gtk.Label(xalign=0,yalign=0.5) |
271 | 259 | 222 | ||
272 | 260 | self.uri_entry = Gtk.Label() | 223 | current_uri_label = Gtk.Label(xalign=0,yalign=0.5) |
265 | 261 | self.uri_entry.set_alignment(0, 0.5) | ||
266 | 262 | self.table.attach(self.uri_entry, 1, 4, 4, 5, xpadding = 6, ypadding = 6) | ||
267 | 263 | |||
268 | 264 | current_uri_label = Gtk.Label() | ||
273 | 265 | current_uri_label.set_markup("<b>%s</b>" %("Current URI")) | 224 | current_uri_label.set_markup("<b>%s</b>" %("Current URI")) |
282 | 266 | current_uri_label.set_alignment(0, 0.5) | 225 | |
283 | 267 | self.table.attach(current_uri_label, 0, 1, 5, 6, xpadding = 6, ypadding = 6) | 226 | self.current_uri_entry = Gtk.Label(xalign=0,yalign=0.5) |
284 | 268 | 227 | ||
285 | 269 | self.current_uri_entry = Gtk.Label() | 228 | subj_int_label = Gtk.Label(xalign=0,yalign=0.5) |
278 | 270 | self.current_uri_entry.set_alignment(0, 0.5) | ||
279 | 271 | self.table.attach(self.current_uri_entry, 1, 4, 5, 6, xpadding = 6, ypadding = 6) | ||
280 | 272 | |||
281 | 273 | subj_int_label = Gtk.Label() | ||
286 | 274 | subj_int_label.set_markup("<b>%s</b>" %("Interpretation")) | 229 | subj_int_label.set_markup("<b>%s</b>" %("Interpretation")) |
295 | 275 | subj_int_label.set_alignment(0, 0.5) | 230 | |
296 | 276 | self.table.attach(subj_int_label, 0, 1, 6, 7, xpadding = 6, ypadding = 6) | 231 | self.subj_int_entry = Gtk.Label(xalign=0,yalign=0.5) |
297 | 277 | 232 | ||
298 | 278 | self.subj_int_entry = Gtk.Label() | 233 | subj_manifes_label = Gtk.Label(xalign=0,yalign=0.5) |
291 | 279 | self.subj_int_entry.set_alignment(0, 0.5) | ||
292 | 280 | self.table.attach(self.subj_int_entry, 1, 4, 6, 7, xpadding = 6, ypadding = 6) | ||
293 | 281 | |||
294 | 282 | subj_manifes_label = Gtk.Label() | ||
299 | 283 | subj_manifes_label.set_markup("<b>%s</b>" %("Manifestation")) | 234 | subj_manifes_label.set_markup("<b>%s</b>" %("Manifestation")) |
309 | 284 | subj_manifes_label.set_alignment(0, 0.5) | 235 | |
310 | 285 | self.table.attach(subj_manifes_label, 0, 1, 7, 8, xpadding = 6, ypadding = 6) | 236 | self.subj_manifes_entry = Gtk.Label(xalign=0,yalign=0.5) |
311 | 286 | 237 | ||
312 | 287 | self.subj_manifes_entry = Gtk.Label() | 238 | |
313 | 288 | self.subj_manifes_entry.set_alignment(0, 0.5) | 239 | origin_label = Gtk.Label(xalign=0,yalign=0.5) |
305 | 289 | self.table.attach(self.subj_manifes_entry, 1, 4, 7, 8, xpadding = 6, ypadding = 6) | ||
306 | 290 | |||
307 | 291 | |||
308 | 292 | origin_label = Gtk.Label() | ||
314 | 293 | origin_label.set_markup("<b>%s</b>" %("Origin")) | 240 | origin_label.set_markup("<b>%s</b>" %("Origin")) |
323 | 294 | origin_label.set_alignment(0, 0.5) | 241 | |
324 | 295 | self.table.attach(origin_label, 0, 1, 8, 9, xpadding = 6, ypadding = 6) | 242 | self.origin_entry = Gtk.Label(xalign=0,yalign=0.5) |
325 | 296 | 243 | ||
326 | 297 | self.origin_entry = Gtk.Label() | 244 | mimetype_label = Gtk.Label(xalign=0,yalign=0.5) |
319 | 298 | self.origin_entry.set_alignment(0, 0.5) | ||
320 | 299 | self.table.attach(self.origin_entry, 1, 2, 8, 9, xpadding = 6, ypadding =6) | ||
321 | 300 | |||
322 | 301 | mimetype_label = Gtk.Label() | ||
327 | 302 | mimetype_label.set_markup("<b>%s</b>" %("Mimetype")) | 245 | mimetype_label.set_markup("<b>%s</b>" %("Mimetype")) |
336 | 303 | mimetype_label.set_alignment(0, 0.5) | 246 | |
337 | 304 | self.table.attach(mimetype_label, 2, 3, 8, 9, xpadding = 6, ypadding = 6) | 247 | self.mime_entry = Gtk.Label(xalign=0,yalign=0.5) |
338 | 305 | 248 | ||
339 | 306 | self.mime_entry = Gtk.Label() | 249 | text_label = Gtk.Label(xalign=0,yalign=0.5) |
332 | 307 | self.mime_entry.set_alignment(0, 0.5) | ||
333 | 308 | self.table.attach(self.mime_entry, 3, 4, 8, 9, xpadding = 6, ypadding = 6) | ||
334 | 309 | |||
335 | 310 | text_label = Gtk.Label() | ||
340 | 311 | text_label.set_markup("<b>%s</b>" %("Text")) | 250 | text_label.set_markup("<b>%s</b>" %("Text")) |
349 | 312 | text_label.set_alignment(0, 0.5) | 251 | |
350 | 313 | self.table.attach(text_label, 0, 1, 9, 10, xpadding = 6, ypadding = 6) | 252 | self.text_entry = Gtk.Label(xalign=0,yalign=0.5) |
351 | 314 | 253 | ||
352 | 315 | self.text_entry = Gtk.Label() | 254 | storage_label = Gtk.Label(xalign=0,yalign=0.5) |
345 | 316 | self.text_entry.set_alignment(0, 0.5) | ||
346 | 317 | self.table.attach(self.text_entry, 1, 2, 9, 10, xpadding = 6, ypadding =6) | ||
347 | 318 | |||
348 | 319 | storage_label = Gtk.Label() | ||
353 | 320 | storage_label.set_markup("<b>%s</b>" %("Storage")) | 255 | storage_label.set_markup("<b>%s</b>" %("Storage")) |
360 | 321 | storage_label.set_alignment(0, 0.5) | 256 | |
361 | 322 | self.table.attach(storage_label, 2, 3, 9, 10, xpadding = 6, ypadding = 6) | 257 | self.storage_entry = Gtk.Label(xalign=0,yalign=0.5) |
362 | 323 | 258 | ||
363 | 324 | self.storage_entry = Gtk.Label() | 259 | attach_list = ( |
364 | 325 | self.storage_entry.set_alignment(0, 0.5) | 260 | (id_label,(0, 1, 0, 1)), |
365 | 326 | self.table.attach(self.storage_entry, 3, 4, 9, 10, xpadding = 6, ypadding = 6) | 261 | (self.id_entry,(1, 2, 0, 1)), |
366 | 262 | (time_label,(2, 3, 0, 1)), | ||
367 | 263 | (self.time_entry,(3, 4, 0, 1)), | ||
368 | 264 | (event_int_label,(0, 1, 1, 2)), | ||
369 | 265 | (self.event_int_entry,(1, 4, 1, 2)), | ||
370 | 266 | (event_manifes_label,(0, 1, 2, 3)), | ||
371 | 267 | (self.event_manifes_entry,(1, 4, 2, 3)), | ||
372 | 268 | (actor_label,(0, 1, 3, 4)), | ||
373 | 269 | (self.actor_entry,(1, 2, 3, 4)), | ||
374 | 270 | (actor_box,(2, 4, 3, 4)), | ||
375 | 271 | (uri_label,(0, 1, 4, 5)), | ||
376 | 272 | (self.uri_entry,(1, 4, 4, 5)), | ||
377 | 273 | (current_uri_label,(0, 1, 5, 6)), | ||
378 | 274 | (self.current_uri_entry,(1, 4, 5, 6)), | ||
379 | 275 | (subj_int_label,(0, 1, 6, 7)), | ||
380 | 276 | (self.subj_int_entry,(1, 4, 6, 7)), | ||
381 | 277 | (subj_manifes_label,(0, 1, 7, 8)), | ||
382 | 278 | (self.subj_manifes_entry,(1, 4, 7, 8)), | ||
383 | 279 | (origin_label,(0, 1, 8, 9)), | ||
384 | 280 | (self.origin_entry,(1, 2, 8, 9)), | ||
385 | 281 | (mimetype_label,(2, 3, 8, 9)), | ||
386 | 282 | (self.mime_entry,(3, 4, 8, 9)), | ||
387 | 283 | (text_label,(0, 1, 9, 10)), | ||
388 | 284 | (self.text_entry,(1, 2, 9, 10)), | ||
389 | 285 | (storage_label,(2, 3, 9, 10)), | ||
390 | 286 | (self.storage_entry,(3, 4, 9, 10)) | ||
391 | 287 | ) | ||
392 | 288 | for widget_entry in attach_list : | ||
393 | 289 | widget,pos = widget_entry | ||
394 | 290 | self.table.attach(widget,pos[0],pos[1], pos[2], pos[3], xpadding=6, ypadding=6) | ||
395 | 291 | |||
396 | 327 | 292 | ||
397 | 328 | 293 | ||
398 | 329 | def map(self, event): | 294 | def map(self, event): |
399 | 330 | 295 | ||
400 | === modified file 'zgexplorer/filtermanager.py' (properties changed: -x to +x) | |||
401 | --- zgexplorer/filtermanager.py 2012-03-13 20:59:11 +0000 | |||
402 | +++ zgexplorer/filtermanager.py 2012-03-14 22:39:19 +0000 | |||
403 | @@ -9,12 +9,12 @@ | |||
404 | 9 | # under the terms of the GNU Lesser General Public License as published | 9 | # under the terms of the GNU Lesser General Public License as published |
405 | 10 | # by the Free Software Foundation, either version 2 of the License, or | 10 | # by the Free Software Foundation, either version 2 of the License, or |
406 | 11 | # (at your option) any later version. | 11 | # (at your option) any later version. |
408 | 12 | # | 12 | # |
409 | 13 | # This program is distributed in the hope that it will be useful, but | 13 | # This program is distributed in the hope that it will be useful, but |
410 | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
411 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
412 | 16 | # See the GNU Lesser General Public License for more details. | 16 | # See the GNU Lesser General Public License for more details. |
414 | 17 | # | 17 | # |
415 | 18 | # You should have received a copy of the GNU Lesser General Public License | 18 | # You should have received a copy of the GNU Lesser General Public License |
416 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; |
417 | 20 | # | 20 | # |
418 | @@ -29,15 +29,13 @@ | |||
419 | 29 | def __init__(self): | 29 | def __init__(self): |
420 | 30 | super(FilterManagerDialog, self).__init__() | 30 | super(FilterManagerDialog, self).__init__() |
421 | 31 | self.set_destroy_with_parent(True) | 31 | self.set_destroy_with_parent(True) |
423 | 32 | self.set_title("Filter Manager") | 32 | self.set_properties('title',"Filter Manager",'margin',12,'content-area-spacing',6) #Check Value |
424 | 33 | self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK) | 33 | self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK) |
425 | 34 | self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL) | 34 | self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL) |
426 | 35 | self.set_size_request(600, 700) | 35 | self.set_size_request(600, 700) |
432 | 36 | self.spacing = 6 | 36 | |
433 | 37 | self.margin = 12 | 37 | box = self.get_content_area() |
434 | 38 | 38 | ||
430 | 39 | box = self.get_content_area() | ||
431 | 40 | |||
435 | 41 | self.notebook = Gtk.Notebook() | 39 | self.notebook = Gtk.Notebook() |
436 | 42 | box.pack_start(self.notebook, True, True, 0) | 40 | box.pack_start(self.notebook, True, True, 0) |
437 | 43 | 41 | ||
438 | @@ -49,7 +47,7 @@ | |||
439 | 49 | def add_predefined_tab(self): | 47 | def add_predefined_tab(self): |
440 | 50 | self.predefined_box = Gtk.VBox() | 48 | self.predefined_box = Gtk.VBox() |
441 | 51 | self.notebook.append_page(self.predefined_box, Gtk.Label("Predefined Filter")) | 49 | self.notebook.append_page(self.predefined_box, Gtk.Label("Predefined Filter")) |
443 | 52 | 50 | ||
444 | 53 | self.predefined_store = Gtk.ListStore(int, str) | 51 | self.predefined_store = Gtk.ListStore(int, str) |
445 | 54 | self.builtin = BuiltInFilters() | 52 | self.builtin = BuiltInFilters() |
446 | 55 | for i in self.builtin: | 53 | for i in self.builtin: |
447 | @@ -59,22 +57,18 @@ | |||
448 | 59 | self.predefined_view.connect("cursor-changed", self.on_cursor_changed) | 57 | self.predefined_view.connect("cursor-changed", self.on_cursor_changed) |
449 | 60 | column_pix_name = Gtk.TreeViewColumn(_('Name')) | 58 | column_pix_name = Gtk.TreeViewColumn(_('Name')) |
450 | 61 | self.predefined_view.append_column(column_pix_name) | 59 | self.predefined_view.append_column(column_pix_name) |
453 | 62 | name_rend = Gtk.CellRendererText() | 60 | name_rend = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END) |
452 | 63 | name_rend.set_property("ellipsize", Pango.EllipsizeMode.END) | ||
454 | 64 | column_pix_name.pack_start(name_rend, False) | 61 | column_pix_name.pack_start(name_rend, False) |
455 | 65 | column_pix_name.add_attribute(name_rend, "markup", 1) | 62 | column_pix_name.add_attribute(name_rend, "markup", 1) |
456 | 66 | column_pix_name.set_resizable(True) | 63 | column_pix_name.set_resizable(True) |
457 | 67 | 64 | ||
462 | 68 | self.predefined_view.set_headers_visible(False) | 65 | self.predefined_view.set_properties('headers-visible',False,'rules-hint',True) |
463 | 69 | self.predefined_view.set_rules_hint(True) | 66 | |
464 | 70 | 67 | self.predefined_scroll = Gtk.ScrolledWindow(shadow_type=Gtk.ShadowType.IN,border_width=1) | |
461 | 71 | self.predefined_scroll = Gtk.ScrolledWindow() | ||
465 | 72 | self.predefined_scroll.add(self.predefined_view) | 68 | self.predefined_scroll.add(self.predefined_view) |
466 | 73 | self.predefined_scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) | 69 | self.predefined_scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) |
467 | 74 | self.predefined_scroll.set_shadow_type(Gtk.ShadowType.IN) | ||
468 | 75 | self.predefined_scroll.set_border_width(1) | ||
469 | 76 | self.predefined_box.pack_start(self.predefined_scroll, True, True, 6) | 70 | self.predefined_box.pack_start(self.predefined_scroll, True, True, 6) |
471 | 77 | 71 | ||
472 | 78 | # See the Template values | 72 | # See the Template values |
473 | 79 | self.predefined_viewer = TemplateViewer() | 73 | self.predefined_viewer = TemplateViewer() |
474 | 80 | self.predefined_viewer.set_fields_enable(False) | 74 | self.predefined_viewer.set_fields_enable(False) |
475 | @@ -91,22 +85,18 @@ | |||
476 | 91 | 85 | ||
477 | 92 | column_pix_name = Gtk.TreeViewColumn(_('Name')) | 86 | column_pix_name = Gtk.TreeViewColumn(_('Name')) |
478 | 93 | self.custom_view.append_column(column_pix_name) | 87 | self.custom_view.append_column(column_pix_name) |
481 | 94 | name_rend = Gtk.CellRendererText() | 88 | name_rend = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END) |
480 | 95 | name_rend.set_property("ellipsize", Pango.EllipsizeMode.END) | ||
482 | 96 | column_pix_name.pack_start(name_rend, False) | 89 | column_pix_name.pack_start(name_rend, False) |
483 | 97 | column_pix_name.add_attribute(name_rend, "markup", 1) | 90 | column_pix_name.add_attribute(name_rend, "markup", 1) |
484 | 98 | column_pix_name.set_resizable(True) | 91 | column_pix_name.set_resizable(True) |
485 | 99 | 92 | ||
490 | 100 | self.custom_view.set_headers_visible(False) | 93 | self.custom_view.set_properties('headers-visible',False,'rules-hint',True) |
491 | 101 | self.custom_view.set_rules_hint(True) | 94 | |
492 | 102 | 95 | self.custom_scroll = Gtk.ScrolledWindow(shadow_type=Gtk.ShadowType.IN,border_width=1) | |
489 | 103 | self.custom_scroll = Gtk.ScrolledWindow() | ||
493 | 104 | self.custom_scroll.add(self.custom_view) | 96 | self.custom_scroll.add(self.custom_view) |
494 | 105 | self.custom_scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) | 97 | self.custom_scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) |
495 | 106 | self.custom_scroll.set_shadow_type(Gtk.ShadowType.IN) | ||
496 | 107 | self.custom_scroll.set_border_width(1) | ||
497 | 108 | self.custom_box.pack_start(self.custom_scroll, True, True, 6) | 98 | self.custom_box.pack_start(self.custom_scroll, True, True, 6) |
499 | 109 | 99 | ||
500 | 110 | # See the Template values | 100 | # See the Template values |
501 | 111 | self.custom_viewer = TemplateViewer() | 101 | self.custom_viewer = TemplateViewer() |
502 | 112 | self.custom_viewer.set_fields_enable(False) | 102 | self.custom_viewer.set_fields_enable(False) |
503 | @@ -140,7 +130,7 @@ | |||
504 | 140 | def on_cursor_changed(self, treeview): | 130 | def on_cursor_changed(self, treeview): |
505 | 141 | index = self.get_selected_index() | 131 | index = self.get_selected_index() |
506 | 142 | if index is not None: | 132 | if index is not None: |
508 | 143 | self.predefined_viewer.set_values(self.builtin[index]) | 133 | self.predefined_viewer.set_values(self.builtin[index]) |
509 | 144 | 134 | ||
510 | 145 | def on_custom_cursor_changed(self, treeview): | 135 | def on_custom_cursor_changed(self, treeview): |
511 | 146 | pass | 136 | pass |
512 | 147 | 137 | ||
513 | === modified file 'zgexplorer/monitorviewer.py' (properties changed: -x to +x) | |||
514 | --- zgexplorer/monitorviewer.py 2012-03-12 20:57:29 +0000 | |||
515 | +++ zgexplorer/monitorviewer.py 2012-03-14 22:39:19 +0000 | |||
516 | @@ -9,12 +9,12 @@ | |||
517 | 9 | # under the terms of the GNU Lesser General Public License as published | 9 | # under the terms of the GNU Lesser General Public License as published |
518 | 10 | # by the Free Software Foundation, either version 2 of the License, or | 10 | # by the Free Software Foundation, either version 2 of the License, or |
519 | 11 | # (at your option) any later version. | 11 | # (at your option) any later version. |
521 | 12 | # | 12 | # |
522 | 13 | # This program is distributed in the hope that it will be useful, but | 13 | # This program is distributed in the hope that it will be useful, but |
523 | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
524 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
525 | 16 | # See the GNU Lesser General Public License for more details. | 16 | # See the GNU Lesser General Public License for more details. |
527 | 17 | # | 17 | # |
528 | 18 | # You should have received a copy of the GNU Lesser General Public License | 18 | # You should have received a copy of the GNU Lesser General Public License |
529 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; |
530 | 20 | # | 20 | # |
531 | @@ -45,50 +45,36 @@ | |||
532 | 45 | 45 | ||
533 | 46 | self.spacing = 6 | 46 | self.spacing = 6 |
534 | 47 | self.margin = 12 | 47 | self.margin = 12 |
536 | 48 | 48 | ||
537 | 49 | self.builtin = BuiltInFilters() | 49 | self.builtin = BuiltInFilters() |
538 | 50 | 50 | ||
548 | 51 | #desc_label = Gtk.Label() | 51 | self.desc_entry = Gtk.Label(xalign=0,yalign=0,wrap=True) |
540 | 52 | #desc_label.set_alignment(0, 0) | ||
541 | 53 | #desc_label.set_markup("<b>%s</b>" %("Description")) | ||
542 | 54 | #self.pack_start(desc_label, False, False, 6) | ||
543 | 55 | |||
544 | 56 | self.desc_entry = Gtk.Label() | ||
545 | 57 | self.desc_entry.set_alignment(0, 0) | ||
546 | 58 | self.desc_entry.set_line_wrap(True) | ||
547 | 59 | self.desc_entry.set_line_wrap_mode(Pango.WrapMode.WORD) | ||
549 | 60 | self.pack_start(self.desc_entry, False, False, 6) | 52 | self.pack_start(self.desc_entry, False, False, 6) |
550 | 61 | 53 | ||
551 | 62 | 54 | ||
552 | 63 | # ButtonBox | 55 | # ButtonBox |
555 | 64 | self.button_box = Gtk.HButtonBox() | 56 | self.button_box = Gtk.HButtonBox(False) |
554 | 65 | self.button_box.set_homogeneous(False) | ||
556 | 66 | self.button_box.set_layout(Gtk.ButtonBoxStyle.START) | 57 | self.button_box.set_layout(Gtk.ButtonBoxStyle.START) |
557 | 67 | self.pack_start(self.button_box, False, False, 6) | 58 | self.pack_start(self.button_box, False, False, 6) |
558 | 68 | 59 | ||
562 | 69 | self.start = Gtk.Button() | 60 | self.start = Gtk.Button(image=Gtk.Image.new_from_stock( |
563 | 70 | self.start.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_MEDIA_PLAY, | 61 | Gtk.STOCK_MEDIA_PLAY,Gtk.IconSize.BUTTON)) |
561 | 71 | Gtk.IconSize.BUTTON)) | ||
564 | 72 | self.start.connect("clicked", self.start_monitor) | 62 | self.start.connect("clicked", self.start_monitor) |
565 | 73 | self.button_box.pack_start(self.start, False, False, 6) | 63 | self.button_box.pack_start(self.start, False, False, 6) |
566 | 74 | 64 | ||
570 | 75 | self.stop = Gtk.Button() | 65 | self.stop = Gtk.Button(image= Gtk.Image.new_from_stock( |
571 | 76 | self.stop.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_MEDIA_STOP, | 66 | Gtk.STOCK_MEDIA_STOP,Gtk.IconSize.BUTTON)) |
569 | 77 | Gtk.IconSize.BUTTON)) | ||
572 | 78 | self.stop.connect("clicked", self.stop_monitor) | 67 | self.stop.connect("clicked", self.stop_monitor) |
573 | 79 | self.stop.set_sensitive(False) | 68 | self.stop.set_sensitive(False) |
574 | 80 | self.button_box.pack_start(self.stop, False, False, 6) | 69 | self.button_box.pack_start(self.stop, False, False, 6) |
575 | 81 | 70 | ||
579 | 82 | self.clear = Gtk.Button() | 71 | self.clear = Gtk.Button(image=Gtk.Image.new_from_stock( |
580 | 83 | self.clear.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_CLEAR, | 72 | Gtk.STOCK_CLEAR,Gtk.IconSize.BUTTON)) |
578 | 84 | Gtk.IconSize.BUTTON)) | ||
581 | 85 | self.clear.connect("clicked", self.clear_events) | 73 | self.clear.connect("clicked", self.clear_events) |
582 | 86 | self.button_box.pack_start(self.clear, False, False, 6) | 74 | self.button_box.pack_start(self.clear, False, False, 6) |
583 | 87 | 75 | ||
585 | 88 | self.scroll = Gtk.ScrolledWindow(None, None) | 76 | self.scroll = Gtk.ScrolledWindow(None, None,border_width=1,shadow_type=Gtk.ShadowType.IN) |
586 | 89 | self.scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) | 77 | self.scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) |
587 | 90 | self.scroll.set_shadow_type(Gtk.ShadowType.IN) | ||
588 | 91 | self.scroll.set_border_width(1) | ||
589 | 92 | self.pack_start(self.scroll, True, True, 6) | 78 | self.pack_start(self.scroll, True, True, 6) |
590 | 93 | 79 | ||
591 | 94 | # Event Id, TimeStamp, Interpretation, Manifestation, Actor | 80 | # Event Id, TimeStamp, Interpretation, Manifestation, Actor |
592 | @@ -156,7 +142,7 @@ | |||
593 | 156 | 142 | ||
594 | 157 | timestamp = int(str(event.get_timestamp())) | 143 | timestamp = int(str(event.get_timestamp())) |
595 | 158 | time = datetime.fromtimestamp(timestamp/1000).strftime("%Y-%m-%d %I:%M:%S %p") | 144 | time = datetime.fromtimestamp(timestamp/1000).strftime("%Y-%m-%d %I:%M:%S %p") |
597 | 159 | 145 | ||
598 | 160 | actor = event.get_actor() | 146 | actor = event.get_actor() |
599 | 161 | 147 | ||
600 | 162 | event_inter = str(event.get_interpretation()) | 148 | event_inter = str(event.get_interpretation()) |
601 | 163 | 149 | ||
602 | === modified file 'zgexplorer/templates.py' (properties changed: -x to +x) | |||
603 | --- zgexplorer/templates.py 2012-03-10 13:39:20 +0000 | |||
604 | +++ zgexplorer/templates.py 2012-03-14 22:39:19 +0000 | |||
605 | @@ -9,12 +9,12 @@ | |||
606 | 9 | # under the terms of the GNU Lesser General Public License as published | 9 | # under the terms of the GNU Lesser General Public License as published |
607 | 10 | # by the Free Software Foundation, either version 2 of the License, or | 10 | # by the Free Software Foundation, either version 2 of the License, or |
608 | 11 | # (at your option) any later version. | 11 | # (at your option) any later version. |
610 | 12 | # | 12 | # |
611 | 13 | # This program is distributed in the hope that it will be useful, but | 13 | # This program is distributed in the hope that it will be useful, but |
612 | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
613 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
614 | 16 | # See the GNU Lesser General Public License for more details. | 16 | # See the GNU Lesser General Public License for more details. |
616 | 17 | # | 17 | # |
617 | 18 | # You should have received a copy of the GNU Lesser General Public License | 18 | # You should have received a copy of the GNU Lesser General Public License |
618 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; |
619 | 20 | # | 20 | # |
620 | @@ -31,7 +31,7 @@ | |||
621 | 31 | template1,\ | 31 | template1,\ |
622 | 32 | TimeRange.always(), \ | 32 | TimeRange.always(), \ |
623 | 33 | ResultType.MostRecentEvents] | 33 | ResultType.MostRecentEvents] |
625 | 34 | 34 | ||
626 | 35 | template2 = Event.new_for_values(interpretation = \ | 35 | template2 = Event.new_for_values(interpretation = \ |
627 | 36 | Interpretation.ACCESS_EVENT) | 36 | Interpretation.ACCESS_EVENT) |
628 | 37 | self[1] = ["Access Events", \ | 37 | self[1] = ["Access Events", \ |
629 | 38 | 38 | ||
630 | === modified file 'zgexplorer/window.py' (properties changed: -x to +x) | |||
631 | --- zgexplorer/window.py 2012-03-13 20:59:11 +0000 | |||
632 | +++ zgexplorer/window.py 2012-03-14 22:39:19 +0000 | |||
633 | @@ -9,12 +9,12 @@ | |||
634 | 9 | # under the terms of the GNU Lesser General Public License as published | 9 | # under the terms of the GNU Lesser General Public License as published |
635 | 10 | # by the Free Software Foundation, either version 2 of the License, or | 10 | # by the Free Software Foundation, either version 2 of the License, or |
636 | 11 | # (at your option) any later version. | 11 | # (at your option) any later version. |
638 | 12 | # | 12 | # |
639 | 13 | # This program is distributed in the hope that it will be useful, but | 13 | # This program is distributed in the hope that it will be useful, but |
640 | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
641 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
642 | 16 | # See the GNU Lesser General Public License for more details. | 16 | # See the GNU Lesser General Public License for more details. |
644 | 17 | # | 17 | # |
645 | 18 | # You should have received a copy of the GNU Lesser General Public License | 18 | # You should have received a copy of the GNU Lesser General Public License |
646 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>."; |
647 | 20 | # | 20 | # |
648 | @@ -34,7 +34,7 @@ | |||
649 | 34 | self.connect("destroy", Gtk.main_quit) | 34 | self.connect("destroy", Gtk.main_quit) |
650 | 35 | self.set_title("Zeitgeist Explorer") | 35 | self.set_title("Zeitgeist Explorer") |
651 | 36 | self.set_size_request(1400, 900) | 36 | self.set_size_request(1400, 900) |
653 | 37 | 37 | ||
654 | 38 | self.client = ZeitgeistClient() | 38 | self.client = ZeitgeistClient() |
655 | 39 | 39 | ||
656 | 40 | main_box = Gtk.VBox() | 40 | main_box = Gtk.VBox() |
657 | @@ -45,19 +45,15 @@ | |||
658 | 45 | toolbar = Gtk.Toolbar() | 45 | toolbar = Gtk.Toolbar() |
659 | 46 | 46 | ||
660 | 47 | # New Tool Item | 47 | # New Tool Item |
664 | 48 | toolitem_new = Gtk.ToolButton() | 48 | toolitem_new = Gtk.ToolButton(label="New",icon_name="add") |
662 | 49 | toolitem_new.set_label("New") | ||
663 | 50 | toolitem_new.set_icon_name("add") | ||
665 | 51 | toolitem_new.connect("clicked", self.toolitem_new_clicked) | 49 | toolitem_new.connect("clicked", self.toolitem_new_clicked) |
666 | 52 | toolbar.insert(toolitem_new, -1) | 50 | toolbar.insert(toolitem_new, -1) |
667 | 53 | 51 | ||
668 | 54 | # Load Tool Item | 52 | # Load Tool Item |
673 | 55 | toolitem_load = Gtk.ToolButton() | 53 | toolitem_load = Gtk.ToolButton(stock_id=Gtk.STOCK_OPEN,label="Load") |
674 | 56 | toolitem_load.set_stock_id(Gtk.STOCK_OPEN) | 54 | toolitem_load.connect("clicked", self.toolitem_load_clicked) |
671 | 57 | toolitem_load.set_label("Load") | ||
672 | 58 | toolitem_load.connect("clicked", self.toolitem_load_clicked) | ||
675 | 59 | toolbar.insert(toolitem_load, -1) | 55 | toolbar.insert(toolitem_load, -1) |
677 | 60 | 56 | ||
678 | 61 | #main_box.pack_start(toolbar, False, True, 0) | 57 | #main_box.pack_start(toolbar, False, True, 0) |
679 | 62 | 58 | ||
680 | 63 | self.filter_manager = FilterManagerDialog() | 59 | self.filter_manager = FilterManagerDialog() |
681 | @@ -84,7 +80,7 @@ | |||
682 | 84 | 80 | ||
683 | 85 | 81 | ||
684 | 86 | class MonitorWindow(Gtk.VBox): | 82 | class MonitorWindow(Gtk.VBox): |
686 | 87 | 83 | ||
687 | 88 | monitor_builtin = {} | 84 | monitor_builtin = {} |
688 | 89 | monitor_custom = {} | 85 | monitor_custom = {} |
689 | 90 | selected_monitor_view = None | 86 | selected_monitor_view = None |
690 | @@ -107,10 +103,8 @@ | |||
691 | 107 | self.monitor_tree = Gtk.TreeView(self.monitors) | 103 | self.monitor_tree = Gtk.TreeView(self.monitors) |
692 | 108 | self.monitor_tree.connect("cursor-changed", self.on_treeview_selected) | 104 | self.monitor_tree.connect("cursor-changed", self.on_treeview_selected) |
693 | 109 | self.monitor_tree.set_size_request(200, 600) | 105 | self.monitor_tree.set_size_request(200, 600) |
698 | 110 | self.monitor_tree.set_border_width(1) | 106 | self.monitor_tree.set_properties('border_width',1,'visible',True |
699 | 111 | self.monitor_tree.set_visible(True) | 107 | ,'rules_hint',True,'headers_visible',False) |
696 | 112 | self.monitor_tree.set_rules_hint(True) | ||
697 | 113 | self.monitor_tree.set_headers_visible(False) | ||
700 | 114 | 108 | ||
701 | 115 | scroll = Gtk.ScrolledWindow(None, None) | 109 | scroll = Gtk.ScrolledWindow(None, None) |
702 | 116 | scroll.add(self.monitor_tree) | 110 | scroll.add(self.monitor_tree) |
703 | @@ -121,15 +115,13 @@ | |||
704 | 121 | 115 | ||
705 | 122 | column_pix_name = Gtk.TreeViewColumn(_('Name')) | 116 | column_pix_name = Gtk.TreeViewColumn(_('Name')) |
706 | 123 | self.monitor_tree.append_column(column_pix_name) | 117 | self.monitor_tree.append_column(column_pix_name) |
709 | 124 | name_rend = Gtk.CellRendererText() | 118 | name_rend = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END) |
708 | 125 | name_rend.set_property("ellipsize", Pango.EllipsizeMode.END) | ||
710 | 126 | column_pix_name.pack_start(name_rend, False) | 119 | column_pix_name.pack_start(name_rend, False) |
711 | 127 | column_pix_name.add_attribute(name_rend, "markup", 1) | 120 | column_pix_name.add_attribute(name_rend, "markup", 1) |
712 | 128 | column_pix_name.set_resizable(True) | 121 | column_pix_name.set_resizable(True) |
713 | 129 | 122 | ||
715 | 130 | self.toolbar = Gtk.Toolbar() | 123 | self.toolbar = Gtk.Toolbar(icon_size=1) |
716 | 131 | self.toolbar.set_style(Gtk.ToolbarStyle.ICONS) | 124 | self.toolbar.set_style(Gtk.ToolbarStyle.ICONS) |
717 | 132 | self.toolbar.set_icon_size(1) | ||
718 | 133 | self.toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR) | 125 | self.toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR) |
719 | 134 | self.toolbar.get_style_context().set_junction_sides(Gtk.JunctionSides.TOP) | 126 | self.toolbar.get_style_context().set_junction_sides(Gtk.JunctionSides.TOP) |
720 | 135 | list_vbox.pack_start(self.toolbar, False, False, 0) | 127 | list_vbox.pack_start(self.toolbar, False, False, 0) |
721 | @@ -221,34 +213,27 @@ | |||
722 | 221 | super(ExplorerWindow, self).__init__() | 213 | super(ExplorerWindow, self).__init__() |
723 | 222 | 214 | ||
724 | 223 | class ConfirmMonitorStop(Gtk.Dialog): | 215 | class ConfirmMonitorStop(Gtk.Dialog): |
726 | 224 | 216 | ||
727 | 225 | def __init__(self): | 217 | def __init__(self): |
728 | 226 | super(ConfirmMonitorStop, self).__init__() | 218 | super(ConfirmMonitorStop, self).__init__() |
735 | 227 | self.margin = 6 | 219 | self.set_properties('margin',6,'padding',12,'title', |
736 | 228 | self.padding = 12 | 220 | "Confirm Monitor Stop",'resizable',False,'modal',True,'decorated',False) |
731 | 229 | self.set_title("Confirm Monitor Stop") | ||
732 | 230 | self.set_resizable(False) | ||
733 | 231 | self.set_modal(True) | ||
734 | 232 | self.set_decorated(False) | ||
737 | 233 | self.set_size_request(100, 50) | 221 | self.set_size_request(100, 50) |
738 | 234 | 222 | ||
739 | 235 | self.add_button(Gtk.STOCK_YES, Gtk.ResponseType.YES) | 223 | self.add_button(Gtk.STOCK_YES, Gtk.ResponseType.YES) |
740 | 236 | self.add_button(Gtk.STOCK_NO, Gtk.ResponseType.NO) | 224 | self.add_button(Gtk.STOCK_NO, Gtk.ResponseType.NO) |
741 | 237 | 225 | ||
742 | 238 | box = self.get_content_area() | 226 | box = self.get_content_area() |
746 | 239 | 227 | ||
747 | 240 | label1 = Gtk.Label() | 228 | label1 = Gtk.Label(xalign=0,yalign=0.5,margin_top=12, |
748 | 241 | label1.set_markup("<b>%s</b>" | 229 | margin_right=12,margin_left=12) |
749 | 230 | label1.set_markup("<b>%s</b>" | ||
750 | 242 | %("The monitor which you are trying to remove is still running")) | 231 | %("The monitor which you are trying to remove is still running")) |
756 | 243 | label1.set_alignment(0, 0.5) | 232 | |
757 | 244 | label1.set_margin_top(12) | 233 | label2 = Gtk.Label(xalign=0,yalign=0.5,margin_top=12, |
758 | 245 | label1.set_margin_left(12) | 234 | margin_right=12,margin_left=12) |
754 | 246 | label1.set_margin_right(12) | ||
755 | 247 | label2 = Gtk.Label() | ||
759 | 248 | label2.set_markup("Going ahead will stop the monitor before removing it") | 235 | label2.set_markup("Going ahead will stop the monitor before removing it") |
763 | 249 | label2.set_alignment(0, 0.5) | 236 | |
761 | 250 | label2.set_margin_left(12) | ||
762 | 251 | label2.set_margin_right(12) | ||
764 | 252 | box.pack_start(label1, False, False, 6) | 237 | box.pack_start(label1, False, False, 6) |
765 | 253 | box.pack_start(label2, False, False, 6) | 238 | box.pack_start(label2, False, False, 6) |
766 | 254 | 239 |
Looks excellent!