Skip to content

Commit bc35eb2

Browse files
author
TCB13
committed
Missing files from last commit.
1 parent f9fb06f commit bc35eb2

File tree

5 files changed

+49
-13
lines changed

5 files changed

+49
-13
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ floccus
33
*.dat
44
*.dir
55
.idea
6-
venv
6+
venv
7+
windows/LoFloccus.exe
8+
windows/LoFloccus.res

LoFloccus.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# pip install wsgidav cheroot pystray
2-
# Make Windows .exe with: pyinstaller -i icon.ico -F -w .\LoFloccus.py
3-
2+
import os
43
from tkinter import *
54
from tkinter import messagebox
65
from tkinter import filedialog
@@ -86,7 +85,7 @@ def start_server():
8685
def stop_server():
8786
global server
8887

89-
print("Stopping server...");
88+
print("Stopping server...")
9089
btnServer.config(state="disabled")
9190
btnChangeDir.config(state="active")
9291

@@ -129,7 +128,7 @@ def change_dir():
129128

130129
def on_closing():
131130
global window
132-
if messagebox.askokcancel("Quit", "Do you want to quit? You won't be able to sync your favourites."):
131+
if messagebox.askokcancel("Quit", "Do you want to quit? You won't be able to sync your bookmarks."):
133132
stop_server()
134133
window.destroy()
135134

@@ -147,7 +146,7 @@ def hide_tray():
147146

148147
# Create tray icon
149148
icon = pystray.Icon("Floccus Local XBEL")
150-
icon.icon = Image.open("logo.png")
149+
icon.icon = Image.open(os.path.join(os.path.dirname(os.path.realpath(__file__)),"logo.png"))
151150
icon.visible = True
152151
icon.menu = Menu(
153152
MenuItem("Open", lambda: restore_tray(icon, False)),
@@ -167,7 +166,8 @@ def restore_tray(icon, close):
167166
window.overrideredirect(False)
168167
window.update()
169168
window.deiconify()
170-
window.attributes("-topmost", True)
169+
window.lift()
170+
window.attributes('-topmost', True)
171171

172172
if close:
173173
on_closing()
@@ -181,8 +181,8 @@ def check_toggle(key, value):
181181

182182

183183
window = Tk()
184-
window.title("LoFloccus - v1.0")
185-
window.iconbitmap("icon.ico")
184+
window.title("LoFloccus - v1.0.1")
185+
window.iconbitmap(os.path.join(os.path.dirname(os.path.realpath(__file__)),"icon.ico"))
186186
window.resizable(False, False)
187187
# Window Size and Positioning
188188
windowWidth = 480
@@ -198,7 +198,7 @@ def check_toggle(key, value):
198198

199199
# Title
200200

201-
img = ImageTk.PhotoImage(Image.open("logo.png"))
201+
img = ImageTk.PhotoImage(Image.open(os.path.join(os.path.dirname(os.path.realpath(__file__)),"logo.png")))
202202
panel = Label(window, image=img)
203203
panel.grid(column=0, row=0, columnspan=2,
204204
pady=(20, 0))

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ Unfortunately (and due to browser restrictions) you can't simply store your brow
1212
This tool was designed to:
1313
1) Accept WebDAV connections from the localhost;
1414
2) Generate a random port, username and password for each setup;
15-
3) Only accept HTP digest auth;
16-
4) Store your XBEL location and other settings across sessions;
17-
5) Minimize to Windows tray / macOS top bar.
15+
3) Store your XBEL location and other settings across sessions;
16+
4) Minimize to Windows tray / macOS top bar.
1817

1918
Enjoy the best of Floccus and combine it with favourite sync tool!

windows/LoFloccus.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <windows.h>
2+
#include <process.h>
3+
4+
// windres LoFloccus.rc -O coff -o LoFloccus.res
5+
// gcc -Wall -std=c99 -o LoFloccus.exe LoFloccus.c LoFloccus.res
6+
int main()
7+
{
8+
ShowWindow(GetConsoleWindow(), SW_HIDE);
9+
spawnl(P_OVERLAY , "venv\\Scripts\\python.exe", "venv\\Scripts\\python.exe", "app\\LoFloccus.py", NULL );
10+
return 0;
11+
}

windows/LoFloccus.rc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
id ICON "../icon.ico"
2+
1 VERSIONINFO
3+
FILEVERSION 1,0,1,0
4+
PRODUCTVERSION 1,0,1,0
5+
BEGIN
6+
BLOCK "StringFileInfo"
7+
BEGIN
8+
BLOCK "040904E4"
9+
BEGIN
10+
VALUE "CompanyName", "LoFloccus"
11+
VALUE "FileDescription", "Sync Floccus with a local XBEL file."
12+
VALUE "FileVersion", "1.0.1"
13+
VALUE "InternalName", "LoFloccus"
14+
VALUE "LegalCopyright", "LoFloccus"
15+
VALUE "OriginalFilename", "LoFloccus.exe"
16+
VALUE "ProductName", "LoFloccus"
17+
VALUE "ProductVersion", "1.0.1"
18+
END
19+
END
20+
BLOCK "VarFileInfo"
21+
BEGIN
22+
VALUE "Translation", 0x409, 1252
23+
END
24+
END

0 commit comments

Comments
 (0)