Skip to content

Commit

Permalink
converting to unix line endings and removing excess whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilan Schnell committed Jan 28, 2011
1 parent 9f71cb2 commit bd1352b
Show file tree
Hide file tree
Showing 243 changed files with 6,582 additions and 6,582 deletions.
14 changes: 7 additions & 7 deletions enthought/pyface/action/action.py
@@ -1,13 +1,13 @@
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
# Thanks for using Enthought open source!
#
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
Expand All @@ -33,14 +33,14 @@ class Action(HasTraits):
"""

#### 'Action' interface ###################################################

# Keyboard accelerator (by default the action has NO accelerator).
accelerator = Unicode

# Is the action checked? This is only relevant if the action style is
# 'radio' or 'toggle'.
checked = Bool(False)

# A longer description of the action (used for context sensitive help etc).
# If no description is specified, the tooltip is used instead (and if there
# is no tooltip, then well, maybe you just hate your users ;^).
Expand Down Expand Up @@ -69,7 +69,7 @@ class Action(HasTraits):

# A short description of the action used for tooltip text etc.
tooltip = Unicode

###########################################################################
# 'Action' interface.
###########################################################################
Expand Down Expand Up @@ -98,7 +98,7 @@ def perform(self, event):

if self.on_perform is not None:
self.on_perform()

return

#### EOF ######################################################################
4 changes: 2 additions & 2 deletions enthought/pyface/action/action_event.py
Expand Up @@ -12,7 +12,7 @@ class ActionEvent(HasTraits):
""" The event passed to an action's 'perform' method. """

#### 'ActionEvent' interface ##############################################

# When the action was performed (time.time()).
when = Float

Expand All @@ -36,7 +36,7 @@ def __init__(self, **traits):

# When the action was performed.
self.when = time.time()

return

#### EOF ######################################################################
16 changes: 8 additions & 8 deletions enthought/pyface/action/action_item.py
@@ -1,13 +1,13 @@
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license. The license
# is also available online at http://www.enth373ought.com/licenses/BSD.txt
# Thanks for using Enthought open source!
#
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -84,15 +84,15 @@ def _visible_changed(self, trait_name, old, new):
self.action.visible = True

return

###########################################################################
# 'ActionItem' interface.
###########################################################################

def add_to_menu(self, parent, menu, controller):
""" Adds the item to a menu. """

if (controller is None) or controller.can_add_to_menu(self.action):
if (controller is None) or controller.can_add_to_menu(self.action):
wrapper = _MenuItem(parent, menu, self, controller)

# fixme: Martin, who uses this information?
Expand All @@ -108,11 +108,11 @@ def add_to_toolbar(self, parent, tool_bar, image_cache, controller,
show_labels=True):
""" Adds the item to a tool bar. """

if (controller is None) or controller.can_add_to_toolbar(self.action):
if (controller is None) or controller.can_add_to_toolbar(self.action):
wrapper = _Tool(
parent, tool_bar, image_cache, self, controller, show_labels
)

