Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 175343 Details for
Bug 251032
layman -L: better use of screen real estate for source URLs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
First version of proposed patch
bug251032a.patch (text/plain), 1.26 KB, created by
Martin von Gagern
on 2008-12-15 14:56:48 UTC
(
hide
)
Description:
First version of proposed patch
Filename:
MIME Type:
Creator:
Martin von Gagern
Created:
2008-12-15 14:56:48 UTC
Size:
1.26 KB
patch
obsolete
>--- layman/overlays/overlay.py.orig 2008-12-15 15:13:28.000000000 +0100 >+++ layman/overlays/overlay.py 2008-12-15 15:46:46.000000000 +0100 >@@ -231,9 +231,32 @@ > else: > return string[:length - 3] + '...' > >+ def terminal_width(): >+ '''Determine width of terminal window.''' >+ try: >+ width = int(os.environ['COLUMNS']) >+ if width > 0: >+ return width >+ except: >+ pass >+ try: >+ import struct, fcntl, termios >+ query = struct.pack('HHHH', 0, 0, 0, 0) >+ response = fcntl.ioctl(1, termios.TIOCGWINSZ, query) >+ width = struct.unpack('HHHH', response)[1] >+ if width > 0: >+ return width >+ except: >+ pass >+ return 80 >+ > name = pad(self.name, 25) > mtype = ' [' + pad(self.type, 10) + ']' >- source = ' (source: ' + pad(self.src, 29) + ')' >+ srclen = terminal_width() - 43 >+ source = self.src >+ if len(source) > srclen: >+ source = source.replace("overlays.gentoo.org", "o.g.o") >+ source = ' (' + pad(source, srclen) + ')' > > return name + mtype + source >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251032
: 175343