Skip to content

Commit

Permalink
Missing files from last commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
TCB13 committed Apr 1, 2019
1 parent f9fb06f commit bc35eb2
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ floccus
*.dat
*.dir
.idea
venv
venv
windows/LoFloccus.exe
windows/LoFloccus.res
18 changes: 9 additions & 9 deletions LoFloccus.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# pip install wsgidav cheroot pystray
# Make Windows .exe with: pyinstaller -i icon.ico -F -w .\LoFloccus.py

import os
from tkinter import *
from tkinter import messagebox
from tkinter import filedialog
Expand Down Expand Up @@ -86,7 +85,7 @@ def start_server():
def stop_server():
global server

print("Stopping server...");
print("Stopping server...")
btnServer.config(state="disabled")
btnChangeDir.config(state="active")

Expand Down Expand Up @@ -129,7 +128,7 @@ def change_dir():

def on_closing():
global window
if messagebox.askokcancel("Quit", "Do you want to quit? You won't be able to sync your favourites."):
if messagebox.askokcancel("Quit", "Do you want to quit? You won't be able to sync your bookmarks."):
stop_server()
window.destroy()

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

# Create tray icon
icon = pystray.Icon("Floccus Local XBEL")
icon.icon = Image.open("logo.png")
icon.icon = Image.open(os.path.join(os.path.dirname(os.path.realpath(__file__)),"logo.png"))
icon.visible = True
icon.menu = Menu(
MenuItem("Open", lambda: restore_tray(icon, False)),
Expand All @@ -167,7 +166,8 @@ def restore_tray(icon, close):
window.overrideredirect(False)
window.update()
window.deiconify()
window.attributes("-topmost", True)
window.lift()
window.attributes('-topmost', True)

if close:
on_closing()
Expand All @@ -181,8 +181,8 @@ def check_toggle(key, value):


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

# Title

img = ImageTk.PhotoImage(Image.open("logo.png"))
img = ImageTk.PhotoImage(Image.open(os.path.join(os.path.dirname(os.path.realpath(__file__)),"logo.png")))
panel = Label(window, image=img)
panel.grid(column=0, row=0, columnspan=2,
pady=(20, 0))
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Unfortunately (and due to browser restrictions) you can't simply store your brow
This tool was designed to:
1) Accept WebDAV connections from the localhost;
2) Generate a random port, username and password for each setup;
3) Only accept HTP digest auth;
4) Store your XBEL location and other settings across sessions;
5) Minimize to Windows tray / macOS top bar.
3) Store your XBEL location and other settings across sessions;
4) Minimize to Windows tray / macOS top bar.

Enjoy the best of Floccus and combine it with favourite sync tool!
11 changes: 11 additions & 0 deletions windows/LoFloccus.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <windows.h>
#include <process.h>

// windres LoFloccus.rc -O coff -o LoFloccus.res
// gcc -Wall -std=c99 -o LoFloccus.exe LoFloccus.c LoFloccus.res
int main()
{
ShowWindow(GetConsoleWindow(), SW_HIDE);
spawnl(P_OVERLAY , "venv\\Scripts\\python.exe", "venv\\Scripts\\python.exe", "app\\LoFloccus.py", NULL );
return 0;
}
24 changes: 24 additions & 0 deletions windows/LoFloccus.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
id ICON "../icon.ico"
1 VERSIONINFO
FILEVERSION 1,0,1,0
PRODUCTVERSION 1,0,1,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "LoFloccus"
VALUE "FileDescription", "Sync Floccus with a local XBEL file."
VALUE "FileVersion", "1.0.1"
VALUE "InternalName", "LoFloccus"
VALUE "LegalCopyright", "LoFloccus"
VALUE "OriginalFilename", "LoFloccus.exe"
VALUE "ProductName", "LoFloccus"
VALUE "ProductVersion", "1.0.1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END

0 comments on commit bc35eb2

Please sign in to comment.