-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
tkfilebrowser - Alternative to filedialog for Tkinter | ||
Copyright 2017 Juliette Monsel <[email protected]> | ||
Copyright 2017-2018 Juliette Monsel <[email protected]> | ||
tkfilebrowser is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
tkfilebrowser - Alternative to filedialog for Tkinter | ||
Copyright 2017 Juliette Monsel <[email protected]> | ||
Copyright 2017-2018 Juliette Monsel <[email protected]> | ||
tkfilebrowser is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -141,8 +141,6 @@ def __init__(self, parent, initialdir="", initialfile="", mode="openfile", | |
default='white') | ||
fg = style.lookup('TLabel', 'foreground', default='black') | ||
active_bg = style.lookup('TButton', 'background', ('active',)) | ||
# active_fg = style.lookup('TButton', 'foreground', ('active',)) | ||
# disabled_fg = style.lookup('TButton', 'foreground', ('disabled',)) | ||
sel_bg = style.lookup('Treeview', 'background', ('selected',)) | ||
sel_fg = style.lookup('Treeview', 'foreground', ('selected',)) | ||
self.option_add('*TCombobox*Listbox.selectBackground', sel_bg) | ||
|
@@ -277,13 +275,13 @@ def __init__(self, parent, initialdir="", initialfile="", mode="openfile", | |
scroll_left.grid(row=0, column=1, sticky="ns") | ||
self.left_tree.configure(yscrollcommand=scroll_left.set) | ||
|
||
# --- list devices and bookmarked locations | ||
# recent | ||
# list devices and bookmarked locations | ||
# -------- recent | ||
self.left_tree.insert("", "end", iid="recent", text=_("Recent"), | ||
image=self.im_recent) | ||
wrapper.add_tooltip("recent", _("Recently used")) | ||
|
||
# devices | ||
# -------- devices | ||
devices = psutil.disk_partitions() | ||
|
||
for d in devices: | ||
|
@@ -296,13 +294,13 @@ def __init__(self, parent, initialdir="", initialfile="", mode="openfile", | |
image=self.im_drive) | ||
wrapper.add_tooltip(m, m) | ||
|
||
# home | ||
# -------- home | ||
home = expanduser("~") | ||
self.left_tree.insert("", "end", iid=home, image=self.im_home, | ||
text=split(home)[-1]) | ||
wrapper.add_tooltip(home, home) | ||
|
||
# desktop | ||
# -------- desktop | ||
try: | ||
desktop = check_output(['xdg-users-dir', 'DESKTOP']).decode().strip() | ||
except Exception: | ||
|
@@ -314,7 +312,7 @@ def __init__(self, parent, initialdir="", initialfile="", mode="openfile", | |
text=split(desktop)[-1]) | ||
wrapper.add_tooltip(desktop, desktop) | ||
|
||
# bookmarks | ||
# -------- bookmarks | ||
path_bm = join(home, ".config", "gtk-3.0", "bookmarks") | ||
path_bm2 = join(home, ".gtk-bookmarks") # old location | ||
if exists(path_bm): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
tkfilebrowser - Alternative to filedialog for Tkinter | ||
Copyright 2017 Juliette Monsel <[email protected]> | ||
Copyright 2017-2018 Juliette Monsel <[email protected]> | ||
tkfilebrowser is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -17,11 +17,6 @@ | |
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
The icons are modified versions of icons from the elementary project | ||
(the xfce fork to be precise https://github.com/shimmerproject/elementary-xfce) | ||
Copyright 2007-2013 elementary LLC. | ||
Functions | ||
""" | ||
|
||
|
@@ -127,7 +122,7 @@ def asksaveasfilename(parent=None, title=_("Save As"), **kwargs): | |
Options: | ||
* initialdir: initial folder whose content is displayed | ||
* initialfile: initial selected item (just the name, not the full path) | ||
* defaultext (save mode only): extension added to filename if none is given | ||
* defaultext: extension added to filename if none is given | ||
* filetypes: [('name', '*.ext1|*.ext2|..'), ...] | ||
show only files of given filetype ("*" for all files) | ||
* okbuttontext: text displayed on the validate button, if None, the | ||
|