pep8 fixes & typos
svn: r12976
This commit is contained in:
parent
516ba9ec95
commit
3c070fb0a6
@ -56,7 +56,6 @@ import Utils
|
|||||||
import Bookmarks
|
import Bookmarks
|
||||||
import Mime
|
import Mime
|
||||||
import gen.lib
|
import gen.lib
|
||||||
from QuestionDialog import ErrorDialog
|
|
||||||
from Editors import EditMedia, DeleteMediaQuery
|
from Editors import EditMedia, DeleteMediaQuery
|
||||||
import Errors
|
import Errors
|
||||||
from Filters.SideBar import MediaSidebarFilter
|
from Filters.SideBar import MediaSidebarFilter
|
||||||
@ -72,7 +71,7 @@ class MediaView(PageView.ListView):
|
|||||||
"""
|
"""
|
||||||
Provide the Media View interface on the GRAMPS main window. This allows
|
Provide the Media View interface on the GRAMPS main window. This allows
|
||||||
people to manage all media items in their database. This is very similar
|
people to manage all media items in their database. This is very similar
|
||||||
to the other list based views, with the exeception that it also has a
|
to the other list based views, with the exception that it also has a
|
||||||
thumbnail image at the top of the view that must be updated when the
|
thumbnail image at the top of the view that must be updated when the
|
||||||
selection changes or when the selected media object changes.
|
selection changes or when the selected media object changes.
|
||||||
"""
|
"""
|
||||||
@ -123,7 +122,7 @@ class MediaView(PageView.ListView):
|
|||||||
|
|
||||||
def _set_dnd(self):
|
def _set_dnd(self):
|
||||||
"""
|
"""
|
||||||
Set up drag-n-drop. The source and destionation are set by calling .target()
|
Set up drag-n-drop. The source and destination are set by calling .target()
|
||||||
on the _DND_TYPE. Obviously, this means that there must be a _DND_TYPE
|
on the _DND_TYPE. Obviously, this means that there must be a _DND_TYPE
|
||||||
variable defined that points to an entry in DdTargets.
|
variable defined that points to an entry in DdTargets.
|
||||||
"""
|
"""
|
||||||
|
@ -165,7 +165,7 @@ class EmbeddedList(ButtonTab):
|
|||||||
|
|
||||||
def _set_dnd(self):
|
def _set_dnd(self):
|
||||||
"""
|
"""
|
||||||
Set up drag-n-drop. The source and destionation are set by calling .target()
|
Set up drag-n-drop. The source and destination are set by calling .target()
|
||||||
on the _DND_TYPE. Obviously, this means that there must be a _DND_TYPE
|
on the _DND_TYPE. Obviously, this means that there must be a _DND_TYPE
|
||||||
variable defined that points to an entry in DdTargets.
|
variable defined that points to an entry in DdTargets.
|
||||||
"""
|
"""
|
||||||
@ -216,7 +216,7 @@ class EmbeddedList(ButtonTab):
|
|||||||
"""
|
"""
|
||||||
Handle the standard gtk interface for drag_data_received.
|
Handle the standard gtk interface for drag_data_received.
|
||||||
|
|
||||||
If the selection data is define, extract the value from sel_data.data,
|
If the selection data is defined, extract the value from sel_data.data,
|
||||||
and decide if this is a move or a reorder.
|
and decide if this is a move or a reorder.
|
||||||
"""
|
"""
|
||||||
if sel_data and sel_data.data:
|
if sel_data and sel_data.data:
|
||||||
@ -242,7 +242,7 @@ class EmbeddedList(ButtonTab):
|
|||||||
def tree_drag_motion(self, *args):
|
def tree_drag_motion(self, *args):
|
||||||
"""
|
"""
|
||||||
On drag motion one wants the list to show as the database
|
On drag motion one wants the list to show as the database
|
||||||
representation so it is clear how save will change the data
|
representation so it is clear how save will change the data.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ class EmbeddedList(ButtonTab):
|
|||||||
|
|
||||||
def get_selected(self):
|
def get_selected(self):
|
||||||
"""
|
"""
|
||||||
returns the value associated with selected row in the model,
|
Return the value associated with selected row in the model,
|
||||||
based of the _HANDLE_COL value. Each model must define this
|
based of the _HANDLE_COL value. Each model must define this
|
||||||
to indicate what the returned value should be. If no selection
|
to indicate what the returned value should be. If no selection
|
||||||
has been made, None is returned.
|
has been made, None is returned.
|
||||||
@ -385,7 +385,7 @@ class EmbeddedList(ButtonTab):
|
|||||||
Return the data associated with the list. This is typically
|
Return the data associated with the list. This is typically
|
||||||
a list of objects.
|
a list of objects.
|
||||||
|
|
||||||
This should be overridden in the derrived classes.
|
This should be overridden in the derived classes.
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ class EmbeddedList(ButtonTab):
|
|||||||
where the first in indicates if the column is visible, and the
|
where the first in indicates if the column is visible, and the
|
||||||
second column indicates the index into the model.
|
second column indicates the index into the model.
|
||||||
|
|
||||||
This should be overridden in the derrived classes.
|
This should be overridden in the derived classes.
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
|||||||
|
|
||||||
def _set_dnd(self):
|
def _set_dnd(self):
|
||||||
"""
|
"""
|
||||||
Set up drag-n-drop. The source and destionation are set by calling .target()
|
Set up drag-n-drop. The source and destination are set by calling .target()
|
||||||
on the _DND_TYPE. Obviously, this means that there must be a _DND_TYPE
|
on the _DND_TYPE. Obviously, this means that there must be a _DND_TYPE
|
||||||
variable defined that points to an entry in DdTargets.
|
variable defined that points to an entry in DdTargets.
|
||||||
"""
|
"""
|
||||||
|
@ -99,7 +99,7 @@ class GrampsTab(gtk.VBox):
|
|||||||
def build_label_widget(self):
|
def build_label_widget(self):
|
||||||
"""
|
"""
|
||||||
Standard routine to build a widget. Does not need to be overridden
|
Standard routine to build a widget. Does not need to be overridden
|
||||||
by the derrived class. Creates an container that has the label and
|
by the derived class. Creates an container that has the label and
|
||||||
the icon in it.
|
the icon in it.
|
||||||
@returns: widget to be used for the notebook label.
|
@returns: widget to be used for the notebook label.
|
||||||
@rtype: gtk.HBox
|
@rtype: gtk.HBox
|
||||||
@ -130,7 +130,7 @@ class GrampsTab(gtk.VBox):
|
|||||||
def get_icon_name(self):
|
def get_icon_name(self):
|
||||||
"""
|
"""
|
||||||
Provide the name of the registered stock icon to be used as the
|
Provide the name of the registered stock icon to be used as the
|
||||||
icon in the label. This is typically overridden by the derrived
|
icon in the label. This is typically overridden by the derived
|
||||||
class to provide the new name.
|
class to provide the new name.
|
||||||
@returns: stock icon name
|
@returns: stock icon name
|
||||||
@rtype: str
|
@rtype: str
|
||||||
@ -188,7 +188,7 @@ class GrampsTab(gtk.VBox):
|
|||||||
def build_interface(self):
|
def build_interface(self):
|
||||||
"""
|
"""
|
||||||
Builds the interface for the derived class. This function should be
|
Builds the interface for the derived class. This function should be
|
||||||
overridden in the derived class. Since the classes are derrived from
|
overridden in the derived class. Since the classes are derived from
|
||||||
gtk.HBox, the self.pack_start, self.pack_end, and self.add functions
|
gtk.HBox, the self.pack_start, self.pack_end, and self.add functions
|
||||||
can be used to add widgets to the interface.
|
can be used to add widgets to the interface.
|
||||||
"""
|
"""
|
||||||
|
@ -266,7 +266,7 @@ class ListModel(object):
|
|||||||
|
|
||||||
def get_icon(self):
|
def get_icon(self):
|
||||||
"""
|
"""
|
||||||
Return an icond to be used for Drag and drop.
|
Return an icon to be used for Drag and drop.
|
||||||
"""
|
"""
|
||||||
if self.mode == gtk.SELECTION_SINGLE:
|
if self.mode == gtk.SELECTION_SINGLE:
|
||||||
store, node = self.selection.get_selected()
|
store, node = self.selection.get_selected()
|
||||||
@ -279,7 +279,7 @@ class ListModel(object):
|
|||||||
|
|
||||||
def __build_select_list(self, store, path, node, dlist):
|
def __build_select_list(self, store, path, node, dlist):
|
||||||
"""
|
"""
|
||||||
GTK callback function for waliking a select list
|
GTK callback function for walking a select list
|
||||||
"""
|
"""
|
||||||
dlist.append(self.model.get_value(node, self.data_index))
|
dlist.append(self.model.get_value(node, self.data_index))
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class BaseNavigation(object):
|
|||||||
def build_item_name(self, handle):
|
def build_item_name(self, handle):
|
||||||
"""
|
"""
|
||||||
Builds a string from the passed handle. Must be overridden by the
|
Builds a string from the passed handle. Must be overridden by the
|
||||||
derrived class.
|
derived class.
|
||||||
"""
|
"""
|
||||||
return "ERROR"
|
return "ERROR"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user