# fixme: Martin, who uses this information?
if controller is None:
self.control = wrapper.control
Expand All @@ -124,7 +124,7 @@ def add_to_toolbar(self, parent, tool_bar, image_cache, controller,

def add_to_palette(self, tool_palette, image_cache, show_labels=True):
""" Adds the item to a tool palette. """

wrapper = _PaletteTool(tool_palette, image_cache, self, show_labels)

self._wrappers.append(wrapper)
Expand All @@ -138,7 +138,7 @@ def destroy(self):
"""

self.action.destroy()

return

#### EOF ######################################################################
10 changes: 5 additions & 5 deletions enthought/pyface/action/action_manager.py
Expand Up @@ -47,7 +47,7 @@ class ActionManager(HasTraits):

# Is the action manager enabled?
enabled = Bool(True)

# All of the contribution groups in the manager.
groups = Property(List(Group))

Expand All @@ -56,7 +56,7 @@ class ActionManager(HasTraits):

# Is the action manager visible?
visible = Bool(True)

#### Events ####

# fixme: We probably need more granular events than this!
Expand Down Expand Up @@ -139,7 +139,7 @@ def _visible_changed(self, trait_name, old, new):
group.visible = new

return

#### Methods ##############################################################

def append(self, item):
Expand All @@ -161,7 +161,7 @@ def destroy(self):

for group in self.groups:
group.destroy()

return

def insert(self, index, item):
Expand Down Expand Up @@ -257,7 +257,7 @@ def walk(self, fn):
""" Walk the manager applying a function at every item. """

fn(self)

for group in self._groups:
self.walk_group(group, fn)

Expand Down
6 changes: 3 additions & 3 deletions enthought/pyface/action/action_manager_item.py
@@ -1,13 +1,13 @@
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
# Thanks for using Enthought open source!
#
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -55,7 +55,7 @@ def add_to_menu(self, parent, menu, controller):

def add_to_toolbar(self, parent, tool_bar, image_cache, controller):
""" Adds the item to a tool bar. """

raise NotImplementedError

#### EOF ######################################################################
4 changes: 2 additions & 2 deletions enthought/pyface/action/api.py
@@ -1,13 +1,13 @@
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
# Thanks for using Enthought open source!
#
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
Expand Down
32 changes: 16 additions & 16 deletions enthought/pyface/action/group.py
@@ -1,13 +1,13 @@
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
# Thanks for using Enthought open source!
#
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -41,17 +41,17 @@ class Group(HasTraits):

# Is the group visible?
visible = Bool(True)

# The group's unique identifier (only needs to be unique within the action
# manager that the group belongs to).
id = Str

# All of the items in the group.
items = Property

# The action manager that the group belongs to.
parent = Any#Instance('enthought.pyface.action.ActionManager')

# Does this group require a separator when it is visualized?
separator = Bool(True)

Expand All @@ -73,15 +73,15 @@ def __init__(self, *items, **traits):
# Add any specified items.
for item in items:
self.append(item)

return

###########################################################################
# 'Group' interface.
###########################################################################

#### Trait Properties #####################################################

def _get_items(self):
""" Returns the items in the group. """

Expand All @@ -96,7 +96,7 @@ def _enabled_changed(self, trait_name, old, new):
item.enabled = new

return

#### Methods ##############################################################

def append(self, item):
Expand Down Expand Up @@ -136,15 +136,15 @@ def insert(self, index, item):
In which case the item is simply inserted into the group.
2) An 'Action' instance.
In which case an 'ActionItem' instance is created with the action
and then inserted into the group.
3) A Python callable (ie.'callable(item)' returns True).
In which case an 'Action' is created that calls the callable when
it is performed, and the action is then wrapped as in 2).
"""

if isinstance(item, Action):
Expand All @@ -153,7 +153,7 @@ def insert(self, index, item):
elif callable(item):
text = user_name_for(item.func_name)
item = ActionItem(action=Action(text=text, on_perform=item))

item.parent = self
self._items.insert(index, item)

Expand All @@ -175,7 +175,7 @@ def insert_before(self, before, item):
"""

index = self._items.index(before)

self.insert(index, item)

return (index, item)
Expand All @@ -188,7 +188,7 @@ def insert_after(self, after, item):
"""

index = self._items.index(after)

self.insert(index + 1, item)

return (index, item)
Expand All @@ -206,7 +206,7 @@ def find(self, id):

else:
item = None

return item


Expand All @@ -225,7 +225,7 @@ class Separator(Group):
Hopefully, 'Separator' is more readable than 'Group'...
"""

pass

#### EOF ######################################################################
28 changes: 14 additions & 14 deletions enthought/pyface/action/images/image_LICENSE.txt
@@ -1,14 +1,14 @@
The icons are mostly derived work from other icons. As such they are
licensed accordingly to the original license:
Project License File
----------------------------------------------------------------------------
Eclipse Eclipse Public License image_LICENSE_Eclipse.txt
Unless stated in this file, icons are the work of Enthought, and are
released under a 3 clause BSD license.
Files and orginal authors:
----------------------------------------------------------------------------
enthought/pyface/action/images:
action.png | Eclipse
The icons are mostly derived work from other icons. As such they are
licensed accordingly to the original license:

Project License File
----------------------------------------------------------------------------
Eclipse Eclipse Public License image_LICENSE_Eclipse.txt

Unless stated in this file, icons are the work of Enthought, and are
released under a 3 clause BSD license.

Files and orginal authors:
----------------------------------------------------------------------------
enthought/pyface/action/images:
action.png | Eclipse
4 changes: 2 additions & 2 deletions enthought/pyface/action/menu_bar_manager.py
@@ -1,13 +1,13 @@
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
# Thanks for using Enthought open source!
#
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
Expand Down

0 comments on commit bd1352b

Please sign in to comment.