-
Notifications
You must be signed in to change notification settings - Fork 0
/
MemberFunctions.py
74 lines (62 loc) · 1.98 KB
/
MemberFunctions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# -*- coding: cp1250 -*-
import os, stat, time
import pygtk
import gtk
import json
import subprocess
import LeftColumnWithCatalogs
import HttpWindow
import LinkFileWindow
import AddCatalog
import ChangeCatalogName
import HelpWindow
import DeleteCatalog
import ChangeTabName
def FilePos_Quit( widget):
print 'Zamyka program'
gtk.main_quit()
os.remove("BottomButtonBar.pyc")
os.remove("TopBookmarksBar.pyc")
os.remove("MemberFunctions.pyc")
os.remove("Graphics.pyc")
os.remove("LeftColumnWithCatalogs.pyc")
os.remove("LeftColumnWithFolds.pyc")
os.remove("HttpWindow.pyc")
os.remove("LinkFileWindow.pyc")
os.remove("RightColumnWithRemarks.pyc")
os.remove("FilesWindow.pyc")
os.remove("ChosenFile.pyc")
os.remove("AddCatalog.pyc")
os.remove("ChangeCatalogName.pyc")
os.remove("ChangeTabName.pyc")
os.remove("HelpWindow.pyc")
os.remove("DeleteCatalog.pyc")
def ToolsPos_AddKata( widget):
AddCatalog.AddCatalog()
def ToolsPos_AddLink( widget):
LinkFileWindow.launch()
def ToolsPos_AddHttp( widget):
HttpWindow.launch()
def ToolsPos_DelePosi( widget):
DeleteCatalog.DeleteCatalog()
def ToolsPos_ChangName( widget):
ChangeCatalogName.ChangeCatalogName()
def ToolsPos_ChangNameTab( widget):
ChangeTabName.ChangeTabName()
def ToolsPos_Help( widget):
HelpWindow.HelpWindow()
def openLink(tab):
with open('Database.json') as json_file:
data = json.load(json_file)
path = data[str(LeftColumnWithCatalogs.LeftColumnWithCatalogs.primaryCatalog)][str(tab)]
try:
os.startfile(str(path))
except:
subprocess.call([r'C:\Program Files\Mozilla Firefox\Firefox.exe', '-new-tab', str(path)])
def drzewko():
"""Zwraca listê dysków. Metoda niezaimplementowana."""
disks = []
for x in range(65, 90):
if os.path.exists(chr(x) + ':\\'):
disks.append(chr(x))
return disks