~ubuntu-branches/debian/sid/jokosher/sid

« back to all changes in this revision

Viewing changes to Jokosher/ui/StatusBar.py

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna, Luca Falavigna, Piotr Ożarowski
  • Date: 2009-05-12 00:37:15 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090512003715-3hp2ycoqjlzwfnlv
Tags: 0.11.2-1
[ Luca Falavigna ]
* New upstream release (Closes: #517234).
  - Jokosher now appears under Sound & Video (Closes: #443788).
* New Maintainer (Closes: #523167).
* Add Python Applications Packaging Team to Uploaders.
* Add Vcs-* fields in source stanza.
* Adjust copyright informations:
  - Refresh upstream authors and copyright holders.
  - Link to /usr/share/common-licenses/GPL-2.
  - Adjust copyright holders for Debian packaging.
  - Replace (c) with ©.
* Apply changes from Ubuntu by Daniel Holbach (thanks!):
  - Drop scrollkeeper from Build-Depends.
  - Drop useless dependencies: python-alsaaudio, gstreamer0.10-gnomevfs,
    librsvg2-common, python-gnome2.
  - Bump gstreamer0.10-plugins-good requirement to >= 0.10.9.
  - Drop debian/jokosher.sh, useless.
  - Provide debian/watch file.
* Switch to debhelper 7.
* Install Jokosher module in private directory.
* Unpack egg files to let python-support handle them.
* Drop python-dev from Build-Depends, use python (>= 2.4) instead.
* Depend on python-gobject.
* Switch dependency from python-setuptools to python-pkg-resources
  because of package rename (Closes: #468728).
* debian/patches/10_update_mime_database.dpatch:
  - Refresh for new upstream release.
* debian/patches/20_LevelList_IOError.dpatch:
  - Fix IOError exception trying to add an audio file to a project.
* debian/patches/30_desktop_file.dpatch:
  - Adhere to Freedesktop.org standards by removing deprecated entries.
* debian/patches/50_CreateNewProject_return.dpatch:
  - Return class while creating a new project.
* Provide a simple man page for jokosher.
* Bump Standards-Version to 3.8.1:
  - Provide Homepage field in source stanza.
  - Provide debian/README.source to document dpatch usage.

[ Piotr Ożarowski ]
* Add 40_load_extensions_from_unpacked_eggs patch so that extensions in
  unzipped Eggs are recognized as well

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#       THIS FILE IS PART OF THE JOKOSHER PROJECT AND LICENSED UNDER THE GPL. SEE
 
3
#       THE 'COPYING' FILE FOR DETAILS
 
4
#
 
5
#       StatusBar.py
 
6
#       
 
7
#       This module is a better status bar than the one included
 
8
#       with gtk because it allows pango markup (bold, etc.).
 
9
#
 
10
#-------------------------------------------------------------------------------
 
11
 
 
12
import gtk
 
13
 
 
14
#=========================================================================
 
15
 
 
16
class StatusBar(gtk.Statusbar):
 
17
        """
 
18
        Implements an improved status bar which allows pango markup styles (bold, italics, etc).
 
19
        """
 
20
        #_____________________________________________________________________
 
21
 
 
22
        def __init__(self):
 
23
                """
 
24
                Creates a new instance of StatusBar with no messages shown.
 
25
                """
 
26
                gtk.Statusbar.__init__(self)
 
27
                # gtk.Statusbar contains a label inside a frame inside itself
 
28
                self.label = self.get_children()[0].get_children()[0]
 
29
                self.label.set_use_markup(True)
 
30
                
 
31
        #_____________________________________________________________________
 
32
 
 
33
        def Push(self, message):
 
34
                """
 
35
                Insert a new message into the messages stack.
 
36
                
 
37
                Parameters:
 
38
                        message -- string containing the new message to be added to the StatusBar.
 
39
                        
 
40
                Return:
 
41
                        the value of the next valid message ID.
 
42
                """
 
43
                message_id = self.push(0, message)
 
44
                self.label.set_use_markup(True)
 
45
                return message_id
 
46
        
 
47
        #_____________________________________________________________________
 
48
 
 
49
        def Remove(self, message_id):
 
50
                """
 
51
                Removes a new message from the messages stack.
 
52
                
 
53
                Parameters:
 
54
                        message_id -- numerical id of the message to be removed from the StatusBar.
 
55
                """
 
56
                self.remove(0, message_id)
 
57
                self.label.set_use_markup(True)
 
58
                
 
59
        #_____________________________________________________________________
 
60
 
 
61
#=========================================================================