Custom Query (2449 matches)
Results (682 - 684 of 2449)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #1117 | Fixed | [PATCH] can't press '3' key in deluge-console | ||
| Description |
deluge-console will not print a '3' when the '3' key is pressed. It is due to this code block in trunk/deluge/ui/console/screen.py: # Delete a character in the input string based on cursor position
if c == curses.KEY_BACKSPACE or c == 127:
if self.input and self.input_cursor > 0:
self.input = self.input[:self.input_cursor - 1] + self.input[self.input_cursor:]
self.input_cursor -= 1
elif c == curses.KEY_DC or c == 51:
if self.input and self.input_cursor < len(self.input):
self.input = self.input[:self.input_cursor] + self.input[self.input_cursor + 1:]
The line 'elif c == curses.KEY_DC or c == 51:' should probably be just 'elif c == curses.KEY_DC:' I'm not sure why the check for 'c == 51' was initially added, because 51 is the decimal ascii code for the number three, not the ascii code for Delete (which is 127, according to http://www.asciitable.com/). The var c is originally obtained in a called to stdscr.getch(). I did some testing with getch() to see what values were returned for the Delete key, the Backspace key, and Ctrl-H. On my box, the Delete key returns the value 330. The Backspace key returns the value 127. Ctrl-H returns the value 263. Maybe these values vary by terminal type? I checked python's documentation for these different values (http://docs.python.org/library/curses.html#constants), and it looks like KEY_DC is pretty safe to use. KEY_BACKSPACE has a warning that it is unreliable, but KEY_DC has no such warning. So KEY_DC is probably safe to use and relatively portable? Hopefully. |
|||
| #1119 | Fixed | logging doesn't work with deluge-console because of ncurses | ||
| Description |
Deluge uses the Python "logging" module for warnings, errors, and debugging statements. By default, the logging module outputs everything to stderr (or stdout?). But this does not work with deluge-console, because it is using ncurses. Anything written to stdout or stderr will not print out correctly when using a program written in ncurses. (All the debugging statements do work correctly when using deluge-console and logging to a file instead of the terminal.) I've come up with a couple different solutions to this.
I would be willing to work on implementing any of these, but I don't want to start work on something that definitely won't be accepted. |
|||
| #1143 | Fixed | [PATCH] deluge-console crashs when autocompleting non-existing dir | ||
| Description |
deluge-console's add command will cause a crash when tab-completing a directory that does not exist. For instance, entering this into deluge-console will cause a crash: add non-existing-dir/some-file[TAB] add's tab-complete method will try to list the files in "non-existing-dir/", but throw an error because the directory does not exist. I have attached a (very small) patch to fix the issue. |
|||
