gitview: Use new-style classes
This changes the Commit class to use new-style class, which has been available since Python 2.2 (Dec 2001). This is a necessary step in order to use __slots__[] declaration, so that we can reduce the memory footprint in the next patch. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a6080a0a44
commit
709b148a90
@ -259,7 +259,7 @@ class CellRendererGraph(gtk.GenericCellRenderer):
|
|||||||
self.set_colour(ctx, colour, 0.0, 0.5)
|
self.set_colour(ctx, colour, 0.0, 0.5)
|
||||||
ctx.show_text(name)
|
ctx.show_text(name)
|
||||||
|
|
||||||
class Commit:
|
class Commit(object):
|
||||||
""" This represent a commit object obtained after parsing the git-rev-list
|
""" This represent a commit object obtained after parsing the git-rev-list
|
||||||
output """
|
output """
|
||||||
|
|
||||||
@ -339,7 +339,7 @@ class Commit:
|
|||||||
fp.close()
|
fp.close()
|
||||||
return diff
|
return diff
|
||||||
|
|
||||||
class AnnotateWindow:
|
class AnnotateWindow(object):
|
||||||
"""Annotate window.
|
"""Annotate window.
|
||||||
This object represents and manages a single window containing the
|
This object represents and manages a single window containing the
|
||||||
annotate information of the file
|
annotate information of the file
|
||||||
@ -519,7 +519,7 @@ class AnnotateWindow:
|
|||||||
self.io_watch_tag = gobject.io_add_watch(fp, gobject.IO_IN, self.data_ready)
|
self.io_watch_tag = gobject.io_add_watch(fp, gobject.IO_IN, self.data_ready)
|
||||||
|
|
||||||
|
|
||||||
class DiffWindow:
|
class DiffWindow(object):
|
||||||
"""Diff window.
|
"""Diff window.
|
||||||
This object represents and manages a single window containing the
|
This object represents and manages a single window containing the
|
||||||
differences between two revisions on a branch.
|
differences between two revisions on a branch.
|
||||||
@ -674,7 +674,7 @@ class DiffWindow:
|
|||||||
fp.close()
|
fp.close()
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
|
|
||||||
class GitView:
|
class GitView(object):
|
||||||
""" This is the main class
|
""" This is the main class
|
||||||
"""
|
"""
|
||||||
version = "0.9"
|
version = "0.9"
|
||||||
|
Reference in New Issue
Block a user