diff options
| -rw-r--r-- | data/FORMATS | 1 | ||||
| -rw-r--r-- | data/mat.glade | 541 | ||||
| -rw-r--r-- | libmat/mat.py | 8 | ||||
| -rwxr-xr-x | mat-gui | 18 |
4 files changed, 284 insertions, 284 deletions
diff --git a/data/FORMATS b/data/FORMATS index 7945cb8..50a3a92 100644 --- a/data/FORMATS +++ b/data/FORMATS | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | <method>Removal of harmful fields with exiftool.</method> | 8 | <method>Removal of harmful fields with exiftool.</method> |
| 9 | <remaining>None</remaining> | 9 | <remaining>None</remaining> |
| 10 | </format> | 10 | </format> |
| 11 | |||
| 11 | <format> | 12 | <format> |
| 12 | <name>Portable Network Graphics</name> | 13 | <name>Portable Network Graphics</name> |
| 13 | <extension>.png</extension> | 14 | <extension>.png</extension> |
diff --git a/data/mat.glade b/data/mat.glade index bd56f34..f4a23c5 100644 --- a/data/mat.glade +++ b/data/mat.glade | |||
| @@ -20,6 +20,274 @@ | |||
| 20 | <column type="gchararray"/> | 20 | <column type="gchararray"/> |
| 21 | </columns> | 21 | </columns> |
| 22 | </object> | 22 | </object> |
| 23 | <object class="GtkImage" id="image1"> | ||
| 24 | <property name="visible">True</property> | ||
| 25 | <property name="can_focus">False</property> | ||
| 26 | <property name="stock">gtk-convert</property> | ||
| 27 | </object> | ||
| 28 | <object class="GtkWindow" id="MainWindow"> | ||
| 29 | <property name="visible">True</property> | ||
| 30 | <property name="can_focus">False</property> | ||
| 31 | <property name="title">Metadata Anonymisation Toolkit</property> | ||
| 32 | <property name="window_position">center</property> | ||
| 33 | <property name="default_width">400</property> | ||
| 34 | <property name="default_height">400</property> | ||
| 35 | <signal name="destroy" handler="cb_close_application" swapped="no"/> | ||
| 36 | <child> | ||
| 37 | <object class="GtkBox" id="MainWinfowVBox"> | ||
| 38 | <property name="can_focus">False</property> | ||
| 39 | <property name="orientation">vertical</property> | ||
| 40 | <child> | ||
| 41 | <object class="GtkMenuBar" id="Menubar"> | ||
| 42 | <property name="can_focus">False</property> | ||
| 43 | <child> | ||
| 44 | <object class="GtkMenuItem" id="File"> | ||
| 45 | <property name="can_focus">False</property> | ||
| 46 | <property name="label" translatable="yes">_File</property> | ||
| 47 | <property name="use_underline">True</property> | ||
| 48 | <child type="submenu"> | ||
| 49 | <object class="GtkMenu" id="File_menu"> | ||
| 50 | <property name="visible">True</property> | ||
| 51 | <property name="can_focus">False</property> | ||
| 52 | <child> | ||
| 53 | <object class="GtkImageMenuItem" id="Menu_add"> | ||
| 54 | <property name="label">gtk-add</property> | ||
| 55 | <property name="visible">True</property> | ||
| 56 | <property name="can_focus">False</property> | ||
| 57 | <property name="use_underline">True</property> | ||
| 58 | <property name="use_stock">True</property> | ||
| 59 | <property name="always_show_image">True</property> | ||
| 60 | <signal name="activate" handler="cb_add_files" swapped="no"/> | ||
| 61 | <accelerator key="o" signal="activate" modifiers="GDK_CONTROL_MASK"/> | ||
| 62 | </object> | ||
| 63 | </child> | ||
| 64 | <child> | ||
| 65 | <object class="GtkImageMenuItem" id="Menu_clean"> | ||
| 66 | <property name="label">gtk-remove</property> | ||
| 67 | <property name="visible">True</property> | ||
| 68 | <property name="can_focus">False</property> | ||
| 69 | <property name="use_underline">True</property> | ||
| 70 | <property name="use_stock">True</property> | ||
| 71 | <property name="always_show_image">True</property> | ||
| 72 | <signal name="activate" handler="cb_mat_clean" swapped="no"/> | ||
| 73 | </object> | ||
| 74 | </child> | ||
| 75 | <child> | ||
| 76 | <object class="GtkImageMenuItem" id="Menu_quit"> | ||
| 77 | <property name="label">gtk-quit</property> | ||
| 78 | <property name="visible">True</property> | ||
| 79 | <property name="can_focus">False</property> | ||
| 80 | <property name="use_underline">True</property> | ||
| 81 | <property name="use_stock">True</property> | ||
| 82 | <property name="always_show_image">True</property> | ||
| 83 | <signal name="activate" handler="cb_close_application" swapped="no"/> | ||
| 84 | <accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/> | ||
| 85 | </object> | ||
| 86 | </child> | ||
| 87 | </object> | ||
| 88 | </child> | ||
| 89 | </object> | ||
| 90 | </child> | ||
| 91 | <child> | ||
| 92 | <object class="GtkMenuItem" id="Edit"> | ||
| 93 | <property name="visible">True</property> | ||
| 94 | <property name="can_focus">False</property> | ||
| 95 | <property name="label" translatable="yes">_Edit</property> | ||
| 96 | <property name="use_underline">True</property> | ||
| 97 | <child type="submenu"> | ||
| 98 | <object class="GtkMenu" id="Edit_menu"> | ||
| 99 | <property name="visible">True</property> | ||
| 100 | <property name="can_focus">False</property> | ||
| 101 | <child> | ||
| 102 | <object class="GtkImageMenuItem" id="menu_clean"> | ||
| 103 | <property name="label">Clean</property> | ||
| 104 | <property name="visible">True</property> | ||
| 105 | <property name="can_focus">False</property> | ||
| 106 | <property name="use_underline">True</property> | ||
| 107 | <property name="image">image1</property> | ||
| 108 | <property name="use_stock">False</property> | ||
| 109 | <signal name="activate" handler="cb_mat_clean" swapped="no"/> | ||
| 110 | </object> | ||
| 111 | </child> | ||
| 112 | <child> | ||
| 113 | <object class="GtkImageMenuItem" id="menu_preferences"> | ||
| 114 | <property name="label">gtk-preferences</property> | ||
| 115 | <property name="visible">True</property> | ||
| 116 | <property name="can_focus">False</property> | ||
| 117 | <property name="use_underline">True</property> | ||
| 118 | <property name="use_stock">True</property> | ||
| 119 | <signal name="activate" handler="cb_preferences_popup" swapped="no"/> | ||
| 120 | <accelerator key="p" signal="activate" modifiers="GDK_CONTROL_MASK"/> | ||
| 121 | </object> | ||
| 122 | </child> | ||
| 123 | <child> | ||
| 124 | <object class="GtkImageMenuItem" id="menu_clear"> | ||
| 125 | <property name="label">gtk-clear</property> | ||
| 126 | <property name="visible">True</property> | ||
| 127 | <property name="can_focus">False</property> | ||
| 128 | <property name="use_underline">True</property> | ||
| 129 | <property name="use_stock">True</property> | ||
| 130 | <signal name="activate" handler="cb_clear_list" swapped="no"/> | ||
| 131 | </object> | ||
| 132 | </child> | ||
| 133 | </object> | ||
| 134 | </child> | ||
| 135 | </object> | ||
| 136 | </child> | ||
| 137 | <child> | ||
| 138 | <object class="GtkMenuItem" id="Help"> | ||
| 139 | <property name="visible">True</property> | ||
| 140 | <property name="can_focus">False</property> | ||
| 141 | <property name="label" translatable="yes">_Help</property> | ||
| 142 | <property name="use_underline">True</property> | ||
| 143 | <child type="submenu"> | ||
| 144 | <object class="GtkMenu" id="Help_menu"> | ||
| 145 | <property name="visible">True</property> | ||
| 146 | <property name="can_focus">False</property> | ||
| 147 | <child> | ||
| 148 | <object class="GtkImageMenuItem" id="supported_menuitem"> | ||
| 149 | <property name="label">gtk-info</property> | ||
| 150 | <property name="visible">True</property> | ||
| 151 | <property name="can_focus">False</property> | ||
| 152 | <property name="use_underline">True</property> | ||
| 153 | <property name="use_stock">True</property> | ||
| 154 | <signal name="activate" handler="cb_supported_popup" swapped="no"/> | ||
| 155 | </object> | ||
| 156 | </child> | ||
| 157 | <child> | ||
| 158 | <object class="GtkImageMenuItem" id="about_menuitem"> | ||
| 159 | <property name="label">gtk-about</property> | ||
| 160 | <property name="visible">True</property> | ||
| 161 | <property name="can_focus">False</property> | ||
| 162 | <property name="use_underline">True</property> | ||
| 163 | <property name="use_stock">True</property> | ||
| 164 | <signal name="activate" handler="cb_about_popup" swapped="no"/> | ||
| 165 | </object> | ||
| 166 | </child> | ||
| 167 | </object> | ||
| 168 | </child> | ||
| 169 | </object> | ||
| 170 | </child> | ||
| 171 | </object> | ||
| 172 | <packing> | ||
| 173 | <property name="expand">False</property> | ||
| 174 | <property name="fill">True</property> | ||
| 175 | <property name="position">0</property> | ||
| 176 | </packing> | ||
| 177 | </child> | ||
| 178 | <child> | ||
| 179 | <object class="GtkToolbar" id="Toolbar"> | ||
| 180 | <property name="can_focus">False</property> | ||
| 181 | <property name="toolbar_style">both</property> | ||
| 182 | <property name="icon_size">5</property> | ||
| 183 | <child> | ||
| 184 | <object class="GtkToolButton" id="ToolbarAdd"> | ||
| 185 | <property name="visible">True</property> | ||
| 186 | <property name="can_focus">False</property> | ||
| 187 | <property name="label" translatable="yes">Add</property> | ||
| 188 | <property name="stock_id">gtk-add</property> | ||
| 189 | <signal name="clicked" handler="cb_add_files" swapped="no"/> | ||
| 190 | </object> | ||
| 191 | <packing> | ||
| 192 | <property name="expand">False</property> | ||
| 193 | <property name="homogeneous">True</property> | ||
| 194 | </packing> | ||
| 195 | </child> | ||
| 196 | <child> | ||
| 197 | <object class="GtkToolButton" id="ToolbarClean"> | ||
| 198 | <property name="visible">True</property> | ||
| 199 | <property name="can_focus">False</property> | ||
| 200 | <property name="label" translatable="yes">Clean</property> | ||
| 201 | <property name="stock_id">gtk-clear</property> | ||
| 202 | <signal name="clicked" handler="cb_mat_clean" swapped="no"/> | ||
| 203 | </object> | ||
| 204 | <packing> | ||
| 205 | <property name="expand">False</property> | ||
| 206 | <property name="homogeneous">True</property> | ||
| 207 | </packing> | ||
| 208 | </child> | ||
| 209 | </object> | ||
| 210 | <packing> | ||
| 211 | <property name="expand">False</property> | ||
| 212 | <property name="fill">True</property> | ||
| 213 | <property name="position">1</property> | ||
| 214 | </packing> | ||
| 215 | </child> | ||
| 216 | <child> | ||
| 217 | <object class="GtkScrolledWindow" id="ScrolledWindow"> | ||
| 218 | <property name="can_focus">False</property> | ||
| 219 | <child> | ||
| 220 | <object class="GtkTreeView" id="MainWindowTreeview"> | ||
| 221 | <property name="can_focus">False</property> | ||
| 222 | <property name="events"/> | ||
| 223 | <property name="model">MainWindowListstore</property> | ||
| 224 | <property name="rules_hint">True</property> | ||
| 225 | <property name="search_column">1</property> | ||
| 226 | <property name="fixed_height_mode">True</property> | ||
| 227 | <property name="rubber_banding">True</property> | ||
| 228 | <signal name="drag-data-received" handler="cb_drag_data_received" swapped="no"/> | ||
| 229 | <signal name="row-activated" handler="cb_popup_metadata" swapped="no"/> | ||
| 230 | <child internal-child="selection"> | ||
| 231 | <object class="GtkTreeSelection" id="MainWindowTreeviewSelection"> | ||
| 232 | <property name="mode">multiple</property> | ||
| 233 | </object> | ||
| 234 | </child> | ||
| 235 | <child> | ||
| 236 | <object class="GtkTreeViewColumn" id="MainWindowTreeviewFilename"> | ||
| 237 | <property name="resizable">True</property> | ||
| 238 | <property name="sizing">fixed</property> | ||
| 239 | <property name="title" translatable="yes">Filename</property> | ||
| 240 | <property name="expand">True</property> | ||
| 241 | <property name="clickable">True</property> | ||
| 242 | <property name="sort_indicator">True</property> | ||
| 243 | <property name="sort_column_id">1</property> | ||
| 244 | <child> | ||
| 245 | <object class="GtkCellRendererText" id="MainWindowTreeviewFilenameRender"/> | ||
| 246 | <attributes> | ||
| 247 | <attribute name="text">1</attribute> | ||
| 248 | </attributes> | ||
| 249 | </child> | ||
| 250 | </object> | ||
| 251 | </child> | ||
| 252 | <child> | ||
| 253 | <object class="GtkTreeViewColumn" id="MainWindowTreeviewState"> | ||
| 254 | <property name="resizable">True</property> | ||
| 255 | <property name="sizing">fixed</property> | ||
| 256 | <property name="title" translatable="yes">State</property> | ||
| 257 | <property name="expand">True</property> | ||
| 258 | <property name="clickable">True</property> | ||
| 259 | <property name="sort_indicator">True</property> | ||
| 260 | <property name="sort_column_id">2</property> | ||
| 261 | <child> | ||
| 262 | <object class="GtkCellRendererText" id="MainWindowTreeviewStateRenderer"/> | ||
| 263 | <attributes> | ||
| 264 | <attribute name="text">2</attribute> | ||
| 265 | </attributes> | ||
| 266 | </child> | ||
| 267 | </object> | ||
| 268 | </child> | ||
| 269 | </object> | ||
| 270 | </child> | ||
| 271 | </object> | ||
| 272 | <packing> | ||
| 273 | <property name="expand">True</property> | ||
| 274 | <property name="fill">True</property> | ||
| 275 | <property name="position">3</property> | ||
| 276 | </packing> | ||
| 277 | </child> | ||
| 278 | <child> | ||
| 279 | <object class="GtkStatusbar" id="Statusbar"> | ||
| 280 | <property name="can_focus">False</property> | ||
| 281 | </object> | ||
| 282 | <packing> | ||
| 283 | <property name="expand">False</property> | ||
| 284 | <property name="fill">True</property> | ||
| 285 | <property name="position">4</property> | ||
| 286 | </packing> | ||
| 287 | </child> | ||
| 288 | </object> | ||
| 289 | </child> | ||
| 290 | </object> | ||
| 23 | <object class="GtkDialog" id="MetadataPopup"> | 291 | <object class="GtkDialog" id="MetadataPopup"> |
| 24 | <property name="can_focus">False</property> | 292 | <property name="can_focus">False</property> |
| 25 | <property name="border_width">5</property> | 293 | <property name="border_width">5</property> |
| @@ -30,6 +298,7 @@ | |||
| 30 | <property name="type_hint">dialog</property> | 298 | <property name="type_hint">dialog</property> |
| 31 | <property name="skip_taskbar_hint">True</property> | 299 | <property name="skip_taskbar_hint">True</property> |
| 32 | <property name="skip_pager_hint">True</property> | 300 | <property name="skip_pager_hint">True</property> |
| 301 | <property name="transient_for">MainWindow</property> | ||
| 33 | <signal name="delete-event" handler="cb_hide_widget" swapped="no"/> | 302 | <signal name="delete-event" handler="cb_hide_widget" swapped="no"/> |
| 34 | <child internal-child="vbox"> | 303 | <child internal-child="vbox"> |
| 35 | <object class="GtkBox" id="MetadataPopupVbox"> | 304 | <object class="GtkBox" id="MetadataPopupVbox"> |
| @@ -129,10 +398,12 @@ | |||
| 129 | <property name="title" translatable="yes">Supported formats</property> | 398 | <property name="title" translatable="yes">Supported formats</property> |
| 130 | <property name="resizable">False</property> | 399 | <property name="resizable">False</property> |
| 131 | <property name="modal">True</property> | 400 | <property name="modal">True</property> |
| 401 | <property name="window_position">center</property> | ||
| 132 | <property name="destroy_with_parent">True</property> | 402 | <property name="destroy_with_parent">True</property> |
| 133 | <property name="type_hint">dialog</property> | 403 | <property name="type_hint">normal</property> |
| 134 | <property name="skip_taskbar_hint">True</property> | 404 | <property name="skip_taskbar_hint">True</property> |
| 135 | <property name="skip_pager_hint">True</property> | 405 | <property name="skip_pager_hint">True</property> |
| 406 | <property name="transient_for">MainWindow</property> | ||
| 136 | <signal name="delete-event" handler="cb_hide_widget" swapped="no"/> | 407 | <signal name="delete-event" handler="cb_hide_widget" swapped="no"/> |
| 137 | <child internal-child="vbox"> | 408 | <child internal-child="vbox"> |
| 138 | <object class="GtkBox" id="SupportedWindowVbox"> | 409 | <object class="GtkBox" id="SupportedWindowVbox"> |
| @@ -300,272 +571,4 @@ | |||
| 300 | <action-widget response="0">supported_OK</action-widget> | 571 | <action-widget response="0">supported_OK</action-widget> |
| 301 | </action-widgets> | 572 | </action-widgets> |
| 302 | </object> | 573 | </object> |
| 303 | <object class="GtkImage" id="image1"> | ||
| 304 | <property name="visible">True</property> | ||
| 305 | <property name="can_focus">False</property> | ||
| 306 | <property name="stock">gtk-convert</property> | ||
| 307 | </object> | ||
| 308 | <object class="GtkWindow" id="MainWindow"> | ||
| 309 | <property name="visible">True</property> | ||
| 310 | <property name="can_focus">False</property> | ||
| 311 | <property name="title">Metadata Anonymisation Toolkit</property> | ||
| 312 | <property name="window_position">center</property> | ||
| 313 | <property name="default_width">400</property> | ||
| 314 | <property name="default_height">400</property> | ||
| 315 | <signal name="destroy" handler="cb_close_application" swapped="no"/> | ||
| 316 | <child> | ||
| 317 | <object class="GtkBox" id="MainWinfowVBox"> | ||
| 318 | <property name="can_focus">False</property> | ||
| 319 | <property name="orientation">vertical</property> | ||
| 320 | <child> | ||
| 321 | <object class="GtkMenuBar" id="Menubar"> | ||
| 322 | <property name="can_focus">False</property> | ||
| 323 | <child> | ||
| 324 | <object class="GtkMenuItem" id="File"> | ||
| 325 | <property name="can_focus">False</property> | ||
| 326 | <property name="label" translatable="yes">_File</property> | ||
| 327 | <property name="use_underline">True</property> | ||
| 328 | <child type="submenu"> | ||
| 329 | <object class="GtkMenu" id="File_menu"> | ||
| 330 | <property name="visible">True</property> | ||
| 331 | <property name="can_focus">False</property> | ||
| 332 | <child> | ||
| 333 | <object class="GtkImageMenuItem" id="Menu_add"> | ||
| 334 | <property name="label">gtk-add</property> | ||
| 335 | <property name="visible">True</property> | ||
| 336 | <property name="can_focus">False</property> | ||
| 337 | <property name="use_underline">True</property> | ||
| 338 | <property name="use_stock">True</property> | ||
| 339 | <property name="always_show_image">True</property> | ||
| 340 | <signal name="activate" handler="cb_add_files" swapped="no"/> | ||
| 341 | <accelerator key="o" signal="activate" modifiers="GDK_CONTROL_MASK"/> | ||
| 342 | </object> | ||
| 343 | </child> | ||
| 344 | <child> | ||
| 345 | <object class="GtkImageMenuItem" id="Menu_clean"> | ||
| 346 | <property name="label">gtk-remove</property> | ||
| 347 | <property name="visible">True</property> | ||
| 348 | <property name="can_focus">False</property> | ||
| 349 | <property name="use_underline">True</property> | ||
| 350 | <property name="use_stock">True</property> | ||
| 351 | <property name="always_show_image">True</property> | ||
| 352 | <signal name="activate" handler="cb_mat_clean" swapped="no"/> | ||
| 353 | </object> | ||
| 354 | </child> | ||
| 355 | <child> | ||
| 356 | <object class="GtkImageMenuItem" id="Menu_quit"> | ||
| 357 | <property name="label">gtk-quit</property> | ||
| 358 | <property name="visible">True</property> | ||
| 359 | <property name="can_focus">False</property> | ||
| 360 | <property name="use_underline">True</property> | ||
| 361 | <property name="use_stock">True</property> | ||
| 362 | <property name="always_show_image">True</property> | ||
| 363 | <signal name="activate" handler="cb_close_application" swapped="no"/> | ||
| 364 | <accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/> | ||
| 365 | </object> | ||
| 366 | </child> | ||
| 367 | </object> | ||
| 368 | </child> | ||
| 369 | </object> | ||
| 370 | </child> | ||
| 371 | <child> | ||
| 372 | <object class="GtkMenuItem" id="Edit"> | ||
| 373 | <property name="visible">True</property> | ||
| 374 | <property name="can_focus">False</property> | ||
| 375 | <property name="label" translatable="yes">_Edit</property> | ||
| 376 | <property name="use_underline">True</property> | ||
| 377 | <child type="submenu"> | ||
| 378 | <object class="GtkMenu" id="Edit_menu"> | ||
| 379 | <property name="visible">True</property> | ||
| 380 | <property name="can_focus">False</property> | ||
| 381 | <child> | ||
| 382 | <object class="GtkImageMenuItem" id="menu_clean"> | ||
| 383 | <property name="label">Clean</property> | ||
| 384 | <property name="visible">True</property> | ||
| 385 | <property name="can_focus">False</property> | ||
| 386 | <property name="use_underline">True</property> | ||
| 387 | <property name="image">image1</property> | ||
| 388 | <property name="use_stock">False</property> | ||
| 389 | <signal name="activate" handler="cb_mat_clean" swapped="no"/> | ||
| 390 | </object> | ||
| 391 | </child> | ||
| 392 | <child> | ||
| 393 | <object class="GtkImageMenuItem" id="menu_preferences"> | ||
| 394 | <property name="label">gtk-preferences</property> | ||
| 395 | <property name="visible">True</property> | ||
| 396 | <property name="can_focus">False</property> | ||
| 397 | <property name="use_underline">True</property> | ||
| 398 | <property name="use_stock">True</property> | ||
| 399 | <signal name="activate" handler="cb_preferences_popup" swapped="no"/> | ||
| 400 | <accelerator key="p" signal="activate" modifiers="GDK_CONTROL_MASK"/> | ||
| 401 | </object> | ||
| 402 | </child> | ||
| 403 | <child> | ||
| 404 | <object class="GtkImageMenuItem" id="menu_clear"> | ||
| 405 | <property name="label">gtk-clear</property> | ||
| 406 | <property name="visible">True</property> | ||
| 407 | <property name="can_focus">False</property> | ||
| 408 | <property name="use_underline">True</property> | ||
| 409 | <property name="use_stock">True</property> | ||
| 410 | <signal name="activate" handler="cb_clear_list" swapped="no"/> | ||
| 411 | </object> | ||
| 412 | </child> | ||
| 413 | </object> | ||
| 414 | </child> | ||
| 415 | </object> | ||
| 416 | </child> | ||
| 417 | <child> | ||
| 418 | <object class="GtkMenuItem" id="Help"> | ||
| 419 | <property name="visible">True</property> | ||
| 420 | <property name="can_focus">False</property> | ||
| 421 | <property name="label" translatable="yes">_Help</property> | ||
| 422 | <property name="use_underline">True</property> | ||
| 423 | <child type="submenu"> | ||
| 424 | <object class="GtkMenu" id="Help_menu"> | ||
| 425 | <property name="visible">True</property> | ||
| 426 | <property name="can_focus">False</property> | ||
| 427 | <child> | ||
| 428 | <object class="GtkImageMenuItem" id="supported_menuitem"> | ||
| 429 | <property name="label">gtk-info</property> | ||
| 430 | <property name="visible">True</property> | ||
| 431 | <property name="can_focus">False</property> | ||
| 432 | <property name="use_underline">True</property> | ||
| 433 | <property name="use_stock">True</property> | ||
| 434 | <signal name="activate" handler="cb_supported_popup" swapped="no"/> | ||
| 435 | </object> | ||
| 436 | </child> | ||
| 437 | <child> | ||
| 438 | <object class="GtkImageMenuItem" id="about_menuitem"> | ||
| 439 | <property name="label">gtk-about</property> | ||
| 440 | <property name="visible">True</property> | ||
| 441 | <property name="can_focus">False</property> | ||
| 442 | <property name="use_underline">True</property> | ||
| 443 | <property name="use_stock">True</property> | ||
| 444 | <signal name="activate" handler="cb_about_popup" swapped="no"/> | ||
| 445 | </object> | ||
| 446 | </child> | ||
| 447 | </object> | ||
| 448 | </child> | ||
| 449 | </object> | ||
| 450 | </child> | ||
| 451 | </object> | ||
| 452 | <packing> | ||
| 453 | <property name="expand">False</property> | ||
| 454 | <property name="fill">True</property> | ||
| 455 | <property name="position">0</property> | ||
| 456 | </packing> | ||
| 457 | </child> | ||
| 458 | <child> | ||
| 459 | <object class="GtkToolbar" id="Toolbar"> | ||
| 460 | <property name="can_focus">False</property> | ||
| 461 | <property name="toolbar_style">both</property> | ||
| 462 | <property name="icon_size">5</property> | ||
| 463 | <child> | ||
| 464 | <object class="GtkToolButton" id="ToolbarAdd"> | ||
| 465 | <property name="visible">True</property> | ||
| 466 | <property name="can_focus">False</property> | ||
| 467 | <property name="label" translatable="yes">Add</property> | ||
| 468 | <property name="stock_id">gtk-add</property> | ||
| 469 | <signal name="clicked" handler="cb_add_files" swapped="no"/> | ||
| 470 | </object> | ||
| 471 | <packing> | ||
| 472 | <property name="expand">False</property> | ||
| 473 | <property name="homogeneous">True</property> | ||
| 474 | </packing> | ||
| 475 | </child> | ||
| 476 | <child> | ||
| 477 | <object class="GtkToolButton" id="ToolbarClean"> | ||
| 478 | <property name="visible">True</property> | ||
| 479 | <property name="can_focus">False</property> | ||
| 480 | <property name="label" translatable="yes">Clean</property> | ||
| 481 | <property name="stock_id">gtk-clear</property> | ||
| 482 | <signal name="clicked" handler="cb_mat_clean" swapped="no"/> | ||
| 483 | </object> | ||
| 484 | <packing> | ||
| 485 | <property name="expand">False</property> | ||
| 486 | <property name="homogeneous">True</property> | ||
| 487 | </packing> | ||
| 488 | </child> | ||
| 489 | </object> | ||
| 490 | <packing> | ||
| 491 | <property name="expand">False</property> | ||
| 492 | <property name="fill">True</property> | ||
| 493 | <property name="position">1</property> | ||
| 494 | </packing> | ||
| 495 | </child> | ||
| 496 | <child> | ||
| 497 | <object class="GtkScrolledWindow" id="ScrolledWindow"> | ||
| 498 | <property name="can_focus">False</property> | ||
| 499 | <child> | ||
| 500 | <object class="GtkTreeView" id="MainWindowTreeview"> | ||
| 501 | <property name="can_focus">False</property> | ||
| 502 | <property name="events"/> | ||
| 503 | <property name="model">MainWindowListstore</property> | ||
| 504 | <property name="rules_hint">True</property> | ||
| 505 | <property name="search_column">1</property> | ||
| 506 | <property name="fixed_height_mode">True</property> | ||
| 507 | <property name="rubber_banding">True</property> | ||
| 508 | <signal name="drag-data-received" handler="cb_drag_data_received" swapped="no"/> | ||
| 509 | <signal name="row-activated" handler="cb_popup_metadata" swapped="no"/> | ||
| 510 | <child internal-child="selection"> | ||
| 511 | <object class="GtkTreeSelection" id="MainWindowTreeviewSelection"> | ||
| 512 | <property name="mode">multiple</property> | ||
| 513 | </object> | ||
| 514 | </child> | ||
| 515 | <child> | ||
| 516 | <object class="GtkTreeViewColumn" id="MainWindowTreeviewFilename"> | ||
| 517 | <property name="resizable">True</property> | ||
| 518 | <property name="sizing">fixed</property> | ||
| 519 | <property name="title" translatable="yes">Filename</property> | ||
| 520 | <property name="expand">True</property> | ||
| 521 | <property name="clickable">True</property> | ||
| 522 | <property name="sort_indicator">True</property> | ||
| 523 | <property name="sort_column_id">1</property> | ||
| 524 | <child> | ||
| 525 | <object class="GtkCellRendererText" id="MainWindowTreeviewFilenameRender"/> | ||
| 526 | <attributes> | ||
| 527 | <attribute name="text">1</attribute> | ||
| 528 | </attributes> | ||
| 529 | </child> | ||
| 530 | </object> | ||
| 531 | </child> | ||
| 532 | <child> | ||
| 533 | <object class="GtkTreeViewColumn" id="MainWindowTreeviewState"> | ||
| 534 | <property name="resizable">True</property> | ||
| 535 | <property name="sizing">fixed</property> | ||
| 536 | <property name="title" translatable="yes">State</property> | ||
| 537 | <property name="expand">True</property> | ||
| 538 | <property name="clickable">True</property> | ||
| 539 | <property name="sort_indicator">True</property> | ||
| 540 | <property name="sort_column_id">2</property> | ||
| 541 | <child> | ||
| 542 | <object class="GtkCellRendererText" id="MainWindowTreeviewStateRenderer"/> | ||
| 543 | <attributes> | ||
| 544 | <attribute name="text">2</attribute> | ||
| 545 | </attributes> | ||
| 546 | </child> | ||
| 547 | </object> | ||
| 548 | </child> | ||
| 549 | </object> | ||
| 550 | </child> | ||
| 551 | </object> | ||
| 552 | <packing> | ||
| 553 | <property name="expand">True</property> | ||
| 554 | <property name="fill">True</property> | ||
| 555 | <property name="position">3</property> | ||
| 556 | </packing> | ||
| 557 | </child> | ||
| 558 | <child> | ||
| 559 | <object class="GtkStatusbar" id="Statusbar"> | ||
| 560 | <property name="can_focus">False</property> | ||
| 561 | </object> | ||
| 562 | <packing> | ||
| 563 | <property name="expand">False</property> | ||
| 564 | <property name="fill">True</property> | ||
| 565 | <property name="position">4</property> | ||
| 566 | </packing> | ||
| 567 | </child> | ||
| 568 | </object> | ||
| 569 | </child> | ||
| 570 | </object> | ||
| 571 | </interface> | 574 | </interface> |
diff --git a/libmat/mat.py b/libmat/mat.py index 6ac1dc7..f0539f8 100644 --- a/libmat/mat.py +++ b/libmat/mat.py | |||
| @@ -17,13 +17,7 @@ __author__ = 'jvoisin' | |||
| 17 | 17 | ||
| 18 | # Silence | 18 | # Silence |
| 19 | LOGGING_LEVEL = logging.ERROR | 19 | LOGGING_LEVEL = logging.ERROR |
| 20 | fname = '' | 20 | logging.basicConfig(filename='', level=LOGGING_LEVEL) |
| 21 | |||
| 22 | # Verbose | ||
| 23 | # LOGGING_LEVEL = logging.DEBUG | ||
| 24 | # logname = 'report.log' | ||
| 25 | |||
| 26 | logging.basicConfig(filename=fname, level=LOGGING_LEVEL) | ||
| 27 | 21 | ||
| 28 | import strippers # this is loaded here because we need LOGGING_LEVEL | 22 | import strippers # this is loaded here because we need LOGGING_LEVEL |
| 29 | 23 | ||
| @@ -80,10 +80,11 @@ class GUI(object): | |||
| 80 | xml_parser.parse(xmlfile) | 80 | xml_parser.parse(xmlfile) |
| 81 | 81 | ||
| 82 | supported_cbox = self.builder.get_object('supported_cbox') | 82 | supported_cbox = self.builder.get_object('supported_cbox') |
| 83 | store = Gtk.ListStore(int, str) | 83 | store = Gtk.ListStore(GObject.TYPE_INT, GObject.TYPE_STRING) |
| 84 | for i, j in enumerate(self.supported_dict.list): | 84 | for i, j in enumerate(self.supported_dict.list): |
| 85 | store.append([i, j['name']]) | 85 | store.append([i, j['name']]) |
| 86 | supported_cbox.set_model(store) | 86 | supported_cbox.set_model(store) |
| 87 | supported_cbox.set_entry_text_column(1) | ||
| 87 | supported_cbox.set_active(0) | 88 | supported_cbox.set_active(0) |
| 88 | 89 | ||
| 89 | self.builder.get_object('supported_metadata').set_buffer(Gtk.TextBuffer()) | 90 | self.builder.get_object('supported_metadata').set_buffer(Gtk.TextBuffer()) |
| @@ -160,15 +161,15 @@ class GUI(object): | |||
| 160 | """ Popup that display on double-click | 161 | """ Popup that display on double-click |
| 161 | metadata from a file | 162 | metadata from a file |
| 162 | """ | 163 | """ |
| 163 | metadatapopupliststore = self.builder.get_object('MetadataPopupListStore') | 164 | metadataPopupListStore = self.builder.get_object('metadataPopupListStore') |
| 164 | metadatapopupliststore.clear() | 165 | metadataPopupListStore.clear() |
| 165 | if self.liststore[row][0].file.is_clean(): | 166 | if self.liststore[row][0].file.is_clean(): |
| 166 | self.liststore[row][2] = _('Clean') | 167 | self.liststore[row][2] = _('Clean') |
| 167 | metadatapopupliststore.append([_('No metadata found'), '']) | 168 | metadataPopupListStore.append([_('No metadata found'), '']) |
| 168 | else: | 169 | else: |
| 169 | self.liststore[row][2] = _('Dirty') | 170 | self.liststore[row][2] = _('Dirty') |
| 170 | for i, j in self.liststore[row][0].file.get_meta().iteritems(): | 171 | for i, j in self.liststore[row][0].file.get_meta().iteritems(): |
| 171 | metadatapopupliststore.append([i, j]) | 172 | metadataPopupListStore.append([i, j]) |
| 172 | 173 | ||
| 173 | popup_metadata = self.builder.get_object('MetadataPopup') | 174 | popup_metadata = self.builder.get_object('MetadataPopup') |
| 174 | title = self.liststore[row][0].file.basename | 175 | title = self.liststore[row][0].file.basename |
| @@ -190,6 +191,7 @@ class GUI(object): | |||
| 190 | w.set_website('https://mat.boum.org') | 191 | w.set_website('https://mat.boum.org') |
| 191 | w.set_website_label(_('Website')) | 192 | w.set_website_label(_('Website')) |
| 192 | w.set_position(Gtk.WindowPosition.CENTER) | 193 | w.set_position(Gtk.WindowPosition.CENTER) |
| 194 | w.set_transient_for(self.window) | ||
| 193 | w.run() | 195 | w.run() |
| 194 | w.destroy() | 196 | w.destroy() |
| 195 | 197 | ||
| @@ -345,10 +347,10 @@ non-anonymised) file to output archive')) | |||
| 345 | vbox.pack_start(treeview, True, True, 0) | 347 | vbox.pack_start(treeview, True, True, 0) |
| 346 | 348 | ||
| 347 | # Create columns | 349 | # Create columns |
| 348 | renderertext = Gtk.CellRendererText() | 350 | rendererText = Gtk.CellRendererText() |
| 349 | column = Gtk.TreeViewColumn(_('Filename'), renderertext, text=0) | 351 | column = Gtk.TreeViewColumn(_('Filename'), rendererText, text=0) |
| 350 | treeview.append_column(column) | 352 | treeview.append_column(column) |
| 351 | column = Gtk.TreeViewColumn(_('Reason'), renderertext, text=1) | 353 | column = Gtk.TreeViewColumn(_('Reason'), rendererText, text=1) |
| 352 | treeview.append_column(column) | 354 | treeview.append_column(column) |
| 353 | 355 | ||
| 354 | dialog.show_all() | 356 | dialog.show_all() |
