Merge lp:~francesco-marella/specto/code-to-glade into lp:specto
- code-to-glade
- Merge into main
| Status: | Needs review |
|---|---|
| Proposed branch: | lp:~francesco-marella/specto/code-to-glade |
| Merge into: | lp:specto |
| Diff against target: | 1731 lines (+626/-427) 7 files modified data/uis/about.ui (+59/-0) data/uis/import_export.ui (+117/-24) data/uis/notifier.ui (+399/-186) spectlib/about.py (+8/-25) spectlib/export_watch.py (+15/-59) spectlib/import_watch.py (+15/-54) spectlib/notifier.py (+13/-79) |
| To merge this branch: | bzr merge lp:~francesco-marella/specto/code-to-glade |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Jeff Fortin Tam | Needs Fixing | ||
| Review via email: | |||
Commit message
Description of the change
- 168. By Francesco Marella
-
some fixes, but the checkboxes are still not centered
thanks to Jeff for pointing out these regressions.
- 169. By Francesco Marella
-
vertical scrollbar -> never
| Francesco Marella (francesco-marella) wrote : | # |
Hi Jeff, thanks for your review. Some comments inline.
> This is quite interesting! A couple of things though:
>
> - mousing over the "Add" submenu makes two menus appear (the toolbar's popup
> menu shows up). Wtf?
Fixed.
> - how do we actually edit the contents now? What's the difference in the glade
> editor?
We still edit the contents like before. We create in glade some more widgets (eg. TreeViewColumns and CellRenderers) and then we get these objects via GtkBuilder.
> - maybe you want to take a look at lp:~kiddo/specto/pygi too
Yeah, I've tried to start it but crashes. (pygi + Gtk+ 3.0)
> - I guess this simplifies the code a lot, however I'd like someone else to
> review this too
> - it looks different than the current UI... the patch below makes it ressemble
> the main branch more, but it still has different column headers, the
> checkboxes are not centered, etc.
Thanks for the patch. I've tried to align the checkboxes with no luck in glade, I wonder if it's a bug. I'll ping you again when this issue will be fixed.
>
>
>
> === modified file 'data/uis/
> --- data/uis/
> +++ data/uis/
> @@ -1,7 +1,6 @@
> <?xml version="1.0" encoding="UTF-8"?>
> <interface>
> <requires lib="gtk+" version="2.18"/>
> - <!-- interface-
> <object class="
> <object class="GtkWindow" id="error_dialog">
> <property name="can_
> @@ -57,8 +56,6 @@
> <object class="
> <property name="visible"
> <property name="can_
> - <property name="hscrollba
> - <property name="vscrollba
> <child>
> <object class="GtkTextView" id="error_message">
> <property name="height_
> @@ -612,18 +609,19 @@
> <property name="visible"
> <property name="can_
> <property name="hscrollba
> - <property name="vscrollba
> <property name="shadow_
> <child>
> <object class="GtkTreeView" id="treeview">
> <property name="visible"
> <property name="can_
> <property name="model"
> - <property name="headers_
> + <property name="rules_
> <property name="search_
> - <property name="enable_
> <signal name="cursor-
> swapped="no"/>
> <signal name="row-
> swapped="no"/>
> + <child internal-
> + ...
Unmerged revisions
- 169. By Francesco Marella
-
vertical scrollbar -> never
- 168. By Francesco Marella
-
some fixes, but the checkboxes are still not centered
thanks to Jeff for pointing out these regressions.
- 167. By Francesco Marella
-
Move GUI code to Glade files (treeview related code mostly)
Glade (v. 3.8) it's a great tool for GUI creation and improved so much (read as no frequent crashes).
The process of migrate Specto to PyGI and GTK+ 3.0 will be easier and painless (hopefully).GTK+ >= 2.18 is required.
Preview Diff
| 1 | === added file 'data/uis/about.ui' |
| 2 | --- data/uis/about.ui 1970-01-01 00:00:00 +0000 |
| 3 | +++ data/uis/about.ui 2011-05-24 17:11:46 +0000 |
| 4 | @@ -0,0 +1,59 @@ |
| 5 | +<?xml version="1.0" encoding="UTF-8"?> |
| 6 | +<interface> |
| 7 | + <requires lib="gtk+" version="2.18"/> |
| 8 | + <!-- interface-naming-policy project-wide --> |
| 9 | + <object class="GtkAboutDialog" id="aboutdialog1"> |
| 10 | + <property name="can_focus">False</property> |
| 11 | + <property name="border_width">5</property> |
| 12 | + <property name="type_hint">dialog</property> |
| 13 | + <property name="program_name">Specto</property> |
| 14 | + <property name="copyright" translatable="yes">Copyright © Jean-François Fortin Tam & Wout Clymans</property> |
| 15 | + <property name="comments" translatable="yes">Be notified of everything</property> |
| 16 | + <property name="website">http://specto.sourceforge.net</property> |
| 17 | + <property name="website_label" translatable="yes">Specto's Website</property> |
| 18 | + <property name="authors">Project and copyright owners |
| 19 | +---------------------------- |
| 20 | +Jean-François "Kiddo" Fortin Tam |
| 21 | +Wout Clymans |
| 22 | + |
| 23 | +Developers |
| 24 | +----------- |
| 25 | +Jean-François "Kiddo" Fortin Tam |
| 26 | +Wout Clymans |
| 27 | +Francesco Marella <fmarl@paranoici.org> |
| 28 | + |
| 29 | +Past contributors |
| 30 | +----------------- |
| 31 | +Christopher Halse Rogers |
| 32 | +Pascal Potvin |
| 33 | +Giulio "Dullboy" Lotti |
| 34 | +Thomas McColgan |
| 35 | +Conor "Majikstreet" Callahan |
| 36 | +"Trygvebw" |
| 37 | +Adrian "Hikaru79" Petrescu</property> |
| 38 | + <property name="translator_credits" translatable="yes">translator-credits</property> |
| 39 | + <child internal-child="vbox"> |
| 40 | + <object class="GtkVBox" id="dialog-vbox1"> |
| 41 | + <property name="visible">True</property> |
| 42 | + <property name="can_focus">False</property> |
| 43 | + <property name="spacing">2</property> |
| 44 | + <child internal-child="action_area"> |
| 45 | + <object class="GtkHButtonBox" id="dialog-action_area1"> |
| 46 | + <property name="visible">True</property> |
| 47 | + <property name="can_focus">False</property> |
| 48 | + <property name="layout_style">end</property> |
| 49 | + </object> |
| 50 | + <packing> |
| 51 | + <property name="expand">False</property> |
| 52 | + <property name="fill">True</property> |
| 53 | + <property name="pack_type">end</property> |
| 54 | + <property name="position">0</property> |
| 55 | + </packing> |
| 56 | + </child> |
| 57 | + <child> |
| 58 | + <placeholder/> |
| 59 | + </child> |
| 60 | + </object> |
| 61 | + </child> |
| 62 | + </object> |
| 63 | +</interface> |
| 64 | |
| 65 | === modified file 'data/uis/import_export.ui' |
| 66 | --- data/uis/import_export.ui 2010-10-28 17:50:39 +0000 |
| 67 | +++ data/uis/import_export.ui 2011-05-24 17:11:46 +0000 |
| 68 | @@ -1,9 +1,15 @@ |
| 69 | <?xml version="1.0" encoding="UTF-8"?> |
| 70 | <interface> |
| 71 | - <requires lib="gtk+" version="2.16"/> |
| 72 | + <requires lib="gtk+" version="2.18"/> |
| 73 | <!-- interface-naming-policy toplevel-contextual --> |
| 74 | + <object class="GtkAdjustment" id="adjustment1"> |
| 75 | + <property name="upper">100</property> |
| 76 | + <property name="step_increment">1</property> |
| 77 | + <property name="page_increment">10</property> |
| 78 | + </object> |
| 79 | <object class="GtkDialog" id="import_export"> |
| 80 | <property name="visible">True</property> |
| 81 | + <property name="can_focus">False</property> |
| 82 | <property name="border_width">12</property> |
| 83 | <property name="title">dialog1</property> |
| 84 | <property name="default_height">150</property> |
| 85 | @@ -11,29 +17,12 @@ |
| 86 | <child internal-child="vbox"> |
| 87 | <object class="GtkVBox" id="dialog-vbox1"> |
| 88 | <property name="visible">True</property> |
| 89 | + <property name="can_focus">False</property> |
| 90 | <property name="spacing">12</property> |
| 91 | - <child> |
| 92 | - <object class="GtkScrolledWindow" id="scrolledwindow1"> |
| 93 | - <property name="height_request">250</property> |
| 94 | - <property name="visible">True</property> |
| 95 | - <property name="can_focus">True</property> |
| 96 | - <property name="hscrollbar_policy">automatic</property> |
| 97 | - <property name="vscrollbar_policy">automatic</property> |
| 98 | - <property name="shadow_type">in</property> |
| 99 | - <child> |
| 100 | - <object class="GtkTreeView" id="treeview"> |
| 101 | - <property name="visible">True</property> |
| 102 | - <property name="can_focus">True</property> |
| 103 | - </object> |
| 104 | - </child> |
| 105 | - </object> |
| 106 | - <packing> |
| 107 | - <property name="position">1</property> |
| 108 | - </packing> |
| 109 | - </child> |
| 110 | <child internal-child="action_area"> |
| 111 | <object class="GtkHButtonBox" id="dialog-action_area1"> |
| 112 | <property name="visible">True</property> |
| 113 | + <property name="can_focus">False</property> |
| 114 | <property name="layout_style">end</property> |
| 115 | <child> |
| 116 | <object class="GtkButton" id="button_select_all"> |
| 117 | @@ -42,8 +31,9 @@ |
| 118 | <property name="can_focus">True</property> |
| 119 | <property name="can_default">True</property> |
| 120 | <property name="receives_default">False</property> |
| 121 | + <property name="use_action_appearance">False</property> |
| 122 | <property name="use_underline">True</property> |
| 123 | - <signal name="clicked" handler="on_button_select_all_clicked"/> |
| 124 | + <signal name="clicked" handler="select_all" swapped="no"/> |
| 125 | </object> |
| 126 | <packing> |
| 127 | <property name="expand">False</property> |
| 128 | @@ -58,8 +48,9 @@ |
| 129 | <property name="can_focus">True</property> |
| 130 | <property name="can_default">True</property> |
| 131 | <property name="receives_default">False</property> |
| 132 | + <property name="use_action_appearance">False</property> |
| 133 | <property name="use_underline">True</property> |
| 134 | - <signal name="clicked" handler="on_button_deselect_all_clicked"/> |
| 135 | + <signal name="clicked" handler="deselect_all" swapped="no"/> |
| 136 | </object> |
| 137 | <packing> |
| 138 | <property name="expand">False</property> |
| 139 | @@ -74,8 +65,9 @@ |
| 140 | <property name="can_focus">True</property> |
| 141 | <property name="can_default">True</property> |
| 142 | <property name="receives_default">False</property> |
| 143 | + <property name="use_action_appearance">False</property> |
| 144 | <property name="use_stock">True</property> |
| 145 | - <signal name="clicked" handler="on_button_close_clicked"/> |
| 146 | + <signal name="clicked" handler="delete_event" swapped="no"/> |
| 147 | </object> |
| 148 | <packing> |
| 149 | <property name="expand">False</property> |
| 150 | @@ -89,8 +81,9 @@ |
| 151 | <property name="visible">True</property> |
| 152 | <property name="can_focus">False</property> |
| 153 | <property name="receives_default">False</property> |
| 154 | + <property name="use_action_appearance">False</property> |
| 155 | <property name="use_stock">True</property> |
| 156 | - <signal name="clicked" handler="on_button_action_clicked"/> |
| 157 | + <signal name="clicked" handler="do_action" swapped="no"/> |
| 158 | </object> |
| 159 | <packing> |
| 160 | <property name="expand">False</property> |
| 161 | @@ -101,10 +94,96 @@ |
| 162 | </object> |
| 163 | <packing> |
| 164 | <property name="expand">False</property> |
| 165 | + <property name="fill">True</property> |
| 166 | <property name="pack_type">end</property> |
| 167 | <property name="position">0</property> |
| 168 | </packing> |
| 169 | </child> |
| 170 | + <child> |
| 171 | + <object class="GtkScrolledWindow" id="scrolledwindow1"> |
| 172 | + <property name="height_request">250</property> |
| 173 | + <property name="visible">True</property> |
| 174 | + <property name="can_focus">True</property> |
| 175 | + <property name="hscrollbar_policy">automatic</property> |
| 176 | + <property name="vscrollbar_policy">automatic</property> |
| 177 | + <property name="shadow_type">in</property> |
| 178 | + <child> |
| 179 | + <object class="GtkTreeView" id="treeview"> |
| 180 | + <property name="visible">True</property> |
| 181 | + <property name="can_focus">True</property> |
| 182 | + <property name="model">liststore1</property> |
| 183 | + <property name="search_column">3</property> |
| 184 | + <child> |
| 185 | + <object class="GtkTreeViewColumn" id="select_treeviewcolumn"> |
| 186 | + <property name="title" translatable="yes">Select</property> |
| 187 | + <property name="clickable">True</property> |
| 188 | + <child> |
| 189 | + <object class="GtkCellRendererToggle" id="cellrenderertoggle1"> |
| 190 | + <signal name="toggled" handler="check_clicked" swapped="no"/> |
| 191 | + </object> |
| 192 | + <attributes> |
| 193 | + <attribute name="active">0</attribute> |
| 194 | + </attributes> |
| 195 | + </child> |
| 196 | + </object> |
| 197 | + </child> |
| 198 | + <child> |
| 199 | + <object class="GtkTreeViewColumn" id="type_treeviewcolumn"> |
| 200 | + <property name="title" translatable="yes">Type</property> |
| 201 | + <child> |
| 202 | + <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/> |
| 203 | + <attributes> |
| 204 | + <attribute name="pixbuf">1</attribute> |
| 205 | + </attributes> |
| 206 | + </child> |
| 207 | + </object> |
| 208 | + </child> |
| 209 | + <child> |
| 210 | + <object class="GtkTreeViewColumn" id="name_treeviewcolumn"> |
| 211 | + <property name="resizable">True</property> |
| 212 | + <property name="title" translatable="yes">Name</property> |
| 213 | + <property name="expand">True</property> |
| 214 | + <child> |
| 215 | + <object class="GtkCellRendererText" id="cellrenderertext1"/> |
| 216 | + <attributes> |
| 217 | + <attribute name="text">2</attribute> |
| 218 | + </attributes> |
| 219 | + </child> |
| 220 | + </object> |
| 221 | + </child> |
| 222 | + <child> |
| 223 | + <object class="GtkTreeViewColumn" id="_ID_treeviewcolumn"> |
| 224 | + <property name="visible">False</property> |
| 225 | + <property name="title" translatable="yes">ID</property> |
| 226 | + <child> |
| 227 | + <object class="GtkCellRendererText" id="cellrenderertext3"/> |
| 228 | + <attributes> |
| 229 | + <attribute name="text">3</attribute> |
| 230 | + </attributes> |
| 231 | + </child> |
| 232 | + </object> |
| 233 | + </child> |
| 234 | + <child> |
| 235 | + <object class="GtkTreeViewColumn" id="_TYPE_treeviewcolumn"> |
| 236 | + <property name="visible">False</property> |
| 237 | + <property name="title" translatable="yes">TYPE</property> |
| 238 | + <child> |
| 239 | + <object class="GtkCellRendererText" id="cellrenderertext2"/> |
| 240 | + <attributes> |
| 241 | + <attribute name="text">4</attribute> |
| 242 | + </attributes> |
| 243 | + </child> |
| 244 | + </object> |
| 245 | + </child> |
| 246 | + </object> |
| 247 | + </child> |
| 248 | + </object> |
| 249 | + <packing> |
| 250 | + <property name="expand">True</property> |
| 251 | + <property name="fill">True</property> |
| 252 | + <property name="position">1</property> |
| 253 | + </packing> |
| 254 | + </child> |
| 255 | </object> |
| 256 | </child> |
| 257 | <action-widgets> |
| 258 | @@ -114,4 +193,18 @@ |
| 259 | <action-widget response="0">button_action</action-widget> |
| 260 | </action-widgets> |
| 261 | </object> |
| 262 | + <object class="GtkListStore" id="liststore1"> |
| 263 | + <columns> |
| 264 | + <!-- column-name gboolean1 --> |
| 265 | + <column type="gboolean"/> |
| 266 | + <!-- column-name GdkPixbuf1 --> |
| 267 | + <column type="GdkPixbuf"/> |
| 268 | + <!-- column-name gchararray2 --> |
| 269 | + <column type="gchararray"/> |
| 270 | + <!-- column-name gint1 --> |
| 271 | + <column type="gint"/> |
| 272 | + <!-- column-name gchararray3 --> |
| 273 | + <column type="gchararray"/> |
| 274 | + </columns> |
| 275 | + </object> |
| 276 | </interface> |
| 277 | |
| 278 | === modified file 'data/uis/notifier.ui' |
| 279 | --- data/uis/notifier.ui 2011-01-10 18:26:51 +0000 |
| 280 | +++ data/uis/notifier.ui 2011-05-24 17:11:46 +0000 |
| 281 | @@ -1,70 +1,286 @@ |
| 282 | <?xml version="1.0" encoding="UTF-8"?> |
| 283 | <interface> |
| 284 | - <requires lib="gtk+" version="2.16"/> |
| 285 | + <requires lib="gtk+" version="2.18"/> |
| 286 | <!-- interface-naming-policy toplevel-contextual --> |
| 287 | + <object class="GtkAccelGroup" id="accelgroup1"/> |
| 288 | + <object class="GtkWindow" id="error_dialog"> |
| 289 | + <property name="can_focus">False</property> |
| 290 | + <property name="title" translatable="yes">Error</property> |
| 291 | + <property name="resizable">False</property> |
| 292 | + <property name="window_position">center-on-parent</property> |
| 293 | + <child> |
| 294 | + <object class="GtkVBox" id="vbox1"> |
| 295 | + <property name="visible">True</property> |
| 296 | + <property name="can_focus">False</property> |
| 297 | + <property name="border_width">6</property> |
| 298 | + <child> |
| 299 | + <object class="GtkHBox" id="hbox4"> |
| 300 | + <property name="visible">True</property> |
| 301 | + <property name="can_focus">False</property> |
| 302 | + <child> |
| 303 | + <object class="GtkImage" id="image"> |
| 304 | + <property name="visible">True</property> |
| 305 | + <property name="can_focus">False</property> |
| 306 | + <property name="stock">gtk-missing-image</property> |
| 307 | + </object> |
| 308 | + <packing> |
| 309 | + <property name="expand">True</property> |
| 310 | + <property name="fill">True</property> |
| 311 | + <property name="position">0</property> |
| 312 | + </packing> |
| 313 | + </child> |
| 314 | + <child> |
| 315 | + <object class="GtkLabel" id="label4"> |
| 316 | + <property name="visible">True</property> |
| 317 | + <property name="can_focus">False</property> |
| 318 | + </object> |
| 319 | + <packing> |
| 320 | + <property name="expand">True</property> |
| 321 | + <property name="fill">True</property> |
| 322 | + <property name="padding">6</property> |
| 323 | + <property name="position">1</property> |
| 324 | + </packing> |
| 325 | + </child> |
| 326 | + </object> |
| 327 | + <packing> |
| 328 | + <property name="expand">False</property> |
| 329 | + <property name="fill">False</property> |
| 330 | + <property name="padding">6</property> |
| 331 | + <property name="position">0</property> |
| 332 | + </packing> |
| 333 | + </child> |
| 334 | + <child> |
| 335 | + <object class="GtkExpander" id="expander1"> |
| 336 | + <property name="visible">True</property> |
| 337 | + <property name="can_focus">True</property> |
| 338 | + <child> |
| 339 | + <object class="GtkScrolledWindow" id="scrolledwindow1"> |
| 340 | + <property name="visible">True</property> |
| 341 | + <property name="can_focus">True</property> |
| 342 | + <child> |
| 343 | + <object class="GtkTextView" id="error_message"> |
| 344 | + <property name="height_request">200</property> |
| 345 | + <property name="visible">True</property> |
| 346 | + <property name="can_focus">True</property> |
| 347 | + </object> |
| 348 | + </child> |
| 349 | + </object> |
| 350 | + </child> |
| 351 | + <child type="label"> |
| 352 | + <object class="GtkLabel" id="label2"> |
| 353 | + <property name="visible">True</property> |
| 354 | + <property name="can_focus">False</property> |
| 355 | + <property name="label" translatable="yes">Debug information</property> |
| 356 | + </object> |
| 357 | + </child> |
| 358 | + </object> |
| 359 | + <packing> |
| 360 | + <property name="expand">True</property> |
| 361 | + <property name="fill">True</property> |
| 362 | + <property name="padding">6</property> |
| 363 | + <property name="position">1</property> |
| 364 | + </packing> |
| 365 | + </child> |
| 366 | + <child> |
| 367 | + <object class="GtkHSeparator" id="hseparator1"> |
| 368 | + <property name="visible">True</property> |
| 369 | + <property name="can_focus">False</property> |
| 370 | + </object> |
| 371 | + <packing> |
| 372 | + <property name="expand">False</property> |
| 373 | + <property name="fill">True</property> |
| 374 | + <property name="padding">6</property> |
| 375 | + <property name="position">2</property> |
| 376 | + </packing> |
| 377 | + </child> |
| 378 | + <child> |
| 379 | + <object class="GtkHBox" id="hbox3"> |
| 380 | + <property name="visible">True</property> |
| 381 | + <property name="can_focus">False</property> |
| 382 | + <child> |
| 383 | + <object class="GtkButton" id="send"> |
| 384 | + <property name="label" translatable="yes">Visit the issue tracker</property> |
| 385 | + <property name="visible">True</property> |
| 386 | + <property name="can_focus">True</property> |
| 387 | + <property name="receives_default">True</property> |
| 388 | + <property name="use_action_appearance">False</property> |
| 389 | + </object> |
| 390 | + <packing> |
| 391 | + <property name="expand">True</property> |
| 392 | + <property name="fill">True</property> |
| 393 | + <property name="padding">6</property> |
| 394 | + <property name="position">0</property> |
| 395 | + </packing> |
| 396 | + </child> |
| 397 | + <child> |
| 398 | + <object class="GtkLabel" id="label3"> |
| 399 | + <property name="visible">True</property> |
| 400 | + <property name="can_focus">False</property> |
| 401 | + </object> |
| 402 | + <packing> |
| 403 | + <property name="expand">True</property> |
| 404 | + <property name="fill">True</property> |
| 405 | + <property name="padding">6</property> |
| 406 | + <property name="position">1</property> |
| 407 | + </packing> |
| 408 | + </child> |
| 409 | + <child> |
| 410 | + <object class="GtkLabel" id="label1"> |
| 411 | + <property name="visible">True</property> |
| 412 | + <property name="can_focus">False</property> |
| 413 | + </object> |
| 414 | + <packing> |
| 415 | + <property name="expand">True</property> |
| 416 | + <property name="fill">True</property> |
| 417 | + <property name="position">2</property> |
| 418 | + </packing> |
| 419 | + </child> |
| 420 | + <child> |
| 421 | + <object class="GtkButton" id="ok"> |
| 422 | + <property name="label">gtk-ok</property> |
| 423 | + <property name="visible">True</property> |
| 424 | + <property name="can_focus">True</property> |
| 425 | + <property name="receives_default">True</property> |
| 426 | + <property name="use_action_appearance">False</property> |
| 427 | + <property name="use_stock">True</property> |
| 428 | + </object> |
| 429 | + <packing> |
| 430 | + <property name="expand">True</property> |
| 431 | + <property name="fill">True</property> |
| 432 | + <property name="padding">6</property> |
| 433 | + <property name="position">3</property> |
| 434 | + </packing> |
| 435 | + </child> |
| 436 | + </object> |
| 437 | + <packing> |
| 438 | + <property name="expand">False</property> |
| 439 | + <property name="fill">False</property> |
| 440 | + <property name="padding">6</property> |
| 441 | + <property name="position">3</property> |
| 442 | + </packing> |
| 443 | + </child> |
| 444 | + </object> |
| 445 | + </child> |
| 446 | + </object> |
| 447 | + <object class="GtkImage" id="image1"> |
| 448 | + <property name="visible">True</property> |
| 449 | + <property name="can_focus">False</property> |
| 450 | + <property name="stock">gtk-open</property> |
| 451 | + </object> |
| 452 | + <object class="GtkImage" id="image2"> |
| 453 | + <property name="visible">True</property> |
| 454 | + <property name="can_focus">False</property> |
| 455 | + <property name="stock">gtk-save</property> |
| 456 | + </object> |
| 457 | + <object class="GtkImage" id="image3"> |
| 458 | + <property name="visible">True</property> |
| 459 | + <property name="can_focus">False</property> |
| 460 | + <property name="stock">gtk-clear</property> |
| 461 | + </object> |
| 462 | + <object class="GtkImage" id="image4"> |
| 463 | + <property name="visible">True</property> |
| 464 | + <property name="can_focus">False</property> |
| 465 | + <property name="stock">gtk-clear</property> |
| 466 | + </object> |
| 467 | + <object class="GtkImage" id="image5"> |
| 468 | + <property name="visible">True</property> |
| 469 | + <property name="can_focus">False</property> |
| 470 | + <property name="stock">gtk-sort-ascending</property> |
| 471 | + </object> |
| 472 | + <object class="GtkListStore" id="liststore"> |
| 473 | + <columns> |
| 474 | + <!-- column-name gboolean1 --> |
| 475 | + <column type="gboolean"/> |
| 476 | + <!-- column-name GdkPixbuf1 --> |
| 477 | + <column type="GdkPixbuf"/> |
| 478 | + <!-- column-name gchararray2 --> |
| 479 | + <column type="gchararray"/> |
| 480 | + <!-- column-name gint1 --> |
| 481 | + <column type="gint"/> |
| 482 | + <!-- column-name gchararray3 --> |
| 483 | + <column type="gchararray"/> |
| 484 | + <!-- column-name PangoStyle1 --> |
| 485 | + <column type="PangoWeight"/> |
| 486 | + </columns> |
| 487 | + </object> |
| 488 | <object class="GtkWindow" id="notifier"> |
| 489 | + <property name="can_focus">False</property> |
| 490 | <property name="title" translatable="yes">Notifications</property> |
| 491 | <property name="icon_name">gtk-dialog-info</property> |
| 492 | <accel-groups> |
| 493 | <group name="accelgroup1"/> |
| 494 | </accel-groups> |
| 495 | - <signal name="delete_event" handler="on_close_activate"/> |
| 496 | + <signal name="delete-event" handler="delete_event" swapped="no"/> |
| 497 | <child> |
| 498 | <object class="GtkVBox" id="vbox"> |
| 499 | <property name="visible">True</property> |
| 500 | + <property name="can_focus">False</property> |
| 501 | <child> |
| 502 | <object class="GtkMenuBar" id="menubar1"> |
| 503 | <property name="visible">True</property> |
| 504 | + <property name="can_focus">False</property> |
| 505 | <child> |
| 506 | <object class="GtkMenuItem" id="menu_file"> |
| 507 | <property name="visible">True</property> |
| 508 | + <property name="can_focus">False</property> |
| 509 | + <property name="use_action_appearance">False</property> |
| 510 | <property name="label" translatable="yes">_File</property> |
| 511 | <property name="use_underline">True</property> |
| 512 | <child type="submenu"> |
| 513 | <object class="GtkMenu" id="menu_file_menu"> |
| 514 | + <property name="can_focus">False</property> |
| 515 | <child> |
| 516 | <object class="GtkImageMenuItem" id="import_watches"> |
| 517 | <property name="label" translatable="yes">_Import Watches</property> |
| 518 | <property name="visible">True</property> |
| 519 | + <property name="can_focus">False</property> |
| 520 | + <property name="use_action_appearance">False</property> |
| 521 | <property name="use_underline">True</property> |
| 522 | <property name="image">image1</property> |
| 523 | <property name="use_stock">False</property> |
| 524 | - <signal name="activate" handler="on_import_watches_activate"/> |
| 525 | + <signal name="activate" handler="import_watches" swapped="no"/> |
| 526 | </object> |
| 527 | </child> |
| 528 | <child> |
| 529 | <object class="GtkImageMenuItem" id="export_watches"> |
| 530 | <property name="label" translatable="yes">_Export Watches</property> |
| 531 | <property name="visible">True</property> |
| 532 | + <property name="can_focus">False</property> |
| 533 | + <property name="use_action_appearance">False</property> |
| 534 | <property name="use_underline">True</property> |
| 535 | <property name="image">image2</property> |
| 536 | <property name="use_stock">False</property> |
| 537 | - <signal name="activate" handler="on_export_watches_activate"/> |
| 538 | + <signal name="activate" handler="export_watches" swapped="no"/> |
| 539 | </object> |
| 540 | </child> |
| 541 | <child> |
| 542 | <object class="GtkSeparatorMenuItem" id="separatormenuitem1"> |
| 543 | <property name="visible">True</property> |
| 544 | + <property name="can_focus">False</property> |
| 545 | </object> |
| 546 | </child> |
| 547 | <child> |
| 548 | <object class="GtkImageMenuItem" id="close"> |
| 549 | <property name="label">gtk-close</property> |
| 550 | <property name="visible">True</property> |
| 551 | + <property name="can_focus">False</property> |
| 552 | + <property name="use_action_appearance">False</property> |
| 553 | <property name="use_underline">True</property> |
| 554 | <property name="use_stock">True</property> |
| 555 | <property name="accel_group">accelgroup1</property> |
| 556 | - <signal name="activate" handler="on_close_activate"/> |
| 557 | + <signal name="activate" handler="close_event" swapped="no"/> |
| 558 | </object> |
| 559 | </child> |
| 560 | <child> |
| 561 | <object class="GtkImageMenuItem" id="quit"> |
| 562 | <property name="label">gtk-quit</property> |
| 563 | <property name="visible">True</property> |
| 564 | + <property name="can_focus">False</property> |
| 565 | + <property name="use_action_appearance">False</property> |
| 566 | <property name="use_underline">True</property> |
| 567 | <property name="use_stock">True</property> |
| 568 | <property name="accel_group">accelgroup1</property> |
| 569 | - <signal name="activate" handler="on_quit_activate"/> |
| 570 | + <signal name="activate" handler="delete_event" swapped="no"/> |
| 571 | </object> |
| 572 | </child> |
| 573 | </object> |
| 574 | @@ -74,14 +290,19 @@ |
| 575 | <child> |
| 576 | <object class="GtkMenuItem" id="menu_edit"> |
| 577 | <property name="visible">True</property> |
| 578 | + <property name="can_focus">False</property> |
| 579 | + <property name="use_action_appearance">False</property> |
| 580 | <property name="label" translatable="yes">_Edit</property> |
| 581 | <property name="use_underline">True</property> |
| 582 | <child type="submenu"> |
| 583 | <object class="GtkMenu" id="menu_edit_menu"> |
| 584 | + <property name="can_focus">False</property> |
| 585 | <child> |
| 586 | <object class="GtkImageMenuItem" id="add"> |
| 587 | <property name="label">gtk-add</property> |
| 588 | <property name="visible">True</property> |
| 589 | + <property name="can_focus">False</property> |
| 590 | + <property name="use_action_appearance">False</property> |
| 591 | <property name="use_underline">True</property> |
| 592 | <property name="use_stock">True</property> |
| 593 | <property name="accel_group">accelgroup1</property> |
| 594 | @@ -91,45 +312,54 @@ |
| 595 | <object class="GtkImageMenuItem" id="remove"> |
| 596 | <property name="label">gtk-remove</property> |
| 597 | <property name="visible">True</property> |
| 598 | + <property name="can_focus">False</property> |
| 599 | + <property name="use_action_appearance">False</property> |
| 600 | <property name="use_underline">True</property> |
| 601 | <property name="use_stock">True</property> |
| 602 | <property name="accel_group">accelgroup1</property> |
| 603 | - <signal name="activate" handler="on_remove_activate"/> |
| 604 | + <signal name="activate" handler="remove_watch" swapped="no"/> |
| 605 | </object> |
| 606 | </child> |
| 607 | <child> |
| 608 | <object class="GtkImageMenuItem" id="edit"> |
| 609 | <property name="label">gtk-edit</property> |
| 610 | <property name="visible">True</property> |
| 611 | + <property name="can_focus">False</property> |
| 612 | + <property name="use_action_appearance">False</property> |
| 613 | <property name="use_underline">True</property> |
| 614 | <property name="use_stock">True</property> |
| 615 | <property name="accel_group">accelgroup1</property> |
| 616 | - <signal name="activate" handler="on_edit_activate"/> |
| 617 | + <signal name="activate" handler="show_edit_watch" swapped="no"/> |
| 618 | </object> |
| 619 | </child> |
| 620 | <child> |
| 621 | <object class="GtkImageMenuItem" id="clear"> |
| 622 | <property name="label" translatable="yes">Mark as read</property> |
| 623 | <property name="visible">True</property> |
| 624 | + <property name="can_focus">False</property> |
| 625 | + <property name="use_action_appearance">False</property> |
| 626 | <property name="use_underline">True</property> |
| 627 | <property name="image">image3</property> |
| 628 | <property name="use_stock">False</property> |
| 629 | - <signal name="activate" handler="on_clear_activate"/> |
| 630 | + <signal name="activate" handler="_mark_watch_as_read" swapped="no"/> |
| 631 | </object> |
| 632 | </child> |
| 633 | <child> |
| 634 | <object class="GtkSeparatorMenuItem" id="separator3"> |
| 635 | <property name="visible">True</property> |
| 636 | + <property name="can_focus">False</property> |
| 637 | </object> |
| 638 | </child> |
| 639 | <child> |
| 640 | <object class="GtkImageMenuItem" id="preferences"> |
| 641 | <property name="label">gtk-preferences</property> |
| 642 | <property name="visible">True</property> |
| 643 | + <property name="can_focus">False</property> |
| 644 | + <property name="use_action_appearance">False</property> |
| 645 | <property name="use_underline">True</property> |
| 646 | <property name="use_stock">True</property> |
| 647 | <property name="accel_group">accelgroup1</property> |
| 648 | - <signal name="activate" handler="on_preferences_activate"/> |
| 649 | + <signal name="activate" handler="show_preferences" swapped="no"/> |
| 650 | </object> |
| 651 | </child> |
| 652 | </object> |
| 653 | @@ -139,83 +369,103 @@ |
| 654 | <child> |
| 655 | <object class="GtkMenuItem" id="menu_view"> |
| 656 | <property name="visible">True</property> |
| 657 | + <property name="can_focus">False</property> |
| 658 | + <property name="use_action_appearance">False</property> |
| 659 | <property name="label" translatable="yes">_View</property> |
| 660 | <property name="use_underline">True</property> |
| 661 | <child type="submenu"> |
| 662 | <object class="GtkMenu" id="menu_view_menu"> |
| 663 | + <property name="can_focus">False</property> |
| 664 | <child> |
| 665 | <object class="GtkImageMenuItem" id="refresh"> |
| 666 | <property name="label">gtk-refresh</property> |
| 667 | <property name="visible">True</property> |
| 668 | + <property name="can_focus">False</property> |
| 669 | + <property name="use_action_appearance">False</property> |
| 670 | <property name="use_underline">True</property> |
| 671 | <property name="use_stock">True</property> |
| 672 | <property name="accel_group">accelgroup1</property> |
| 673 | <accelerator key="F5" signal="activate"/> |
| 674 | - <signal name="activate" handler="on_refresh_activate"/> |
| 675 | + <signal name="activate" handler="refresh_all_watches" swapped="no"/> |
| 676 | </object> |
| 677 | </child> |
| 678 | <child> |
| 679 | <object class="GtkImageMenuItem" id="clear_all1"> |
| 680 | <property name="label" translatable="yes">_Mark all read</property> |
| 681 | <property name="visible">True</property> |
| 682 | + <property name="can_focus">False</property> |
| 683 | + <property name="use_action_appearance">False</property> |
| 684 | <property name="use_underline">True</property> |
| 685 | <property name="image">image4</property> |
| 686 | <property name="use_stock">False</property> |
| 687 | - <signal name="activate" handler="on_clear_all_activate"/> |
| 688 | + <signal name="activate" handler="mark_all_as_read" swapped="no"/> |
| 689 | </object> |
| 690 | </child> |
| 691 | <child> |
| 692 | <object class="GtkSeparatorMenuItem" id="separator1"> |
| 693 | <property name="visible">True</property> |
| 694 | + <property name="can_focus">False</property> |
| 695 | </object> |
| 696 | </child> |
| 697 | <child> |
| 698 | <object class="GtkMenuItem" id="error_log"> |
| 699 | <property name="visible">True</property> |
| 700 | + <property name="can_focus">False</property> |
| 701 | + <property name="use_action_appearance">False</property> |
| 702 | <property name="label" translatable="yes">_Error Log</property> |
| 703 | <property name="use_underline">True</property> |
| 704 | - <signal name="activate" handler="on_error_log_activate"/> |
| 705 | + <signal name="activate" handler="show_error_log" swapped="no"/> |
| 706 | </object> |
| 707 | </child> |
| 708 | <child> |
| 709 | <object class="GtkSeparatorMenuItem" id="separator4"> |
| 710 | <property name="visible">True</property> |
| 711 | + <property name="can_focus">False</property> |
| 712 | </object> |
| 713 | </child> |
| 714 | <child> |
| 715 | <object class="GtkImageMenuItem" id="sorting"> |
| 716 | <property name="label" translatable="yes">Sorting</property> |
| 717 | <property name="visible">True</property> |
| 718 | + <property name="can_focus">False</property> |
| 719 | + <property name="use_action_appearance">False</property> |
| 720 | <property name="use_underline">True</property> |
| 721 | <property name="image">image5</property> |
| 722 | <property name="use_stock">False</property> |
| 723 | <child type="submenu"> |
| 724 | <object class="GtkMenu" id="sorting_menu"> |
| 725 | + <property name="can_focus">False</property> |
| 726 | <child> |
| 727 | <object class="GtkRadioMenuItem" id="by_watch_type"> |
| 728 | <property name="visible">True</property> |
| 729 | + <property name="can_focus">False</property> |
| 730 | + <property name="use_action_appearance">False</property> |
| 731 | <property name="label" translatable="yes">By Watch Type</property> |
| 732 | <property name="use_underline">True</property> |
| 733 | <property name="active">True</property> |
| 734 | - <signal name="activate" handler="on_by_watch_type_activate"/> |
| 735 | + <signal name="activate" handler="sort_type" swapped="no"/> |
| 736 | </object> |
| 737 | </child> |
| 738 | <child> |
| 739 | <object class="GtkRadioMenuItem" id="by_name"> |
| 740 | <property name="visible">True</property> |
| 741 | + <property name="can_focus">False</property> |
| 742 | + <property name="use_action_appearance">False</property> |
| 743 | <property name="label" translatable="yes">By Name</property> |
| 744 | <property name="use_underline">True</property> |
| 745 | <property name="group">by_watch_type</property> |
| 746 | - <signal name="activate" handler="on_by_name_activate"/> |
| 747 | + <signal name="activate" handler="sort_name" swapped="no"/> |
| 748 | </object> |
| 749 | </child> |
| 750 | <child> |
| 751 | <object class="GtkRadioMenuItem" id="by_watch_active"> |
| 752 | <property name="visible">True</property> |
| 753 | + <property name="can_focus">False</property> |
| 754 | + <property name="use_action_appearance">False</property> |
| 755 | <property name="label" translatable="yes">By Active</property> |
| 756 | <property name="use_underline">True</property> |
| 757 | <property name="group">by_watch_type</property> |
| 758 | - <signal name="activate" handler="on_by_watch_active_activate"/> |
| 759 | + <signal name="activate" handler="sort_active" swapped="no"/> |
| 760 | </object> |
| 761 | </child> |
| 762 | </object> |
| 763 | @@ -225,23 +475,28 @@ |
| 764 | <child> |
| 765 | <object class="GtkSeparatorMenuItem" id="separator2"> |
| 766 | <property name="visible">True</property> |
| 767 | + <property name="can_focus">False</property> |
| 768 | </object> |
| 769 | </child> |
| 770 | <child> |
| 771 | <object class="GtkCheckMenuItem" id="display_all_watches"> |
| 772 | <property name="visible">True</property> |
| 773 | + <property name="can_focus">False</property> |
| 774 | + <property name="use_action_appearance">False</property> |
| 775 | <property name="label" translatable="yes">Display _All Watches</property> |
| 776 | <property name="use_underline">True</property> |
| 777 | - <signal name="activate" handler="on_display_all_watches_activate"/> |
| 778 | + <signal name="activate" handler="toggle_show_deactivated_watches" swapped="no"/> |
| 779 | </object> |
| 780 | </child> |
| 781 | <child> |
| 782 | <object class="GtkCheckMenuItem" id="display_toolbar"> |
| 783 | <property name="visible">True</property> |
| 784 | + <property name="can_focus">False</property> |
| 785 | + <property name="use_action_appearance">False</property> |
| 786 | <property name="label" translatable="yes">Display _Toolbar</property> |
| 787 | <property name="use_underline">True</property> |
| 788 | <property name="active">True</property> |
| 789 | - <signal name="activate" handler="on_display_toolbar_activate"/> |
| 790 | + <signal name="activate" handler="toggle_display_toolbar" swapped="no"/> |
| 791 | </object> |
| 792 | </child> |
| 793 | </object> |
| 794 | @@ -251,28 +506,35 @@ |
| 795 | <child> |
| 796 | <object class="GtkMenuItem" id="menu_help"> |
| 797 | <property name="visible">True</property> |
| 798 | + <property name="can_focus">False</property> |
| 799 | + <property name="use_action_appearance">False</property> |
| 800 | <property name="label" translatable="yes">_Help</property> |
| 801 | <property name="use_underline">True</property> |
| 802 | <child type="submenu"> |
| 803 | <object class="GtkMenu" id="menu_help_menu"> |
| 804 | + <property name="can_focus">False</property> |
| 805 | <child> |
| 806 | <object class="GtkImageMenuItem" id="help"> |
| 807 | <property name="label">gtk-help</property> |
| 808 | <property name="visible">True</property> |
| 809 | + <property name="can_focus">False</property> |
| 810 | + <property name="use_action_appearance">False</property> |
| 811 | <property name="use_underline">True</property> |
| 812 | <property name="use_stock">True</property> |
| 813 | <property name="accel_group">accelgroup1</property> |
| 814 | - <signal name="activate" handler="on_help_activate"/> |
| 815 | + <signal name="activate" handler="show_help" swapped="no"/> |
| 816 | </object> |
| 817 | </child> |
| 818 | <child> |
| 819 | <object class="GtkImageMenuItem" id="about"> |
| 820 | <property name="label">gtk-about</property> |
| 821 | <property name="visible">True</property> |
| 822 | + <property name="can_focus">False</property> |
| 823 | + <property name="use_action_appearance">False</property> |
| 824 | <property name="use_underline">True</property> |
| 825 | <property name="use_stock">True</property> |
| 826 | <property name="accel_group">accelgroup1</property> |
| 827 | - <signal name="activate" handler="on_about_activate"/> |
| 828 | + <signal name="activate" handler="show_about" swapped="no"/> |
| 829 | </object> |
| 830 | </child> |
| 831 | </object> |
| 832 | @@ -289,14 +551,17 @@ |
| 833 | <child> |
| 834 | <object class="GtkToolbar" id="toolbar"> |
| 835 | <property name="visible">True</property> |
| 836 | + <property name="can_focus">False</property> |
| 837 | <child> |
| 838 | <object class="GtkToolButton" id="button_refresh"> |
| 839 | <property name="visible">True</property> |
| 840 | + <property name="can_focus">False</property> |
| 841 | + <property name="use_action_appearance">False</property> |
| 842 | <property name="is_important">True</property> |
| 843 | <property name="label" translatable="yes">_Refresh All</property> |
| 844 | <property name="use_underline">True</property> |
| 845 | <property name="stock_id">gtk-refresh</property> |
| 846 | - <signal name="clicked" handler="on_refresh_activate"/> |
| 847 | + <signal name="clicked" handler="refresh_all_watches" swapped="no"/> |
| 848 | </object> |
| 849 | <packing> |
| 850 | <property name="expand">False</property> |
| 851 | @@ -306,11 +571,13 @@ |
| 852 | <child> |
| 853 | <object class="GtkToolButton" id="button_clear_all"> |
| 854 | <property name="visible">True</property> |
| 855 | + <property name="can_focus">False</property> |
| 856 | + <property name="use_action_appearance">False</property> |
| 857 | <property name="is_important">True</property> |
| 858 | <property name="label" translatable="yes">_Mark all read</property> |
| 859 | <property name="use_underline">True</property> |
| 860 | <property name="stock_id">gtk-clear</property> |
| 861 | - <signal name="clicked" handler="on_clear_all_activate"/> |
| 862 | + <signal name="clicked" handler="mark_all_as_read" swapped="no"/> |
| 863 | </object> |
| 864 | <packing> |
| 865 | <property name="expand">False</property> |
| 866 | @@ -320,9 +587,11 @@ |
| 867 | <child> |
| 868 | <object class="GtkMenuToolButton" id="button_add"> |
| 869 | <property name="visible">True</property> |
| 870 | + <property name="can_focus">False</property> |
| 871 | + <property name="use_action_appearance">False</property> |
| 872 | <property name="is_important">True</property> |
| 873 | <property name="stock_id">gtk-add</property> |
| 874 | - <signal name="clicked" handler="on_add_activate"/> |
| 875 | + <signal name="clicked" handler="show_add_watch_menu" swapped="no"/> |
| 876 | </object> |
| 877 | <packing> |
| 878 | <property name="expand">False</property> |
| 879 | @@ -340,20 +609,96 @@ |
| 880 | <property name="visible">True</property> |
| 881 | <property name="can_focus">True</property> |
| 882 | <property name="hscrollbar_policy">never</property> |
| 883 | - <property name="vscrollbar_policy">automatic</property> |
| 884 | + <property name="vscrollbar_policy">never</property> |
| 885 | <property name="shadow_type">in</property> |
| 886 | <child> |
| 887 | <object class="GtkTreeView" id="treeview"> |
| 888 | <property name="visible">True</property> |
| 889 | <property name="can_focus">True</property> |
| 890 | + <property name="model">liststore</property> |
| 891 | <property name="rules_hint">True</property> |
| 892 | - <property name="enable_search">False</property> |
| 893 | - <signal name="cursor_changed" handler="on_treeview_cursor_changed"/> |
| 894 | - <signal name="row_activated" handler="on_treeview_row_activated"/> |
| 895 | + <property name="search_column">0</property> |
| 896 | + <signal name="cursor-changed" handler="show_watch_info" swapped="no"/> |
| 897 | + <signal name="row-activated" handler="open_watch_callback" swapped="no"/> |
| 898 | + <child> |
| 899 | + <object class="GtkTreeViewColumn" id="active_treeviewcolumn"> |
| 900 | + <property name="title" translatable="yes">Active</property> |
| 901 | + <property name="reorderable">True</property> |
| 902 | + <property name="sort_column_id">0</property> |
| 903 | + <signal name="clicked" handler="sort_active_from_treeview_headers" swapped="no"/> |
| 904 | + <child> |
| 905 | + <object class="GtkCellRendererToggle" id="cellrenderertoggle1"> |
| 906 | + <signal name="toggled" handler="check_clicked" swapped="no"/> |
| 907 | + </object> |
| 908 | + <attributes> |
| 909 | + <attribute name="active">0</attribute> |
| 910 | + </attributes> |
| 911 | + </child> |
| 912 | + </object> |
| 913 | + </child> |
| 914 | + <child> |
| 915 | + <object class="GtkTreeViewColumn" id="type_treeviewcolumn"> |
| 916 | + <property name="title" translatable="yes">Type</property> |
| 917 | + <property name="reorderable">True</property> |
| 918 | + <property name="sort_column_id">1</property> |
| 919 | + <signal name="clicked" handler="sort_type_from_treeview_headers" swapped="no"/> |
| 920 | + <child> |
| 921 | + <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/> |
| 922 | + <attributes> |
| 923 | + <attribute name="pixbuf">1</attribute> |
| 924 | + </attributes> |
| 925 | + </child> |
| 926 | + </object> |
| 927 | + </child> |
| 928 | + <child> |
| 929 | + <object class="GtkTreeViewColumn" id="name_treeviewcolumn"> |
| 930 | + <property name="resizable">True</property> |
| 931 | + <property name="title" translatable="yes">Name</property> |
| 932 | + <property name="expand">True</property> |
| 933 | + <property name="reorderable">True</property> |
| 934 | + <property name="sort_column_id">2</property> |
| 935 | + <signal name="clicked" handler="sort_name_from_treeview_headers" swapped="no"/> |
| 936 | + <child> |
| 937 | + <object class="GtkCellRendererText" id="cellrenderertext1"> |
| 938 | + <property name="editable">True</property> |
| 939 | + <signal name="edited" handler="change_entry_name" swapped="no"/> |
| 940 | + </object> |
| 941 | + <attributes> |
| 942 | + <attribute name="text">2</attribute> |
| 943 | + </attributes> |
| 944 | + </child> |
| 945 | + </object> |
| 946 | + </child> |
| 947 | + <child> |
| 948 | + <object class="GtkTreeViewColumn" id="_ID_treeviewcolumn"> |
| 949 | + <property name="visible">False</property> |
| 950 | + <property name="title" translatable="yes">ID</property> |
| 951 | + <child> |
| 952 | + <object class="GtkCellRendererText" id="cellrenderertext2"/> |
| 953 | + <attributes> |
| 954 | + <attribute name="text">3</attribute> |
| 955 | + </attributes> |
| 956 | + </child> |
| 957 | + </object> |
| 958 | + </child> |
| 959 | + <child> |
| 960 | + <object class="GtkTreeViewColumn" id="_TYPE_treeviewcolumn"> |
| 961 | + <property name="visible">False</property> |
| 962 | + <property name="title" translatable="yes">TYPE</property> |
| 963 | + <child> |
| 964 | + <object class="GtkCellRendererText" id="cellrenderertext3"/> |
| 965 | + <attributes> |
| 966 | + <attribute name="text">4</attribute> |
| 967 | + </attributes> |
| 968 | + </child> |
| 969 | + </object> |
| 970 | + </child> |
| 971 | </object> |
| 972 | </child> |
| 973 | </object> |
| 974 | <packing> |
| 975 | + <property name="expand">True</property> |
| 976 | + <property name="fill">True</property> |
| 977 | <property name="position">2</property> |
| 978 | </packing> |
| 979 | </child> |
| 980 | @@ -361,11 +706,13 @@ |
| 981 | <object class="GtkHBox" id="hbox1"> |
| 982 | <property name="height_request">145</property> |
| 983 | <property name="visible">True</property> |
| 984 | + <property name="can_focus">False</property> |
| 985 | <property name="border_width">6</property> |
| 986 | <property name="spacing">6</property> |
| 987 | <child> |
| 988 | <object class="GtkHBox" id="vbox_info"> |
| 989 | <property name="visible">True</property> |
| 990 | + <property name="can_focus">False</property> |
| 991 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
| 992 | <child> |
| 993 | <object class="GtkNotebook" id="notebook1"> |
| 994 | @@ -375,22 +722,26 @@ |
| 995 | <child> |
| 996 | <object class="GtkHBox" id="hbox2"> |
| 997 | <property name="visible">True</property> |
| 998 | + <property name="can_focus">False</property> |
| 999 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
| 1000 | <property name="spacing">6</property> |
| 1001 | <child> |
| 1002 | <object class="GtkImage" id="watch_icon"> |
| 1003 | <property name="visible">True</property> |
| 1004 | + <property name="can_focus">False</property> |
| 1005 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
| 1006 | <property name="stock">gtk-info</property> |
| 1007 | </object> |
| 1008 | <packing> |
| 1009 | <property name="expand">False</property> |
| 1010 | + <property name="fill">True</property> |
| 1011 | <property name="position">0</property> |
| 1012 | </packing> |
| 1013 | </child> |
| 1014 | <child> |
| 1015 | <object class="GtkVBox" id="vbox_watch_info"> |
| 1016 | <property name="visible">True</property> |
| 1017 | + <property name="can_focus">False</property> |
| 1018 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
| 1019 | <property name="border_width">6</property> |
| 1020 | <child> |
| 1021 | @@ -398,6 +749,8 @@ |
| 1022 | </child> |
| 1023 | </object> |
| 1024 | <packing> |
| 1025 | + <property name="expand">True</property> |
| 1026 | + <property name="fill">True</property> |
| 1027 | <property name="position">1</property> |
| 1028 | </packing> |
| 1029 | </child> |
| 1030 | @@ -406,6 +759,7 @@ |
| 1031 | <child type="tab"> |
| 1032 | <object class="GtkLabel" id="label20"> |
| 1033 | <property name="visible">True</property> |
| 1034 | + <property name="can_focus">False</property> |
| 1035 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
| 1036 | <property name="label" translatable="yes">General</property> |
| 1037 | </object> |
| 1038 | @@ -416,6 +770,7 @@ |
| 1039 | <child> |
| 1040 | <object class="GtkLabel" id="lblExtraInfo"> |
| 1041 | <property name="visible">True</property> |
| 1042 | + <property name="can_focus">False</property> |
| 1043 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
| 1044 | <property name="xalign">0</property> |
| 1045 | <property name="xpad">6</property> |
| 1046 | @@ -431,6 +786,7 @@ |
| 1047 | <child type="tab"> |
| 1048 | <object class="GtkLabel" id="label21"> |
| 1049 | <property name="visible">True</property> |
| 1050 | + <property name="can_focus">False</property> |
| 1051 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
| 1052 | <property name="label" translatable="yes">Extra information</property> |
| 1053 | </object> |
| 1054 | @@ -441,17 +797,22 @@ |
| 1055 | </child> |
| 1056 | </object> |
| 1057 | <packing> |
| 1058 | + <property name="expand">True</property> |
| 1059 | + <property name="fill">True</property> |
| 1060 | <property name="position">-1</property> |
| 1061 | </packing> |
| 1062 | </child> |
| 1063 | </object> |
| 1064 | <packing> |
| 1065 | + <property name="expand">True</property> |
| 1066 | + <property name="fill">True</property> |
| 1067 | <property name="position">0</property> |
| 1068 | </packing> |
| 1069 | </child> |
| 1070 | <child> |
| 1071 | <object class="GtkVButtonBox" id="vbox_panel_buttons"> |
| 1072 | <property name="visible">True</property> |
| 1073 | + <property name="can_focus">False</property> |
| 1074 | <property name="spacing">6</property> |
| 1075 | <property name="layout_style">start</property> |
| 1076 | <child> |
| 1077 | @@ -461,8 +822,9 @@ |
| 1078 | <property name="can_focus">True</property> |
| 1079 | <property name="can_default">True</property> |
| 1080 | <property name="receives_default">False</property> |
| 1081 | + <property name="use_action_appearance">False</property> |
| 1082 | <property name="use_stock">True</property> |
| 1083 | - <signal name="clicked" handler="on_btnOpen_clicked"/> |
| 1084 | + <signal name="clicked" handler="open_watch_callback" swapped="no"/> |
| 1085 | </object> |
| 1086 | <packing> |
| 1087 | <property name="expand">False</property> |
| 1088 | @@ -477,7 +839,8 @@ |
| 1089 | <property name="can_focus">True</property> |
| 1090 | <property name="can_default">True</property> |
| 1091 | <property name="receives_default">False</property> |
| 1092 | - <signal name="clicked" handler="on_btnClear_clicked"/> |
| 1093 | + <property name="use_action_appearance">False</property> |
| 1094 | + <signal name="clicked" handler="mark_watch_as_read" swapped="no"/> |
| 1095 | </object> |
| 1096 | <packing> |
| 1097 | <property name="expand">False</property> |
| 1098 | @@ -492,8 +855,9 @@ |
| 1099 | <property name="can_focus">True</property> |
| 1100 | <property name="can_default">True</property> |
| 1101 | <property name="receives_default">False</property> |
| 1102 | + <property name="use_action_appearance">False</property> |
| 1103 | <property name="use_stock">True</property> |
| 1104 | - <signal name="clicked" handler="on_btnEdit_clicked"/> |
| 1105 | + <signal name="clicked" handler="show_edit_watch" swapped="no"/> |
| 1106 | </object> |
| 1107 | <packing> |
| 1108 | <property name="expand">False</property> |
| 1109 | @@ -504,6 +868,7 @@ |
| 1110 | </object> |
| 1111 | <packing> |
| 1112 | <property name="expand">False</property> |
| 1113 | + <property name="fill">True</property> |
| 1114 | <property name="pack_type">end</property> |
| 1115 | <property name="position">1</property> |
| 1116 | </packing> |
| 1117 | @@ -516,168 +881,16 @@ |
| 1118 | </packing> |
| 1119 | </child> |
| 1120 | <child> |
| 1121 | - <object class="GtkStatusbar" id="statusbar1"/> |
| 1122 | + <object class="GtkStatusbar" id="statusbar1"> |
| 1123 | + <property name="can_focus">False</property> |
| 1124 | + </object> |
| 1125 | <packing> |
| 1126 | <property name="expand">False</property> |
| 1127 | + <property name="fill">True</property> |
| 1128 | <property name="position">4</property> |
| 1129 | </packing> |
| 1130 | </child> |
| 1131 | </object> |
| 1132 | </child> |
| 1133 | </object> |
| 1134 | - <object class="GtkWindow" id="error_dialog"> |
| 1135 | - <property name="title" translatable="yes">Error</property> |
| 1136 | - <property name="resizable">False</property> |
| 1137 | - <property name="window_position">center-on-parent</property> |
| 1138 | - <child> |
| 1139 | - <object class="GtkVBox" id="vbox1"> |
| 1140 | - <property name="visible">True</property> |
| 1141 | - <property name="border_width">6</property> |
| 1142 | - <child> |
| 1143 | - <object class="GtkHBox" id="hbox4"> |
| 1144 | - <property name="visible">True</property> |
| 1145 | - <child> |
| 1146 | - <object class="GtkImage" id="image"> |
| 1147 | - <property name="visible">True</property> |
| 1148 | - <property name="stock">gtk-missing-image</property> |
| 1149 | - </object> |
| 1150 | - <packing> |
| 1151 | - <property name="position">0</property> |
| 1152 | - </packing> |
| 1153 | - </child> |
| 1154 | - <child> |
| 1155 | - <object class="GtkLabel" id="label4"> |
| 1156 | - <property name="visible">True</property> |
| 1157 | - </object> |
| 1158 | - <packing> |
| 1159 | - <property name="padding">6</property> |
| 1160 | - <property name="position">1</property> |
| 1161 | - </packing> |
| 1162 | - </child> |
| 1163 | - </object> |
| 1164 | - <packing> |
| 1165 | - <property name="expand">False</property> |
| 1166 | - <property name="fill">False</property> |
| 1167 | - <property name="padding">6</property> |
| 1168 | - <property name="position">0</property> |
| 1169 | - </packing> |
| 1170 | - </child> |
| 1171 | - <child> |
| 1172 | - <object class="GtkExpander" id="expander1"> |
| 1173 | - <property name="visible">True</property> |
| 1174 | - <property name="can_focus">True</property> |
| 1175 | - <child> |
| 1176 | - <object class="GtkScrolledWindow" id="scrolledwindow1"> |
| 1177 | - <property name="visible">True</property> |
| 1178 | - <property name="can_focus">True</property> |
| 1179 | - <property name="hscrollbar_policy">automatic</property> |
| 1180 | - <property name="vscrollbar_policy">automatic</property> |
| 1181 | - <child> |
| 1182 | - <object class="GtkTextView" id="error_message"> |
| 1183 | - <property name="height_request">200</property> |
| 1184 | - <property name="visible">True</property> |
| 1185 | - <property name="can_focus">True</property> |
| 1186 | - </object> |
| 1187 | - </child> |
| 1188 | - </object> |
| 1189 | - </child> |
| 1190 | - <child type="label"> |
| 1191 | - <object class="GtkLabel" id="label2"> |
| 1192 | - <property name="visible">True</property> |
| 1193 | - <property name="label" translatable="yes">Debug information</property> |
| 1194 | - </object> |
| 1195 | - </child> |
| 1196 | - </object> |
| 1197 | - <packing> |
| 1198 | - <property name="padding">6</property> |
| 1199 | - <property name="position">1</property> |
| 1200 | - </packing> |
| 1201 | - </child> |
| 1202 | - <child> |
| 1203 | - <object class="GtkHSeparator" id="hseparator1"> |
| 1204 | - <property name="visible">True</property> |
| 1205 | - </object> |
| 1206 | - <packing> |
| 1207 | - <property name="expand">False</property> |
| 1208 | - <property name="padding">6</property> |
| 1209 | - <property name="position">2</property> |
| 1210 | - </packing> |
| 1211 | - </child> |
| 1212 | - <child> |
| 1213 | - <object class="GtkHBox" id="hbox3"> |
| 1214 | - <property name="visible">True</property> |
| 1215 | - <child> |
| 1216 | - <object class="GtkButton" id="send"> |
| 1217 | - <property name="label" translatable="yes">Visit the issue tracker</property> |
| 1218 | - <property name="visible">True</property> |
| 1219 | - <property name="can_focus">True</property> |
| 1220 | - <property name="receives_default">True</property> |
| 1221 | - </object> |
| 1222 | - <packing> |
| 1223 | - <property name="padding">6</property> |
| 1224 | - <property name="position">0</property> |
| 1225 | - </packing> |
| 1226 | - </child> |
| 1227 | - <child> |
| 1228 | - <object class="GtkLabel" id="label3"> |
| 1229 | - <property name="visible">True</property> |
| 1230 | - </object> |
| 1231 | - <packing> |
| 1232 | - <property name="padding">6</property> |
| 1233 | - <property name="position">1</property> |
| 1234 | - </packing> |
| 1235 | - </child> |
| 1236 | - <child> |
| 1237 | - <object class="GtkLabel" id="label1"> |
| 1238 | - <property name="visible">True</property> |
| 1239 | - </object> |
| 1240 | - <packing> |
| 1241 | - <property name="position">2</property> |
| 1242 | - </packing> |
| 1243 | - </child> |
| 1244 | - <child> |
| 1245 | - <object class="GtkButton" id="ok"> |
| 1246 | - <property name="label">gtk-ok</property> |
| 1247 | - <property name="visible">True</property> |
| 1248 | - <property name="can_focus">True</property> |
| 1249 | - <property name="receives_default">True</property> |
| 1250 | - <property name="use_stock">True</property> |
| 1251 | - </object> |
| 1252 | - <packing> |
| 1253 | - <property name="padding">6</property> |
| 1254 | - <property name="position">3</property> |
| 1255 | - </packing> |
| 1256 | - </child> |
| 1257 | - </object> |
| 1258 | - <packing> |
| 1259 | - <property name="expand">False</property> |
| 1260 | - <property name="fill">False</property> |
| 1261 | - <property name="padding">6</property> |
| 1262 | - <property name="position">3</property> |
| 1263 | - </packing> |
| 1264 | - </child> |
| 1265 | - </object> |
| 1266 | - </child> |
| 1267 | - </object> |
| 1268 | - <object class="GtkImage" id="image1"> |
| 1269 | - <property name="visible">True</property> |
| 1270 | - <property name="stock">gtk-open</property> |
| 1271 | - </object> |
| 1272 | - <object class="GtkImage" id="image2"> |
| 1273 | - <property name="visible">True</property> |
| 1274 | - <property name="stock">gtk-save</property> |
| 1275 | - </object> |
| 1276 | - <object class="GtkImage" id="image3"> |
| 1277 | - <property name="visible">True</property> |
| 1278 | - <property name="stock">gtk-clear</property> |
| 1279 | - </object> |
| 1280 | - <object class="GtkImage" id="image4"> |
| 1281 | - <property name="visible">True</property> |
| 1282 | - <property name="stock">gtk-clear</property> |
| 1283 | - </object> |
| 1284 | - <object class="GtkImage" id="image5"> |
| 1285 | - <property name="visible">True</property> |
| 1286 | - <property name="stock">gtk-sort-ascending</property> |
| 1287 | - </object> |
| 1288 | - <object class="GtkAccelGroup" id="accelgroup1"/> |
| 1289 | </interface> |
| 1290 | |
| 1291 | === modified file 'spectlib/about.py' |
| 1292 | --- spectlib/about.py 2010-11-23 15:42:22 +0000 |
| 1293 | +++ spectlib/about.py 2011-05-24 17:11:46 +0000 |
| 1294 | @@ -40,35 +40,18 @@ |
| 1295 | |
| 1296 | license_file_path = (os.path.join(get_path(category="doc"), "COPYING")) |
| 1297 | with open(license_file_path, "r") as license_file: |
| 1298 | - license = license_file.read() |
| 1299 | - |
| 1300 | - authors_file_path = (os.path.join(get_path(category="doc"), "AUTHORS")) |
| 1301 | - with open(authors_file_path, "r") as authors_file: |
| 1302 | - # this is a hack, because gtk.AboutDialog expects a list, not a file |
| 1303 | - authors = authors_file.readlines() |
| 1304 | + _license = license_file.read() |
| 1305 | |
| 1306 | logo = gtk.gdk.pixbuf_new_from_file(os.path.join(self.specto.PATH, "icons/specto_about.png")) |
| 1307 | |
| 1308 | - # gtk.AboutDialog will detect if "translator-credits" is untranslated, |
| 1309 | - # and hide the tab. |
| 1310 | - translator_credits = _("translator-credits") |
| 1311 | - |
| 1312 | - #create tree |
| 1313 | - self.about = gtk.AboutDialog() |
| 1314 | - |
| 1315 | - self.about.set_name("Specto") |
| 1316 | + uifile = os.path.join(self.specto.PATH, "uis/about.ui") |
| 1317 | + windowname = "about" |
| 1318 | + self.builder = gtk.Builder() |
| 1319 | + self.builder.set_translation_domain("specto") |
| 1320 | + self.builder.add_from_file(uifile) |
| 1321 | + self.about = self.builder.get_object("aboutdialog1") |
| 1322 | self.about.set_version(self.specto.VERSION) |
| 1323 | - self.about.set_copyright("Copyright © Jean-François Fortin Tam & Wout Clymans") |
| 1324 | - self.about.set_comments(_("Be notified of everything")) |
| 1325 | - self.about.set_license(license) |
| 1326 | - #self.wTree.set_wrap_license(license) |
| 1327 | - gtk.about_dialog_set_url_hook(lambda about, url: show_webpage(url)) |
| 1328 | - self.about.set_website("http://specto.sourceforge.net") |
| 1329 | - self.about.set_website_label(_("Specto's Website")) |
| 1330 | - self.about.set_authors(authors) |
| 1331 | - #self.about.set_documenters(documenters) |
| 1332 | - #self.about.set_artists(artists) |
| 1333 | - self.about.set_translator_credits(translator_credits) |
| 1334 | + self.about.set_license(_license) |
| 1335 | self.about.set_logo(logo) |
| 1336 | |
| 1337 | icon = gtk.gdk.pixbuf_new_from_file(os.path.join(self.specto.PATH, "icons/specto_window_icon.png")) |
| 1338 | |
| 1339 | === modified file 'spectlib/export_watch.py' |
| 1340 | --- spectlib/export_watch.py 2010-11-23 15:28:11 +0000 |
| 1341 | +++ spectlib/export_watch.py 2011-05-24 17:11:46 +0000 |
| 1342 | @@ -57,80 +57,35 @@ |
| 1343 | self.export_watch.set_title(_("Export watches")) |
| 1344 | self.builder.get_object("button_action").set_label(_("Export watches")) |
| 1345 | |
| 1346 | - self.model = gtk.ListStore(gobject.TYPE_BOOLEAN, gtk.gdk.Pixbuf, \ |
| 1347 | - gobject.TYPE_STRING, gobject.TYPE_INT, gobject.TYPE_STRING) |
| 1348 | + self.model = self.builder.get_object("liststore1") |
| 1349 | self.new_watch_db = {} |
| 1350 | - |
| 1351 | - #catch some events |
| 1352 | - dic = {"on_button_select_all_clicked": self.select_all, |
| 1353 | - "on_button_deselect_all_clicked": self.deselect_all, |
| 1354 | - "on_button_action_clicked": self.do_action, |
| 1355 | - "on_button_close_clicked": self.delete_event} |
| 1356 | - |
| 1357 | + |
| 1358 | #attach the events |
| 1359 | - self.builder.connect_signals(dic) |
| 1360 | + self.builder.connect_signals(self) |
| 1361 | |
| 1362 | icon = gtk.gdk.pixbuf_new_from_file(os.path.join(self.specto.PATH, "icons/specto_window_icon.png")) |
| 1363 | self.export_watch.set_icon(icon) |
| 1364 | |
| 1365 | self.treeview = self.builder.get_object("treeview") |
| 1366 | - self.treeview.set_model(self.model) |
| 1367 | self.treeview.set_flags(gtk.TREE_MODEL_ITERS_PERSIST) |
| 1368 | self.iter = {} |
| 1369 | |
| 1370 | - ### Checkbox |
| 1371 | - self.renderer = gtk.CellRendererToggle() |
| 1372 | - self.renderer.set_property("activatable", True) |
| 1373 | - self.renderer.connect("toggled", self.check_clicked, self.model) |
| 1374 | - self.columnCheck = gtk.TreeViewColumn(_("Select"), \ |
| 1375 | - self.renderer, active=0) |
| 1376 | - self.treeview.append_column(self.columnCheck) |
| 1377 | - |
| 1378 | - ### Icon |
| 1379 | - self.renderer = gtk.CellRendererPixbuf() |
| 1380 | - self.columnIcon = gtk.TreeViewColumn(_("Type"), \ |
| 1381 | - self.renderer, pixbuf=1) |
| 1382 | - self.treeview.append_column(self.columnIcon) |
| 1383 | - |
| 1384 | - ### Titre |
| 1385 | - self.renderer = gtk.CellRendererText() |
| 1386 | - self.columnTitel = gtk.TreeViewColumn(_("Name"), \ |
| 1387 | - self.renderer, markup=2) |
| 1388 | - self.columnTitel.set_expand(True) |
| 1389 | - self.columnTitel.set_resizable(True) |
| 1390 | - self.treeview.append_column(self.columnTitel) |
| 1391 | - |
| 1392 | - ### ID |
| 1393 | - self.renderer = gtk.CellRendererText() |
| 1394 | - self.column = gtk.TreeViewColumn(_("ID"), self.renderer, markup=3) |
| 1395 | - self.column.set_visible(False) |
| 1396 | - #self.column.set_sort_column_id(3) |
| 1397 | - self.treeview.append_column(self.column) |
| 1398 | - |
| 1399 | - ### type |
| 1400 | - self.renderer = gtk.CellRendererText() |
| 1401 | - self.columnType = gtk.TreeViewColumn(_("TYPE"), \ |
| 1402 | - self.renderer, markup=4) |
| 1403 | - self.columnType.set_visible(False) |
| 1404 | - #self.columnType.set_sort_column_id(4) |
| 1405 | - self.treeview.append_column(self.columnType) |
| 1406 | - |
| 1407 | for watch in self.specto.watch_db: |
| 1408 | - if watch.deleted == False: |
| 1409 | + if not watch.deleted: |
| 1410 | self.add_watch_entry(watch.id) |
| 1411 | |
| 1412 | def select_all(self, widget): |
| 1413 | db = self.specto.watch_db |
| 1414 | |
| 1415 | for watch in db: |
| 1416 | - if watch.deleted == False: |
| 1417 | + if not watch.deleted: |
| 1418 | self.model.set_value(self.iter[watch.id], 0, 1) |
| 1419 | |
| 1420 | def deselect_all(self, widget): |
| 1421 | db = self.specto.watch_db |
| 1422 | |
| 1423 | for watch in db: |
| 1424 | - if watch.deleted == False: |
| 1425 | + if not watch.deleted: |
| 1426 | self.model.set_value(self.iter[watch.id], 0, 0) |
| 1427 | |
| 1428 | def do_action(self, widget): |
| 1429 | @@ -154,7 +109,7 @@ |
| 1430 | watch_db = self.specto.watch_db |
| 1431 | |
| 1432 | for watch in watch_db: |
| 1433 | - if watch.deleted == False: |
| 1434 | + if not watch.deleted: |
| 1435 | if self.model.get_value(self.iter[watch.id], 0) == True: |
| 1436 | selected_watches_db[i] = watch |
| 1437 | i += 1 |
| 1438 | @@ -175,16 +130,17 @@ |
| 1439 | def set_new_watch_db(self, watch_db): |
| 1440 | self.new_watch_db = watch_db |
| 1441 | |
| 1442 | - def check_clicked(self, object, path, model): |
| 1443 | + def check_clicked(self, obj, model): |
| 1444 | """ Call the main function to start/stop the selected watch. """ |
| 1445 | sel = self.treeview.get_selection() |
| 1446 | - sel.select_path(path) |
| 1447 | - model, iter = self.treeview.get_selection().get_selected() |
| 1448 | - |
| 1449 | - if model.get_value(iter, 0): |
| 1450 | - model.set_value(iter, 0, 0) |
| 1451 | + sel.select_path(model) |
| 1452 | + model, _iter = sel.get_selected() |
| 1453 | + if not _iter: |
| 1454 | + return |
| 1455 | + if model.get_value(_iter, 0): |
| 1456 | + model.set_value(_iter, 0, 0) |
| 1457 | else: |
| 1458 | - model.set_value(iter, 0, 1) |
| 1459 | + model.set_value(_iter, 0, 1) |
| 1460 | |
| 1461 | |
| 1462 | class ExportSaveDialog(SaveDialog): |
| 1463 | |
| 1464 | === modified file 'spectlib/import_watch.py' |
| 1465 | --- spectlib/import_watch.py 2010-11-23 15:28:11 +0000 |
| 1466 | +++ spectlib/import_watch.py 2011-05-24 17:11:46 +0000 |
| 1467 | @@ -67,72 +67,32 @@ |
| 1468 | self.import_watch.set_title(_("Import watches")) |
| 1469 | self.builder.get_object("button_action").set_label(_("Import watches")) |
| 1470 | |
| 1471 | - self.model = gtk.ListStore(gobject.TYPE_BOOLEAN, gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_INT, gobject.TYPE_STRING) |
| 1472 | + self.model = self.builder.get_object("liststore1") |
| 1473 | self.new_watch_db = {} |
| 1474 | |
| 1475 | - #catch some events |
| 1476 | - dic = {"on_button_select_all_clicked": self.select_all, |
| 1477 | - "on_button_deselect_all_clicked": self.deselect_all, |
| 1478 | - "on_button_action_clicked": self.import_watches, |
| 1479 | - "on_button_close_clicked": self.delete_event} |
| 1480 | - |
| 1481 | #attach the events |
| 1482 | - self.builder.connect_signals(dic) |
| 1483 | + self.builder.connect_signals(self) |
| 1484 | |
| 1485 | icon = gtk.gdk.pixbuf_new_from_file(os.path.join(self.specto.PATH, "icons/specto_window_icon.png")) |
| 1486 | self.import_watch.set_icon(icon) |
| 1487 | |
| 1488 | self.treeview = self.builder.get_object("treeview") |
| 1489 | - self.treeview.set_model(self.model) |
| 1490 | self.treeview.set_flags(gtk.TREE_MODEL_ITERS_PERSIST) |
| 1491 | self.iter = {} |
| 1492 | |
| 1493 | - ### Checkbox |
| 1494 | - self.renderer = gtk.CellRendererToggle() |
| 1495 | - self.renderer.set_property("activatable", True) |
| 1496 | - self.renderer.connect("toggled", self.check_clicked, self.model) |
| 1497 | - self.columnCheck = gtk.TreeViewColumn(_("Select"), self.renderer, active=0) |
| 1498 | - self.treeview.append_column(self.columnCheck) |
| 1499 | - |
| 1500 | - ### Icon |
| 1501 | - self.renderer = gtk.CellRendererPixbuf() |
| 1502 | - self.columnIcon = gtk.TreeViewColumn(_("Type"), self.renderer, pixbuf=1) |
| 1503 | - self.treeview.append_column(self.columnIcon) |
| 1504 | - |
| 1505 | - ### Titre |
| 1506 | - self.renderer = gtk.CellRendererText() |
| 1507 | - self.columnTitel = gtk.TreeViewColumn(_("Name"), self.renderer, markup=2) |
| 1508 | - self.columnTitel.set_expand(True) |
| 1509 | - self.columnTitel.set_resizable(True) |
| 1510 | - self.treeview.append_column(self.columnTitel) |
| 1511 | - |
| 1512 | - ### ID |
| 1513 | - self.renderer = gtk.CellRendererText() |
| 1514 | - self.column = gtk.TreeViewColumn(_("ID"), self.renderer, markup=3) |
| 1515 | - self.column.set_visible(False) |
| 1516 | - #self.column.set_sort_column_id(3) |
| 1517 | - self.treeview.append_column(self.column) |
| 1518 | - |
| 1519 | - ### type |
| 1520 | - self.renderer = gtk.CellRendererText() |
| 1521 | - self.columnType = gtk.TreeViewColumn(_("TYPE"), self.renderer, markup=4) |
| 1522 | - self.columnType.set_visible(False) |
| 1523 | - #self.columnType.set_sort_column_id(4) |
| 1524 | - self.treeview.append_column(self.columnType) |
| 1525 | - |
| 1526 | def select_all(self, widget): |
| 1527 | db = self.new_watch_db |
| 1528 | for watch in db: |
| 1529 | - if watch.deleted == False: |
| 1530 | + if not watch.deleted: |
| 1531 | self.model.set_value(self.iter[watch.id], 0, 1) |
| 1532 | |
| 1533 | def deselect_all(self, widget): |
| 1534 | db = self.new_watch_db |
| 1535 | for watch in db: |
| 1536 | - if watch.deleted == False: |
| 1537 | + if not watch.deleted: |
| 1538 | self.model.set_value(self.iter[watch.id], 0, 0) |
| 1539 | |
| 1540 | - def import_watches(self, widget): |
| 1541 | + def do_action(self, widget): |
| 1542 | self.import_watch.hide_all() |
| 1543 | |
| 1544 | watches = self.get_selected_watches() |
| 1545 | @@ -176,7 +136,7 @@ |
| 1546 | i = 0 |
| 1547 | watch_db = self.new_watch_db |
| 1548 | for watch in watch_db: |
| 1549 | - if watch.deleted == False: |
| 1550 | + if not watch.deleted: |
| 1551 | if self.model.get_value(self.iter[watch.id], 0) == True: |
| 1552 | selected_watches_db[i] = watch |
| 1553 | i += 1 |
| 1554 | @@ -197,16 +157,17 @@ |
| 1555 | def set_new_watch_db(self, watch_db): |
| 1556 | self.new_watch_db = watch_db |
| 1557 | |
| 1558 | - def check_clicked(self, object, path, model): |
| 1559 | + def check_clicked(self, obj, model): |
| 1560 | """ Call the main function to start/stop the selected watch. """ |
| 1561 | sel = self.treeview.get_selection() |
| 1562 | - sel.select_path(path) |
| 1563 | - model, iter = self.treeview.get_selection().get_selected() |
| 1564 | - |
| 1565 | - if model.get_value(iter, 0): |
| 1566 | - model.set_value(iter, 0, 0) |
| 1567 | + sel.select_path(model) |
| 1568 | + model, _iter = sel.get_selected() |
| 1569 | + if not _iter: |
| 1570 | + return |
| 1571 | + if model.get_value(_iter, 0): |
| 1572 | + model.set_value(_iter, 0, 0) |
| 1573 | else: |
| 1574 | - model.set_value(iter, 0, 1) |
| 1575 | + model.set_value(_iter, 0, 1) |
| 1576 | |
| 1577 | |
| 1578 | class ImportOpenDialog(OpenDialog): |
| 1579 | @@ -231,7 +192,7 @@ |
| 1580 | |
| 1581 | def read_options(self, file_name): |
| 1582 | watch_io = Watch_io(self.specto, file_name) |
| 1583 | - if watch_io.valid == False: |
| 1584 | + if not watch_io.valid: |
| 1585 | return False |
| 1586 | |
| 1587 | values = watch_io.read_all_watches() |
| 1588 | |
| 1589 | === modified file 'spectlib/notifier.py' |
| 1590 | --- spectlib/notifier.py 2010-11-23 15:28:11 +0000 |
| 1591 | +++ spectlib/notifier.py 2011-05-24 17:11:46 +0000 |
| 1592 | @@ -86,6 +86,7 @@ |
| 1593 | self.builder = gtk.Builder() |
| 1594 | self.builder.set_translation_domain("specto") |
| 1595 | self.builder.add_from_file(uifile) |
| 1596 | + self.builder.connect_signals(self) |
| 1597 | self.notifier = self.builder.get_object("notifier") |
| 1598 | if INDICATOR: |
| 1599 | self.indicator = Indicator(specto) |
| 1600 | @@ -102,36 +103,7 @@ |
| 1601 | |
| 1602 | #create tree |
| 1603 | self.iter = {} |
| 1604 | - self.model = gtk.ListStore(gobject.TYPE_BOOLEAN, gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_INT, gobject.TYPE_STRING, pango.Weight) |
| 1605 | - |
| 1606 | - #catch some events |
| 1607 | - dic = { |
| 1608 | - "on_add_activate": self.show_add_watch_menu, |
| 1609 | - "on_edit_activate": self.show_edit_watch, |
| 1610 | - "on_clear_all_activate": self.mark_all_as_read, |
| 1611 | - "on_preferences_activate": self.show_preferences, |
| 1612 | - "on_refresh_activate": self.refresh_all_watches, |
| 1613 | - "on_close_activate": self.close_event, |
| 1614 | - "on_quit_activate": self.delete_event, |
| 1615 | - "on_import_watches_activate": self.import_watches, |
| 1616 | - "on_export_watches_activate": self.export_watches, |
| 1617 | - "on_error_log_activate": self.show_error_log, |
| 1618 | - "on_display_all_watches_activate": self.toggle_show_deactivated_watches, |
| 1619 | - "on_display_toolbar_activate": self.toggle_display_toolbar, |
| 1620 | - "on_help_activate": self.show_help, |
| 1621 | - "on_about_activate": self.show_about, |
| 1622 | - "on_treeview_row_activated": self.open_watch_callback, |
| 1623 | - "on_btnOpen_clicked": self.open_watch_callback, |
| 1624 | - "on_btnClear_clicked": self.mark_watch_as_read, |
| 1625 | - "on_treeview_cursor_changed": self.show_watch_info, |
| 1626 | - "on_btnEdit_clicked": self.show_edit_watch, |
| 1627 | - "on_by_watch_type_activate": self.sort_type, |
| 1628 | - "on_by_name_activate": self.sort_name, |
| 1629 | - "on_by_watch_active_activate": self.sort_active, |
| 1630 | - "on_remove_clicked": self.remove_watch, |
| 1631 | - "on_clear_activate": self._mark_watch_as_read, |
| 1632 | - "on_remove_activate": self.remove_watch} |
| 1633 | - self.builder.connect_signals(dic) |
| 1634 | + self.model = self.builder.get_object('liststore') |
| 1635 | |
| 1636 | icon = gtk.gdk.pixbuf_new_from_file(os.path.join(self.specto.PATH, "icons/specto_window_icon.svg")) |
| 1637 | self.notifier.set_icon(icon) |
| 1638 | @@ -359,17 +331,17 @@ |
| 1639 | id = int(self.model.get_value(iter, 3)) |
| 1640 | self.model.remove(iter) |
| 1641 | |
| 1642 | - def check_clicked(self, object, path, model): |
| 1643 | + def check_clicked(self, obj, model): |
| 1644 | """ Call the main function to start/stop the selected watch. """ |
| 1645 | sel = self.treeview.get_selection() |
| 1646 | - sel.select_path(path) |
| 1647 | + sel.select_path(model) |
| 1648 | |
| 1649 | - model, iter = self.treeview.get_selection().get_selected() |
| 1650 | - id = int(model.get_value(iter, 3)) |
| 1651 | + model, _iter = sel.get_selected() |
| 1652 | + id = int(model.get_value(_iter, 3)) |
| 1653 | watch = self.specto.watch_db[id] |
| 1654 | |
| 1655 | - if model.get_value(iter, 0): |
| 1656 | - model.set_value(iter, 0, 0) |
| 1657 | + if model.get_value(_iter, 0): |
| 1658 | + model.set_value(_iter, 0, 0) |
| 1659 | if watch.changed: |
| 1660 | self.mark_watch_as_read("", id) |
| 1661 | self.mark_watch_status("idle", id) |
| 1662 | @@ -377,7 +349,7 @@ |
| 1663 | if not self.builder.get_object("display_all_watches").active: |
| 1664 | self.remove_notifier_entry(id) |
| 1665 | else: |
| 1666 | - model.set_value(iter, 0, 1) |
| 1667 | + model.set_value(_iter, 0, 1) |
| 1668 | watch.start() |
| 1669 | |
| 1670 | def connected_message(self, connected): |
| 1671 | @@ -696,6 +668,10 @@ |
| 1672 | |
| 1673 | if self.specto.specto_gconf.get_entry("show_in_windowlist") == False: |
| 1674 | self.notifier.set_skip_taskbar_hint(True) |
| 1675 | + |
| 1676 | + self.columnTitle = self.builder.get_object('name_treeviewcolumn') |
| 1677 | + self.columnType = self.builder.get_object('type_treeviewcolumn') |
| 1678 | + self.columnCheck = self.builder.get_object('active_treeviewcolumn') |
| 1679 | |
| 1680 | |
| 1681 | ### Initiate the window |
| 1682 | @@ -718,50 +694,8 @@ |
| 1683 | if not self.specto.notifier_hide: |
| 1684 | self.notifier.show() |
| 1685 | |
| 1686 | - ### Checkbox |
| 1687 | - self.columnCheck_renderer = gtk.CellRendererToggle() |
| 1688 | - self.columnCheck_renderer.set_property("activatable", True) |
| 1689 | - self.columnCheck_renderer.connect("toggled", self.check_clicked, self.model) |
| 1690 | - self.columnCheck = gtk.TreeViewColumn(_("Active"), self.columnCheck_renderer, active=0) |
| 1691 | - self.columnCheck.connect("clicked", self.sort_active_from_treeview_headers) |
| 1692 | - self.columnCheck.set_sort_column_id(0) |
| 1693 | - self.treeview.append_column(self.columnCheck) |
| 1694 | - |
| 1695 | - ### Icon |
| 1696 | - self.columnIcon_renderer = gtk.CellRendererPixbuf() |
| 1697 | - self.columnIcon = gtk.TreeViewColumn(_("Type"), self.columnIcon_renderer, pixbuf=1) |
| 1698 | - self.columnIcon.set_clickable(True) |
| 1699 | - self.columnIcon.connect("clicked", self.sort_type_from_treeview_headers) |
| 1700 | - self.treeview.append_column(self.columnIcon) |
| 1701 | - |
| 1702 | - ### Titre |
| 1703 | - self.columnTitle_renderer = gtk.CellRendererText() |
| 1704 | - #self.columnTitle_renderer.set_property("editable", True) |
| 1705 | - #self.columnTitle_renderer.connect('edited', self.change_entry_name) |
| 1706 | - self.columnTitle = gtk.TreeViewColumn(_("Name"), self.columnTitle_renderer, text=2, weight=5) |
| 1707 | - self.columnTitle.connect("clicked", self.sort_name_from_treeview_headers) |
| 1708 | - self.columnTitle.set_expand(True) |
| 1709 | - self.columnTitle.set_resizable(True) |
| 1710 | - self.columnTitle.set_sort_column_id(2) |
| 1711 | - self.treeview.append_column(self.columnTitle) |
| 1712 | - |
| 1713 | - ### ID |
| 1714 | - self.columnID_renderer = gtk.CellRendererText() |
| 1715 | - self.columnID = gtk.TreeViewColumn(_("ID"), self.columnID_renderer, markup=3) |
| 1716 | - self.columnID.set_visible(False) |
| 1717 | - self.columnID.set_sort_column_id(3) |
| 1718 | - self.treeview.append_column(self.columnID) |
| 1719 | - |
| 1720 | - ### type |
| 1721 | - self.renderer = gtk.CellRendererText() |
| 1722 | - self.columnType = gtk.TreeViewColumn(_("TYPE"), self.renderer, markup=4) |
| 1723 | - self.columnType.set_visible(False) |
| 1724 | - self.columnType.set_sort_column_id(4) |
| 1725 | - self.treeview.append_column(self.columnType) |
| 1726 | - |
| 1727 | self.get_startup_sort_order() |
| 1728 | |
| 1729 | - |
| 1730 | ###Create info-panel |
| 1731 | vbox_info = self.builder.get_object("vbox_info") |
| 1732 |

