~email-tehk/gnome-activity-journal/colored-histogram

« back to all changes in this revision

Viewing changes to src/timeline.py

  • Committer: tehk
  • Date: 2010-02-27 07:20:33 UTC
  • Revision ID: tehk@tehk-desktop-20100227072033-k22bv5rma08ituvx
fixing some dock strings

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    Generates a time box based on a objects timestamp and duration over 1.
42
42
    Multiply the results by the width to get usable positions
43
43
 
44
 
    Arguments
45
 
    - timestamp: a timestamp int or string from which to calulate the start position
46
 
    - duration: the length to calulate the width
 
44
    :param timestamp: a timestamp int or string from which to calulate the start position
 
45
    :param duration: the length to calulate the width
47
46
    """
48
47
    w = max(duration/3600.0/1000.0/24.0, 0)
49
48
    x = ((int(timestamp)/1000.0 - time.timezone)%86400)/3600/24.0
54
53
    A default text handler that returns the text to be drawn by the
55
54
    draw_event_widget
56
55
 
57
 
    Arguments:
58
 
    - obj: A event object
 
56
    :param obj: a :class:`Events <zeitgeist.datamodel.Event>`
59
57
    """
60
58
    text = get_event_text(obj)
61
59
    interpretation = get_event_interpretation(obj)
153
151
    #@pixbuf.setter
154
152
    def __pixbuf_setter(self, obj):
155
153
        self.pixbuf_plug.obj = obj
156
 
    # For compatibility with Python 2.5 
 
154
    # For compatibility with Python 2.5
157
155
    pixbuf = property(__pixbuf, __pixbuf_setter)
158
156
 
159
157
    @property
297
295
    def set_model_from_list(self, events):
298
296
        """
299
297
        Sets creates/sets a model from a list of zeitgeist events
300
 
        Arguments:
301
 
        -- events: a list of events
 
298
 
 
299
        :param events: a list of :class:`Events <zeitgeist.datamodel.Event>`
302
300
        """
303
301
        if not events:
304
302
            self.set_model(None)