Skip to content

Commit

Permalink
FEM: Replace hardcoded icon with a normal image file
Browse files Browse the repository at this point in the history
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
  • Loading branch information
PrzemoF authored and wwmayer committed Apr 9, 2015
1 parent 03e5bb5 commit 9731fc4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 35 deletions.
8 changes: 8 additions & 0 deletions src/Mod/Fem/Gui/CMakeLists.txt
Expand Up @@ -211,6 +211,14 @@ fc_target_copy_resource(FemGui
MechanicalAnalysis.ui
)

SET(FemGuiIcon_SVG
Resources/icons/preferences-fem.svg
)

fc_copy_sources(FemGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Fem" ${FemGuiIcon_SVG})

INSTALL(FILES ${FemGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Fem/Resources/icons")

SET_BIN_DIR(FemGui FemGui /Mod/Fem)
SET_PYTHON_PREFIX_SUFFIX(FemGui)

Expand Down
48 changes: 13 additions & 35 deletions src/Mod/Fem/InitGui.py
@@ -1,4 +1,4 @@
# Fem gui init module
# Fem gui init module
# (c) 2009 Juergen Riegel
#
# Gathering all the information to start FreeCAD
Expand Down Expand Up @@ -30,41 +30,19 @@
#***************************************************************************/


class FemWorkbench (Workbench):
"Fem workbench object"
def __init__(self):
self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Fem/Resources/icons/preferences-fem.svg"
self.__class__.MenuText = "FEM"
self.__class__.ToolTip = "FEM workbench"

class FemWorkbench ( Workbench ):
"Fem workbench object"
Icon = """
/* XPM */
static const char *Fem_Box[]={
"16 16 3 1",
". c None",
"# c #000000",
"a c #c6c642",
"................",
".......#######..",
"......#aaaaa##..",
".....#aaaaa###..",
"....#aaaaa##a#..",
"...#aaaaa##aa#..",
"..#aaaaa##aaa#..",
".########aaaa#..",
".#aaaaa#aaaaa#..",
".#aaaaa#aaaa##..",
".#aaaaa#aaa##...",
".#aaaaa#aa##....",
".#aaaaa#a##... .",
".#aaaaa###......",
".########.......",
"................"};
"""
MenuText = "Fem"
ToolTip = "Fem workbench"
def Initialize(self):
# load the module
import Fem
import FemGui

def Initialize(self):
# load the module
import Fem
import FemGui
def GetClassName(self):
return "FemGui::Workbench"
def GetClassName(self):
return "FemGui::Workbench"

Gui.addWorkbench(FemWorkbench())

0 comments on commit 9731fc4

Please sign in to comment.