This is quite interesting! A couple of things though:
- mousing over the "Add" submenu makes two menus appear (the toolbar's popup menu shows up). Wtf?
- how do we actually edit the contents now? What's the difference in the glade editor?
- maybe you want to take a look at lp:~kiddo/specto/pygi too
- I guess this simplifies the code a lot, however I'd like someone else to review this too
- it looks different than the current UI... the patch below makes it ressemble the main branch more, but it still has different column headers, the checkboxes are not centered, etc.
=== modified file 'data/uis/ notifier. ui' notifier. ui 2011-05-13 09:56:54 +0000 notifier. ui 2011-05-15 22:15:31 +0000 naming- policy toplevel-contextual --> GtkAccelGroup" id="accelgroup1"/> focus"> False</ property>
<object class=" GtkScrolledWind ow" id="scrolledwin dow1">
<property name="visible" >True</ property>
<property name="can_ focus"> True</property> r_policy" >automatic< /property> r_policy" >automatic< /property>
<child>
<object class="GtkTextView" id="error_message">
<property name="height_ request" >200</property>
< property name="visible" >True</ property>
< property name="can_ focus"> True</property>
< property name="hscrollba r_policy" >never< /property> r_policy" >automatic< /property>
< property name="shadow_ type">in< /property>
< child>
<object class="GtkTreeView" id="treeview">
<property name="visible" >True</ property>
<property name="can_ focus"> True</property>
<property name="model" >liststore< /property> clickable" >False< /property> hint">True< /property>
<property name="search_ column" >0</property> grid_lines" >both</ property>
<signal name="cursor- changed" handler= "show_watch_ info" swapped="no"/>
<signal name="row- activated" handler= "open_watch_ callback" swapped="no"/> child=" selection" > GtkTreeSelectio n" id="treeview- selection1" />
<child>
<object class=" GtkTreeViewColu mn" id="select_ treeviewcolumn" >
<property name="title" translatable= "yes">Select< /property>
--- data/uis/
+++ data/uis/
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.18"/>
- <!-- interface-
<object class="
<object class="GtkWindow" id="error_dialog">
<property name="can_
@@ -57,8 +56,6 @@
- <property name="hscrollba
- <property name="vscrollba
@@ -612,18 +609,19 @@
- <property name="vscrollba
- <property name="headers_
+ <property name="rules_
- <property name="enable_
+ <child internal-
+ <object class="
+ </child>