Skip to content

Commit

Permalink
modified code source to make it compatible with linux installed versi…
Browse files Browse the repository at this point in the history
…on to avoid customizing source for each distro
  • Loading branch information
j4321 committed Jan 14, 2017
1 parent 7ecf41d commit fdc752a
Show file tree
Hide file tree
Showing 303 changed files with 193 additions and 12,378 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ MANIFEST
dist
build
*.egg-info
deb_dist
2 changes: 1 addition & 1 deletion BraceletGenerator/bracelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ def del_recent_file(self, file):
self.menu_file.entryconfigure(3, state="disabled")

if file in RECENT_BICOLOR:
RECENT_BICOLOR.delete(file)
RECENT_BICOLOR.remove(file)

def _importe(self, fils, g_out, fil_noeud):
""" importe les informations sur le motif et actualise le bracelet """
Expand Down
27 changes: 16 additions & 11 deletions BraceletGenerator/constantes.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,32 @@
APP_NAME = "BraceletGenerator"

# Get the local directory
PATH = os.path.split(__file__)[0]
if platform == 'linux' and os.path.exists("/usr/share/bracelet-generator"):
# the app has been installed
IMAGES_LOCATION = '/usr/share/bracelet-generator/images'
PATH_LOCALE = "/usr/share/locale"
PATH_DOC = '/usr/share/doc/bracelet-generator'
else:
PATH = os.path.split(__file__)[0]
IMAGES_LOCATION = os.path.join(PATH, 'images')
PATH_LOCALE = os.path.join(PATH, "locale")
PATH_DOC = os.path.join(PATH, "doc")

LOCAL_PATH = os.path.expanduser("~")
LOCAL_PATH = os.path.join(LOCAL_PATH, "BraceletGenerator")
if not os.path.exists(LOCAL_PATH):
os.mkdir(LOCAL_PATH)

PATH_CONFIG = os.path.join(LOCAL_PATH, 'BraceletGenerator.ini')

IMAGES_LOCATION = os.path.join(PATH, 'images')

PATH_LOCALE = os.path.join(PATH, "locale")

PATH_DOC = os.path.join(PATH, "doc")

# lecture du fichier de configuration
# configuration file
CONFIG = ConfigParser()
if os.path.exists(PATH_CONFIG):
CONFIG.read(PATH_CONFIG)
LANGUE = CONFIG.get("General","language")
else:
LANGUE = ""

CONFIG.add_section("General")
CONFIG.set("General", "last_path", LOCAL_PATH)
CONFIG.set("General", "recent_files", "")
Expand Down Expand Up @@ -94,15 +99,15 @@
languages=[LANGUE], fallback=True)
LANG.install()


# get recent files
RECENT_FILES = CONFIG.get("General", "recent_files").split(",")
if RECENT_FILES == [""]:
RECENT_FILES = []
RECENT_BICOLOR = CONFIG.get("General", "recent_bicolor").split(",")
if RECENT_BICOLOR == [""]:
RECENT_BICOLOR = []

# chemins des images
# pictures
IM_EXIT_M = os.path.join(IMAGES_LOCATION, "exit_m.png")
IM_EXIT = os.path.join(IMAGES_LOCATION, "exit.png")
IM_EXPORT_M = os.path.join(IMAGES_LOCATION, "export_m.png")
Expand Down Expand Up @@ -160,7 +165,7 @@
IM_SYM_HORIZ_M = os.path.join(IMAGES_LOCATION, "sym_horizontal_m.png")
IM_SYM_VERT_M = os.path.join(IMAGES_LOCATION, "sym_vertical_m.png")


# colors
if platform == 'darwin' or PL == 'nt':
BG_COLOR = '#F0F0F0'
CANVAS_COLOR = "#ffffff"
Expand Down
Empty file modified BraceletGenerator/doc/doc.html
100755 → 100644
Empty file.
Empty file modified BraceletGenerator/doc/doc_fr.html
100755 → 100644
Empty file.
Empty file modified BraceletGenerator/doc/style.css
100755 → 100644
Empty file.
Empty file modified BraceletGenerator/images/about.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/aide.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/bg.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/bicolore.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/bicolore_en.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/bicolore_fr.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/bicolore_m.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/chevrons.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/color.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/color_m.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/couleurs_en.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/couleurs_fr.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/efface.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/efface_m.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/exit.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/exit_m.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/export.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/export_m.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/favicon.ico
100755 → 100644
Empty file.
Empty file modified BraceletGenerator/images/fg.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/icon.ico
100755 → 100644
Empty file.
Empty file modified BraceletGenerator/images/icon128.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/icon16.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/icon22.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/icon24.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/icon32.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/icon48.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified BraceletGenerator/images/icon64.png
100755 → 100644
Empty file modified BraceletGenerator/images/main_en.png
100755 → 100644
Empty file modified BraceletGenerator/images/main_fr.png
100755 → 100644
Empty file modified BraceletGenerator/images/moins.png
100755 → 100644
Empty file modified BraceletGenerator/images/moins_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/move.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_e.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_e_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_n.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_n_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_ne.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_ne_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_nw.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_nw_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_s.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_s_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_se.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_se_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_sw.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_sw_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_w.png
100755 → 100644
Empty file modified BraceletGenerator/images/move_w_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/new.png
100755 → 100644
Empty file modified BraceletGenerator/images/new_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/ouvrir.png
100755 → 100644
Empty file modified BraceletGenerator/images/ouvrir_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/plus.png
100755 → 100644
Empty file modified BraceletGenerator/images/plus_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/redo.png
100755 → 100644
Empty file modified BraceletGenerator/images/rotation_dte.png
100755 → 100644
Empty file modified BraceletGenerator/images/rotation_dte_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/rotation_gche.png
100755 → 100644
Empty file modified BraceletGenerator/images/rotation_gche_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/sauver.png
100755 → 100644
Empty file modified BraceletGenerator/images/sauver_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/saveas.png
100755 → 100644
Empty file modified BraceletGenerator/images/saveas_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/shifts.png
100755 → 100644
Empty file modified BraceletGenerator/images/sym_horizontal.png
100755 → 100644
Empty file modified BraceletGenerator/images/sym_horizontal_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/sym_vertical.png
100755 → 100644
Empty file modified BraceletGenerator/images/sym_vertical_m.png
100755 → 100644
Empty file modified BraceletGenerator/images/undo.png
100755 → 100644
Empty file modified CHANGELOG.txt
100755 → 100644
Empty file.
Empty file modified COPYING.txt
100755 → 100644
Empty file.
8 changes: 5 additions & 3 deletions MANIFEST.in
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include bracelet-generator *.txt *.rst bracelet-generator.desktop *.py bracelet-generator.svg
recursive-include BraceletGenerator/*
recursive-include documentation *
include *.txt *.rst *.py bracelet-generator.*
include BraceletGenerator/locale/fr_FR/LC_MESSAGES/BraceletGenerator.mo
include BraceletGenerator/locale/en_US/LC_MESSAGES/BraceletGenerator.mo
recursive-include examples *
recursive-include BraceletGenerator/images *
recursive-include BraceletGenerator/doc *
recursive-include po *
Empty file.
115 changes: 0 additions & 115 deletions archlinux/BraceletGenerator-1.4.0/BraceletGenerator/about.py

This file was deleted.

Loading

0 comments on commit fdc752a

Please sign in to comment.