main.cpp
changeset 390 0e1aeb21cb78
parent 366 e95081c21da2
child 394 67cfa6e6b863
     1.1 --- a/main.cpp	Thu Sep 21 13:48:05 2006 +0000
     1.2 +++ b/main.cpp	Mon Oct 16 12:42:54 2006 +0000
     1.3 @@ -2,11 +2,9 @@
     1.4  #include <QPixmap>
     1.5  #include <QTranslator>
     1.6  #include <QDir>
     1.7 -#include <q3ptrlist.h>
     1.8  #include <QTextCodec>
     1.9  #include <q3network.h>
    1.10 -#include <QMenu>
    1.11 -#include <QActionGroup>
    1.12 +//#include <QActionGroup>
    1.13  
    1.14  #include "settings.h"
    1.15  #include "options.h"
    1.16 @@ -29,98 +27,6 @@
    1.17  FlagRowObj *systemFlagsDefault;	// used to copy from in LinkableMapObj
    1.18  FlagRowObj *standardFlagsDefault;
    1.19  
    1.20 -// Lists of actions
    1.21 -// (QActionGroup could not be "enabled")
    1.22 -Q3PtrList <QAction> actionListBranches;
    1.23 -
    1.24 -// Actions which change sometimes
    1.25 -QAction *actionFileSave;
    1.26 -QAction *actionFilePrint;
    1.27 -QAction *actionEditUndo;
    1.28 -QAction *actionEditRedo;
    1.29 -QAction *actionEditCopy;
    1.30 -QAction *actionEditCut;
    1.31 -QAction *actionEditPaste;
    1.32 -QAction *actionEditMoveUp;
    1.33 -QAction *actionEditMoveDown;
    1.34 -QAction *actionEditToggleScroll;
    1.35 -QAction *actionEditOpenURL;
    1.36 -QAction *actionEditOpenURLTab;
    1.37 -QAction *actionEditOpenMultipleURLTabs;
    1.38 -QAction *actionEditURL;
    1.39 -QAction *actionEditHeading2URL;
    1.40 -QAction *actionEditBugzilla2URL;
    1.41 -QAction *actionEditFATE2URL;
    1.42 -QAction *actionEditOpenVymLink;
    1.43 -QAction *actionEditOpenMultipleVymLinks;
    1.44 -QAction *actionEditVymLink;
    1.45 -QAction *actionEditToggleHideExport;
    1.46 -QAction *actionEditDeleteVymLink;
    1.47 -QAction *actionEditMapInfo;
    1.48 -QAction *actionEditHeading;
    1.49 -QAction *actionEditDelete;
    1.50 -QAction *actionEditAddBranch;
    1.51 -QAction *actionEditAddBranchHere;
    1.52 -QAction *actionEditAddBranchAbove;
    1.53 -QAction *actionEditAddBranchBelow;
    1.54 -QAction *actionEditRemoveBranchKeepChilds;
    1.55 -QAction *actionEditRemoveChilds;
    1.56 -QAction *actionEditImportAdd;
    1.57 -QAction *actionEditImportReplace;
    1.58 -QAction *actionEditSaveBranch;
    1.59 -QAction *actionEditSelectFirst;
    1.60 -QAction *actionEditSelectLast;
    1.61 -QAction *actionEditLoadImage;
    1.62 -
    1.63 -QAction *actionFormatColor;		
    1.64 -QAction *actionFormatPickColor;		
    1.65 -QAction *actionFormatColorBranch;
    1.66 -QAction *actionFormatColorSubtree;
    1.67 -QAction *actionFormatBackColor;
    1.68 -QAction *actionFormatLinkColorHint;
    1.69 -QAction *actionFormatLinkColor;		
    1.70 -
    1.71 -QActionGroup *actionGroupModModes;
    1.72 -QAction *actionModModeColor;
    1.73 -QAction *actionModModeLink;
    1.74 -QAction *actionModModeCopy;
    1.75 -
    1.76 -QActionGroup *actionGroupFormatFrameTypes;
    1.77 -QAction *actionFormatFrameNone;
    1.78 -QAction *actionFormatFrameRectangle;
    1.79 -
    1.80 -QActionGroup *actionGroupFormatLinkStyles;
    1.81 -QAction *actionFormatIncludeImagesVer;
    1.82 -QAction *actionFormatIncludeImagesHor;
    1.83 -QAction *actionFormatHideLinkUnselected;
    1.84 -QAction *actionFormatLinkStyleLine;
    1.85 -QAction *actionFormatLinkStyleParabel;
    1.86 -QAction *actionFormatLinkStylePolyLine;
    1.87 -QAction *actionFormatLinkStylePolyParabel;
    1.88 -
    1.89 -QAction *actionViewToggleNoteEditor;
    1.90 -QAction *actionViewToggleHistoryWindow;
    1.91 -
    1.92 -QAction *actionSettingsAutoselectHeading;
    1.93 -QAction *actionSettingsAutoselectText;
    1.94 -QAction *actionSettingsAutoedit;
    1.95 -QAction *actionSettingsUseDelKey;
    1.96 -QAction *actionSettingsUseFlagGroups;
    1.97 -QAction *actionSettingsUseHideExport;
    1.98 -
    1.99 -
   1.100 -QMenu* branchContextMenu;
   1.101 -QMenu* branchAddContextMenu;
   1.102 -QMenu* branchRemoveContextMenu;
   1.103 -QMenu* branchLinksContextMenu;
   1.104 -QMenu* branchXLinksContextMenuEdit;
   1.105 -QMenu* branchXLinksContextMenuFollow;
   1.106 -QMenu* floatimageContextMenu;
   1.107 -QMenu* canvasContextMenu;
   1.108 -QMenu* fileLastMapsMenu;
   1.109 -QMenu* fileImportMenu;
   1.110 -QMenu* fileExportMenu;
   1.111 -
   1.112  
   1.113  Settings settings ("InSilmaril","vym"); // Organization, Application name
   1.114  
   1.115 @@ -177,13 +83,18 @@
   1.116  	} else
   1.117  	// ok, let's find my way on my own
   1.118  	{
   1.119 -		vymBaseDir.setPath ("/usr/share/vym");
   1.120 -		if (!vymBaseDir.exists())
   1.121 -		{
   1.122 -			vymBaseDir.setPath ("/usr/local/share/vym");
   1.123 +		#if defined (Q_OS_MACX)
   1.124 +			vymBaseDir.setPath(vymBaseDir.currentDirPath() +"/vym.app/Contents");
   1.125 +
   1.126 +		#else
   1.127 +			vymBaseDir.setPath ("/usr/share/vym");
   1.128  			if (!vymBaseDir.exists())
   1.129 -				vymBaseDir.setPath(vymBaseDir.currentDirPath() );
   1.130 -		}		
   1.131 +			{
   1.132 +				vymBaseDir.setPath ("/usr/local/share/vym");
   1.133 +				if (!vymBaseDir.exists())
   1.134 +					vymBaseDir.setPath(vymBaseDir.currentDirPath() );
   1.135 +			}		
   1.136 +		#endif
   1.137  	}
   1.138  
   1.139  	iconPath=vymBaseDir.path()+"/icons/";