~ubuntu-branches/debian/squeeze/pyrenamer/squeeze

« back to all changes in this revision

Viewing changes to src/pyrenamer_menu_cb.py

  • Committer: Bazaar Package Importer
  • Author(s): Adolfo González Blázquez
  • Date: 2008-09-17 14:22:21 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917142221-pa4xq3sowwkv0moo
Tags: 0.6.0-1
* New upstream release:
  - Fix crash when a id3 tag is not available or wrong, returning an
    empty filename (LP: #235161)
  - Fix crash while processing some bad exif tags, catching possible
    exceptions (LP: #261832)
  - Fix crash while starting, fixing src/treefilebrowser.py (LP: #237482)
* debian/control:
  - Build-Depends-Indep: removed 'python-eyed3'
  - Depends: changed 'python-eyed3' to 'python-hachoir-metadata|python-eyed3'
  - Bump up Standards-Version to 3.8.0
  - Descrition: changed 'Mass' to 'mass'
* debian/copyright: updated copyright year
* debian/watch: updated
* debian/pyrenamer.xpm: new icon file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
 
 
3
"""
 
4
Copyright (C) 2006-2008 Adolfo González Blázquez <code@infinicode.org>
 
5
 
 
6
This program is free software; you can redistribute it and/or
 
7
modify it under the terms of the GNU General Public License as
 
8
published by the Free Software Foundation; either version 2
 
9
of the License, or (at your option) any later version.
 
10
 
 
11
This program is distributed in the hope that it will be useful,
 
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
14
GNU General Public License for more details.
 
15
 
 
16
You should have received a copy of the GNU General Public License
 
17
along with this program; if not, write to the Free Software
 
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
19
 
 
20
If you find any bugs or have any suggestions email: code@infinicode.org
 
21
"""
 
22
 
 
23
class PyrenamerMenuCB:
 
24
 
 
25
    def __init__(self, main):
 
26
        self.main = main
 
27
 
 
28
    def on_menu_undo_activate(self, widget):
 
29
        self.main.undo_manager.undo()
 
30
        self.main.dir_reload_current()
 
31
        self.main.menu_undo.set_sensitive(False)
 
32
        self.main.menu_redo.set_sensitive(True)
 
33
 
 
34
    def on_menu_redo_activate(self, widget):
 
35
        self.main.undo_manager.redo()
 
36
        self.main.dir_reload_current()
 
37
        self.main.menu_undo.set_sensitive(True)
 
38
        self.main.menu_redo.set_sensitive(False)
 
39
 
 
40
    def on_menu_refresh_activate(self, widget):
 
41
        self.main.file_browser.create_new()
 
42
        self.main.file_browser.set_active_dir(self.main.active_dir)
 
43
 
 
44
    def on_menu_patterns_activate(self, widget):
 
45
        self.main.notebook.set_current_page(0)
 
46
 
 
47
    def on_menu_substitutions_activate(self, widget):
 
48
        self.main.notebook.set_current_page(1)
 
49
 
 
50
    def on_menu_insert_activate(self, widget):
 
51
        self.main.notebook.set_current_page(2)
 
52
 
 
53
    def on_menu_manual_activate(self, widget):
 
54
        self.main.notebook.set_current_page(3)
 
55
 
 
56
    def on_menu_images_activate(self, widget):
 
57
        self.main.notebook.set_current_page(4)
 
58
 
 
59
    def on_menu_music_activate(self, widget):
 
60
        self.main.notebook.set_current_page(5)
 
61
 
 
62
    def on_menu_show_options_activate(self, widget):
 
63
        self.main.options_panel_state(widget.get_active())
 
 
b'\\ No newline at end of file'