Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 105151 - dev-python/bicyclerepair support for IDLE
Summary: dev-python/bicyclerepair support for IDLE
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: Inclusion
: 174940 (view as bug list)
Depends on: 92219
Blocks:
  Show dependency tree
 
Reported: 2005-09-07 07:29 UTC by MATSUI Tetsushi
Modified: 2012-02-16 13:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against bicyclerepair-0.9.ebuild (bicyclerepair-0.9.ebuild.3.patch,2.35 KB, patch)
2005-09-07 07:33 UTC, MATSUI Tetsushi
Details | Diff
patch against BicycleRepairMan_Idle.py (BicycleRepairMan_Idle.py.diff,1.49 KB, patch)
2005-09-07 07:35 UTC, MATSUI Tetsushi
Details | Diff
bicyclerepair-0.9.ebuild (bicyclerepair-0.9.ebuild,2.00 KB, text/plain)
2007-04-17 22:08 UTC, Rob Cakebread (RETIRED)
Details
bicyclerepair-0.9-stripunicode.patch (bicyclerepair-0.9-stripunicode.patch,2.06 KB, patch)
2007-04-17 22:09 UTC, Rob Cakebread (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description MATSUI Tetsushi 2005-09-07 07:29:27 UTC
dev-python/bicyclerepair in the tree do nothing for IDLE included in
Python 2.3, 2.4.  It is possible to use BicycleRepaiMan from IDLE of
such versions, in some sense.

Using the following patches, BicycleRepaiMan can be used from IDLE
via keybord shortcuts, though the menu doesn't appear (it seems
the upstream bug).


Reproducible: Always
Steps to Reproduce:
Comment 1 MATSUI Tetsushi 2005-09-07 07:33:00 UTC
Created attachment 67828 [details, diff]
patch against bicyclerepair-0.9.ebuild

The patch is against the ebuild in the tree but contains the fixes of
#92219
Comment 2 MATSUI Tetsushi 2005-09-07 07:35:22 UTC
Created attachment 67829 [details, diff]
patch against BicycleRepairMan_Idle.py

Fix for strange character problem of BicycleRepairMan_Idle.py.
Comment 3 Rob Cakebread (RETIRED) gentoo-dev 2007-04-17 22:08:32 UTC
Created attachment 116568 [details]
bicyclerepair-0.9.ebuild

Fixes unicode bug in Matsui's patch, plus an additional unicode bug.
Also adds vim support via USE flag.
Comment 4 Rob Cakebread (RETIRED) gentoo-dev 2007-04-17 22:09:05 UTC
Created attachment 116569 [details, diff]
bicyclerepair-0.9-stripunicode.patch
Comment 5 Rob Cakebread (RETIRED) gentoo-dev 2007-04-17 22:10:34 UTC
*** Bug 174940 has been marked as a duplicate of this bug. ***
Comment 6 Rob Cakebread (RETIRED) gentoo-dev 2007-04-17 22:12:50 UTC
This patch fixes the unicode problem, and if you follow the instructions from the elog output you will get a BicycleRepairMan menu item in idle, but the menu is empty for me using Python 2.5. I haven't tested it on 2.4. If it doesn't work in 2.4 I'd suggest removing idle support from BRM because it hasn't been updated upstream since 2004.
Comment 7 MATSUI Tetsushi 2007-04-19 11:15:44 UTC
This lengthy comment is about empty menu.
Nowadays, I use rope for python refactoring instead of BRM, but anyway...


In /usr/share/lib/python2.4/idlelib/extend.txt:

   At the moment, extensions cannot define whole new menus; they must
   define entries in existing menus.  Some menus are not present on
   some windows; such entry definitions are then ignored, but key
   bindings are still applied.  (This should probably be refined in
   the future.)

That's half of the reason why no menu entries appear. The rest half is
of course in BicycleRepairMan_Idle.py, but beforehand, let's take a
look at the mechanism written in the same file.

   An extension can define menu entries.  This is done with a class or
   instance variable named menudefs; it should be a list of pairs,
   where each pair is a menu name (lowercase) and a list of menu
   entries. Each menu entry is either None (to insert a separator
   entry) or a pair of strings (menu_label, virtual_event).  Here,
   menu_label is the label of the menu entry, and virtual_event is the
   virtual event to be generated when the entry is selected.  An
   underscore in the menu label is removed; the character following
   the underscore is displayed underlined, to indicate the shortcut
   character (for Windows).

The essential part is the 2nd sentence of the paragraph.

Ok. Let's go back to BicycleRepairMan. It has the class
BicycleRepairMan_Idle in BicycleRepairMan_Idle.py file. The definition
looks like:

class BicycleRepairMan_Idle:
    menudefs = [
    ('bicycleRepairMan', [
	...

Clearly, the name 'bicycleRepairMan' is not IN EXISTING MENUS.

A simple fix can be to replace 'bicycleRepairMan' with 'edit', though
then the 'edit' menu get ugly.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-05-06 13:00:37 UTC
*** Bug 177317 has been marked as a duplicate of this bug. ***
Comment 9 MATSUI Tetsushi 2008-08-25 07:05:21 UTC
FYI: A part of this bug to fix syntax errors is done in #232594.
Comment 10 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-02-16 13:01:30 UTC
This should go upstream.