Molecular Modeling Software
リビジョン | c1778840d83b3e193959a100947e6d08252c24d6 (tree) |
---|---|
日時 | 2019-08-17 17:55:16 |
作者 | toshinagata1964 <toshinagata1964@a2be...> |
コミッター | toshinagata1964 |
About dialog is improved.
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@625 a2be9bc6-48de-4e38-9406-05402d4bc13c
@@ -146,20 +146,7 @@ endif | ||
146 | 146 | $(CC) -c buildInfo.c -o $(DESTPREFIX)/buildInfo.o $(CFLAGS) |
147 | 147 | $(CPP) -o $@ $(DESTOBJECTS) $(DESTPREFIX)/buildInfo.o $(CFLAGS) $(LDFLAGS) |
148 | 148 | |
149 | -$(DESTPREFIX)/$(PRODUCT) : $(DESTPREFIX)/$(EXECUTABLE) ../Scripts/*.rb amber11 ortep3/ortep3$(EXE_SUFFIX) | |
150 | -ifeq ($(TARGET_PLATFORM),MAC) | |
151 | - rm -rf $(DESTPREFIX)/$(PRODUCT) | |
152 | - mkdir -p $(DESTPREFIX)/$(PRODUCT)/Contents/MacOS | |
153 | - mkdir -p $(DESTPREFIX)/$(PRODUCT)/Contents/Resources | |
154 | - cp -f Info.plist $(DESTPREFIX)/$(PRODUCT)/Contents | |
155 | - echo -n "APPL????" > $(DESTPREFIX)/$(PRODUCT)/Contents/PkgInfo | |
156 | - cp -r ../Scripts $(DESTPREFIX)/$(PRODUCT)/Contents/Resources | |
157 | - cp -r amber11 $(DESTPREFIX)/$(PRODUCT)/Contents/Resources | |
158 | - cp -r ortep3 $(DESTPREFIX)/$(PRODUCT)/Contents/Resources | |
159 | - mkdir -p $(DESTPREFIX)/$(PRODUCT)/Contents/Resources/Scripts/lib | |
160 | - for i in $(RUBY_EXTLIB); do cp $(RUBY_DIR)/lib/$$i $(DESTPREFIX)/$(PRODUCT)/Contents/Resources/Scripts/lib; done | |
161 | - cp $(DESTPREFIX)/$(EXECUTABLE) $(DESTPREFIX)/$(PRODUCT)/Contents/MacOS | |
162 | -endif | |
149 | +$(DESTPREFIX)/$(PRODUCT) : $(DESTPREFIX)/$(EXECUTABLE) ../Scripts/*.rb ../bitmaps/bitmaps amber11 ortep3/ortep3$(EXE_SUFFIX) | |
163 | 150 | ifeq ($(TARGET_PLATFORM),MSW) |
164 | 151 | echo PWD = $(PWD) |
165 | 152 | rm -rf $(DESTPREFIX)/$(PRODUCT_DIR) |
@@ -167,6 +154,7 @@ ifeq ($(TARGET_PLATFORM),MSW) | ||
167 | 154 | cp $(DESTPREFIX)/$(EXECUTABLE) $(DESTPREFIX)/$(PRODUCT_DIR)/$(FINAL_EXECUTABLE) |
168 | 155 | # cp mingwm10.dll $(DESTPREFIX)/$(PRODUCT_DIR) |
169 | 156 | cp -r ../Scripts $(DESTPREFIX)/$(PRODUCT_DIR) |
157 | + cp -r ../bitmaps/bitmaps $(DESTPREFIX)/$(PRODUCT_DIR) | |
170 | 158 | cp -r amber11 $(DESTPREFIX)/$(PRODUCT_DIR) |
171 | 159 | cp -r ortep3 $(DESTPREFIX)/$(PRODUCT_DIR) |
172 | 160 | mkdir -p $(DESTPREFIX)/$(PRODUCT_DIR)/Scripts/lib |
@@ -6203,7 +6203,7 @@ MoleculeSearchImpropersAcrossAtomGroup(Molecule *mp, IntGroup *atomgroup) | ||
6203 | 6203 | return sMoleculeSearchAcrossAtomGroup(mp->nimpropers, mp->impropers, 4, atomgroup, "impropers"); |
6204 | 6204 | } |
6205 | 6205 | |
6206 | -/* Subroutine for MoleculeGuessBonds. It can be also used independently, but make sure that *outNbonds/*outBonds | |
6206 | +/* Subroutine for MoleculeGuessBonds. It can be also used independently, but make sure that *outNbonds / *outBonds | |
6207 | 6207 | _correctly_ represents an array of two integers (as in mp->nbonds/mp->bonds). */ |
6208 | 6208 | /* Find atoms within the given "distance" from the given position. */ |
6209 | 6209 | /* If limit is negative, its absolute value denotes the threshold distance in angstrom; otherwise, |
@@ -9433,7 +9433,7 @@ MoleculeChangeResidueNumberWithArray(Molecule *mp, IntGroup *group, Int *resSeqs | ||
9433 | 9433 | int |
9434 | 9434 | MoleculeChangeResidueNumber(Molecule *mp, IntGroup *group, int resSeq) |
9435 | 9435 | { |
9436 | - return MoleculeChangeResidueNumberWithArray(mp, group, (Int *)(resSeq * 2 + 1)); | |
9436 | + return MoleculeChangeResidueNumberWithArray(mp, group, (Int *)(intptr_t)(resSeq * 2 + 1)); | |
9437 | 9437 | } |
9438 | 9438 | |
9439 | 9439 | /* Offset the residue numbers by a certain amount. The argument nresidues, if non-negative, |
@@ -38,7 +38,7 @@ extern int Ruby_showValue(RubyValue value, char **outValueString); | ||
38 | 38 | extern int Ruby_UpdateUI(int index, Molecule *mol, int *outChecked, char **outTitle); |
39 | 39 | |
40 | 40 | extern void Molby_startup(const char *script_path, const char *dir); |
41 | -extern char *Molby_getDescription(void); | |
41 | +extern void Molby_getDescription(char **versionString, char **auxString); | |
42 | 42 | extern RubyValue Molby_evalRubyScriptOnMolecule(const char *script, Molecule *mol, const char *fname, int *status); |
43 | 43 | /* extern RubyValue Molby_evalRubyScript(const char *script, int *status); |
44 | 44 | extern RubyValue Molby_evalRubyScriptOnActiveMoleculeWithInterrupt(const char *script, int *status); */ |
@@ -818,7 +818,7 @@ Ruby_UpdateUI(int index, Molecule *mol, int *outChecked, char **outTitle) | ||
818 | 818 | int status; |
819 | 819 | void *p[4]; |
820 | 820 | VALUE retval; |
821 | - p[0] = (void *)index; | |
821 | + p[0] = (void *)(intptr_t)index; | |
822 | 822 | p[1] = mol; |
823 | 823 | p[2] = outChecked; |
824 | 824 | p[3] = outTitle; |
@@ -4787,7 +4787,7 @@ s_MolEnumerable_Equal(VALUE self, VALUE val) | ||
4787 | 4787 | |
4788 | 4788 | #pragma mark ------ Allocate/Release/Accessor ------ |
4789 | 4789 | |
4790 | -/* An malloc'ed string buffer. Retains the error/warning message from the last ***load/***save method. */ | |
4790 | +/* An malloc'ed string buffer. Retains the error/warning message from the last ***load / ***save method. */ | |
4791 | 4791 | /* Accessible from Ruby as Molecule#error_message and Molecule#error_message=. */ |
4792 | 4792 | char *gLoadSaveErrorMessage = NULL; |
4793 | 4793 |
@@ -12090,19 +12090,20 @@ Ruby_showError(int status) | ||
12090 | 12090 | gMolbyRunLevel--; |
12091 | 12091 | } |
12092 | 12092 | |
12093 | -char * | |
12094 | -Molby_getDescription(void) | |
12093 | +void | |
12094 | +Molby_getDescription(char **versionString, char **auxString) | |
12095 | 12095 | { |
12096 | 12096 | extern const char *gVersionString, *gCopyrightString; |
12097 | 12097 | extern int gRevisionNumber; |
12098 | 12098 | extern char *gLastBuildString; |
12099 | - char *s; | |
12099 | + char *s1, *s2; | |
12100 | 12100 | char *revisionString; |
12101 | 12101 | if (gRevisionNumber > 0) { |
12102 | 12102 | asprintf(&revisionString, ", revision %d", gRevisionNumber); |
12103 | 12103 | } else revisionString = ""; |
12104 | - asprintf(&s, | |
12105 | - "Molby %s%s\n%s\nLast compile: %s\n" | |
12104 | + asprintf(&s1, "Molby %s%s\n%s\nLast compile: %s\n", | |
12105 | + gVersionString, revisionString, gCopyrightString, gLastBuildString); | |
12106 | + asprintf(&s2, | |
12106 | 12107 | #if !defined(__CMDMAC__) |
12107 | 12108 | "\nIncluding:\n" |
12108 | 12109 | "%s" |
@@ -12112,16 +12113,19 @@ Molby_getDescription(void) | ||
12112 | 12113 | "ruby %s, http://www.ruby-lang.org/\n" |
12113 | 12114 | "%s\n" |
12114 | 12115 | "FFTW 3.3.2, http://www.fftw.org/\n" |
12115 | - " Copyright (C) 2003, 2007-11 Matteo Frigo\n" | |
12116 | + " Copyright (C) 2003, 2007-11 Matteo Frigo" | |
12116 | 12117 | " and Massachusetts Institute of Technology", |
12117 | - gVersionString, revisionString, gCopyrightString, gLastBuildString, | |
12118 | + | |
12118 | 12119 | #if !defined(__CMDMAC__) |
12119 | 12120 | MyAppCallback_getGUIDescriptionString(), |
12120 | 12121 | #endif |
12121 | 12122 | gRubyVersion, gRubyCopyright); |
12122 | 12123 | if (revisionString[0] != 0) |
12123 | 12124 | free(revisionString); |
12124 | - return s; | |
12125 | + if (versionString != NULL) | |
12126 | + *versionString = s1; | |
12127 | + if (auxString != NULL) | |
12128 | + *auxString = s2; | |
12125 | 12129 | } |
12126 | 12130 | |
12127 | 12131 | void |
@@ -12174,9 +12178,13 @@ Molby_startup(const char *script, const char *dir) | ||
12174 | 12178 | } */ |
12175 | 12179 | |
12176 | 12180 | #if defined(__CMDMAC__) |
12177 | - wbuf = Molby_getDescription(); | |
12178 | - printf("%s\n", wbuf); | |
12179 | - free(wbuf); | |
12181 | + { | |
12182 | + char *wbuf2; | |
12183 | + Molby_getDescription(&wbuf, &wbuf2); | |
12184 | + printf("%s\n%s\n", wbuf, wbuf2); | |
12185 | + free(wbuf); | |
12186 | + free(wbuf2); | |
12187 | + } | |
12180 | 12188 | #endif |
12181 | 12189 | |
12182 | 12190 | /* Read atom display parameters */ |
@@ -1767,7 +1767,7 @@ s_RubyDialog_doTableAction(VALUE val) | ||
1767 | 1767 | |
1768 | 1768 | if (sym == sOnCountSymbol) { |
1769 | 1769 | retval = s_RubyDialog_CallActionProc(self, pval, 1, args); |
1770 | - vp[3] = (void *)(NUM2INT(rb_Integer(retval))); | |
1770 | + vp[3] = (void *)(intptr_t)(NUM2INT(rb_Integer(retval))); | |
1771 | 1771 | return retval; |
1772 | 1772 | } else if (sym == sOnGetValueSymbol) { |
1773 | 1773 | args[1] = INT2NUM((int)vp[3]); |
@@ -1781,7 +1781,7 @@ s_RubyDialog_doTableAction(VALUE val) | ||
1781 | 1781 | args[2] = INT2NUM((int)vp[4]); |
1782 | 1782 | args[3] = rb_str_new2((char *)vp[5]); |
1783 | 1783 | retval = s_RubyDialog_CallActionProc(self, pval, 4, args); |
1784 | - vp[6] = (void *)(NUM2INT(rb_Integer(retval))); | |
1784 | + vp[6] = (void *)(intptr_t)(NUM2INT(rb_Integer(retval))); | |
1785 | 1785 | return retval; |
1786 | 1786 | } else if (sym == sOnDragSelectionToRowSymbol) { |
1787 | 1787 | args[1] = INT2NUM((int)vp[3]); |
@@ -1791,15 +1791,15 @@ s_RubyDialog_doTableAction(VALUE val) | ||
1791 | 1791 | args[1] = INT2NUM((int)vp[3]); |
1792 | 1792 | args[2] = INT2NUM((int)vp[4]); |
1793 | 1793 | retval = s_RubyDialog_CallActionProc(self, pval, 3, args); |
1794 | - vp[5] = (void *)(RTEST(retval) ? 1 : 0); | |
1794 | + vp[5] = (void *)(intptr_t)(RTEST(retval) ? 1 : 0); | |
1795 | 1795 | return retval; |
1796 | 1796 | } else if (sym == sIsDragAndDropEnabledSymbol) { |
1797 | 1797 | retval = s_RubyDialog_CallActionProc(self, pval, 1, args); |
1798 | - vp[3] = (void *)(RTEST(retval) ? 1 : 0); | |
1798 | + vp[3] = (void *)(intptr_t)(RTEST(retval) ? 1 : 0); | |
1799 | 1799 | return retval; |
1800 | 1800 | } else if (sym == sOnSelectionChangedSymbol) { |
1801 | 1801 | retval = s_RubyDialog_CallActionProc(self, pval, 1, args); |
1802 | - vp[3] = (void *)(RTEST(retval) ? 1 : 0); | |
1802 | + vp[3] = (void *)(intptr_t)(RTEST(retval) ? 1 : 0); | |
1803 | 1803 | return retval; |
1804 | 1804 | } else if (sym == sOnSetColorSymbol) { |
1805 | 1805 | float *fg = (float *)vp[5]; |
@@ -1828,7 +1828,7 @@ s_RubyDialog_doTableAction(VALUE val) | ||
1828 | 1828 | } |
1829 | 1829 | n |= 2; |
1830 | 1830 | } |
1831 | - vp[7] = (void *)n; | |
1831 | + vp[7] = (void *)(intptr_t)n; | |
1832 | 1832 | return retval; |
1833 | 1833 | } else if (sym == sHasPopUpMenuSymbol) { |
1834 | 1834 | args[1] = INT2NUM((int)vp[3]); |
@@ -1841,7 +1841,7 @@ s_RubyDialog_doTableAction(VALUE val) | ||
1841 | 1841 | char **titles; |
1842 | 1842 | retval = rb_ary_to_ary(retval); |
1843 | 1843 | n = RARRAY_LEN(retval); |
1844 | - vp[6] = (void *)n; | |
1844 | + vp[6] = (void *)(intptr_t)n; | |
1845 | 1845 | titles = ALLOC_N(char *, n); |
1846 | 1846 | *((char ***)vp[5]) = titles; |
1847 | 1847 | for (i = 0; i < n; i++) { |
@@ -1877,7 +1877,7 @@ void | ||
1877 | 1877 | RubyDialog_GetTableItemText(RubyValue self, RDItem *ip, int row, int column, char *buf, int buflen) |
1878 | 1878 | { |
1879 | 1879 | int status; |
1880 | - void *vp[6] = { (void *)self, (void *)ip, (void *)sOnGetValueSymbol, (void *)row, (void *)column, NULL }; | |
1880 | + void *vp[6] = { (void *)(uintptr_t)self, (void *)ip, (void *)(uintptr_t)sOnGetValueSymbol, (void *)(intptr_t)row, (void *)(intptr_t)column, NULL }; | |
1881 | 1881 | VALUE val = rb_protect(s_RubyDialog_doTableAction, (VALUE)vp, &status); |
1882 | 1882 | if (status != 0 || val == Qnil) { |
1883 | 1883 | buf[0] = 0; |
@@ -1891,7 +1891,7 @@ int | ||
1891 | 1891 | RubyDialog_SetTableItemText(RubyValue self, RDItem *ip, int row, int column, const char *str) |
1892 | 1892 | { |
1893 | 1893 | int status; |
1894 | - void *vp[7] = { (void *)self, (void *)ip, (void *)sOnSetValueSymbol, (void *)row, (void *)column, (void *)str, NULL }; | |
1894 | + void *vp[7] = { (void *)(uintptr_t)self, (void *)ip, (void *)(uintptr_t)sOnSetValueSymbol, (void *)(intptr_t)row, (void *)(intptr_t)column, (void *)str, NULL }; | |
1895 | 1895 | VALUE val = rb_protect(s_RubyDialog_doTableAction, (VALUE)vp, &status); |
1896 | 1896 | if (status != 0 || val == Qnil) { |
1897 | 1897 | return -1; |
@@ -1903,7 +1903,7 @@ void | ||
1903 | 1903 | RubyDialog_DragTableSelectionToRow(RubyValue self, RDItem *ip, int row) |
1904 | 1904 | { |
1905 | 1905 | int status; |
1906 | - void *vp[5] = { (void *)self, (void *)ip, (void *)sOnDragSelectionToRowSymbol, (void *)row, NULL }; | |
1906 | + void *vp[5] = { (void *)(uintptr_t)self, (void *)ip, (void *)(uintptr_t)sOnDragSelectionToRowSymbol, (void *)(intptr_t)row, NULL }; | |
1907 | 1907 | rb_protect(s_RubyDialog_doTableAction, (VALUE)vp, &status); |
1908 | 1908 | if (status != 0) |
1909 | 1909 | Ruby_showError(status); |
@@ -1913,7 +1913,7 @@ int | ||
1913 | 1913 | RubyDialog_IsTableItemEditable(RubyValue self, RDItem *ip, int row, int column) |
1914 | 1914 | { |
1915 | 1915 | int status; |
1916 | - void *vp[6] = { (void *)self, (void *)ip, (void *)sIsItemEditableSymbol, (void *)row, (void *)column, NULL }; | |
1916 | + void *vp[6] = { (void *)(uintptr_t)self, (void *)ip, (void *)(uintptr_t)sIsItemEditableSymbol, (void *)(intptr_t)row, (void *)(intptr_t)column, NULL }; | |
1917 | 1917 | VALUE val = rb_protect(s_RubyDialog_doTableAction, (VALUE)vp, &status); |
1918 | 1918 | if (status != 0 || val == Qnil) |
1919 | 1919 | return 0; |
@@ -1924,7 +1924,7 @@ int | ||
1924 | 1924 | RubyDialog_IsTableDragAndDropEnabled(RubyValue self, RDItem *ip) |
1925 | 1925 | { |
1926 | 1926 | int status; |
1927 | - void *vp[4] = { (void *)self, (void *)ip, (void *)sIsDragAndDropEnabledSymbol, NULL }; | |
1927 | + void *vp[4] = { (void *)(uintptr_t)self, (void *)ip, (void *)(uintptr_t)sIsDragAndDropEnabledSymbol, NULL }; | |
1928 | 1928 | VALUE val = rb_protect(s_RubyDialog_doTableAction, (VALUE)vp, &status); |
1929 | 1929 | if (status != 0 || val == Qnil) |
1930 | 1930 | return 0; |
@@ -1945,7 +1945,7 @@ int | ||
1945 | 1945 | RubyDialog_SetTableItemColor(RubyValue self, RDItem *ip, int row, int column, float *fg, float *bg) |
1946 | 1946 | { |
1947 | 1947 | int status; |
1948 | - void *vp[8] = { (void *)self, (void *)ip, (void *)sOnSetColorSymbol, (void *)row, (void *)column, (void *)fg, (void *)bg, NULL }; | |
1948 | + void *vp[8] = { (void *)(uintptr_t)self, (void *)ip, (void *)(uintptr_t)sOnSetColorSymbol, (void *)(intptr_t)row, (void *)(intptr_t)column, (void *)fg, (void *)bg, NULL }; | |
1949 | 1949 | VALUE val = rb_protect(s_RubyDialog_doTableAction, (VALUE)vp, &status); |
1950 | 1950 | if (status != 0 || val == Qnil) |
1951 | 1951 | return 0; |
@@ -1956,7 +1956,7 @@ int | ||
1956 | 1956 | RubyDialog_HasPopUpMenu(RubyValue self, RDItem *ip, int row, int column, char ***menu_titles) |
1957 | 1957 | { |
1958 | 1958 | int status; |
1959 | - void *vp[7] = { (void *)self, (void *)ip, (void *)sHasPopUpMenuSymbol, (void *)row, (void *)column, (void *)menu_titles, NULL }; | |
1959 | + void *vp[7] = { (void *)(uintptr_t)self, (void *)ip, (void *)(uintptr_t)sHasPopUpMenuSymbol, (void *)(intptr_t)row, (void *)(intptr_t)column, (void *)menu_titles, NULL }; | |
1960 | 1960 | VALUE val = rb_protect(s_RubyDialog_doTableAction, (VALUE)vp, &status); |
1961 | 1961 | if (status != 0 || val == Qnil) |
1962 | 1962 | return 0; |
@@ -1967,7 +1967,7 @@ void | ||
1967 | 1967 | RubyDialog_OnPopUpMenuSelected(RubyValue self, RDItem *ip, int row, int column, int selected_index) |
1968 | 1968 | { |
1969 | 1969 | int status; |
1970 | - void *vp[7] = { (void *)self, (void *)ip, (void *)sOnPopUpMenuSelectedSymbol, (void *)row, (void *)column, (void *)selected_index, NULL }; | |
1970 | + void *vp[7] = { (void *)(uintptr_t)self, (void *)ip, (void *)(uintptr_t)sOnPopUpMenuSelectedSymbol, (void *)(intptr_t)row, (void *)(intptr_t)column, (void *)(intptr_t)selected_index, NULL }; | |
1971 | 1971 | rb_protect(s_RubyDialog_doTableAction, (VALUE)vp, &status); |
1972 | 1972 | if (status != 0) |
1973 | 1973 | Ruby_showError(status); |
@@ -2130,9 +2130,9 @@ RubyDialog_doItemAction(RubyValue self, RDItem *ip, int options) | ||
2130 | 2130 | { |
2131 | 2131 | int status; |
2132 | 2132 | void *vp[3]; |
2133 | - vp[0] = (void *)self; | |
2133 | + vp[0] = (void *)(uintptr_t)self; | |
2134 | 2134 | vp[1] = ip; |
2135 | - vp[2] = (void *)options; | |
2135 | + vp[2] = (void *)(intptr_t)options; | |
2136 | 2136 | rb_protect(s_RubyDialog_doItemAction, (VALUE)vp, &status); |
2137 | 2137 | if (status != 0) |
2138 | 2138 | Ruby_showError(status); |
@@ -2224,7 +2224,7 @@ RubyDialog_doKeyAction(RubyValue self, int keyCode) | ||
2224 | 2224 | int status; |
2225 | 2225 | void *values[2]; |
2226 | 2226 | values[0] = (void *)self; |
2227 | - values[1] = (void *)keyCode; | |
2227 | + values[1] = (void *)(intptr_t)keyCode; | |
2228 | 2228 | rb_protect(s_RubyDialog_doKeyAction, (VALUE)values, &status); |
2229 | 2229 | if (status != 0) { |
2230 | 2230 | /* Stop timer before showing error dialog */ |
@@ -2249,7 +2249,7 @@ s_RubyDialog_getFlexFlags(VALUE val) | ||
2249 | 2249 | return Qnil; /* Not set */ |
2250 | 2250 | else { |
2251 | 2251 | pval = rb_Integer(pval); |
2252 | - ((void **)val)[2] = (void *)(NUM2INT(pval)); | |
2252 | + ((void **)val)[2] = (void *)(intptr_t)(NUM2INT(pval)); | |
2253 | 2253 | return pval; |
2254 | 2254 | } |
2255 | 2255 | } |
@@ -2302,7 +2302,7 @@ RubyDialog_doCloseWindow(RubyValue self, int isModal) | ||
2302 | 2302 | { |
2303 | 2303 | int status; |
2304 | 2304 | VALUE rval; |
2305 | - void *args[2] = { (void *)self, (void *)isModal }; | |
2305 | + void *args[2] = { (void *)(uintptr_t)self, (void *)(intptr_t)isModal }; | |
2306 | 2306 | rval = rb_protect(s_RubyDialog_doCloseWindow, (VALUE)args, &status); |
2307 | 2307 | if (status != 0) { |
2308 | 2308 | Ruby_showError(status); |
@@ -2515,7 +2515,7 @@ s_RubyDialog_Font(int argc, VALUE *argv, VALUE self) | ||
2515 | 2515 | j = 2; |
2516 | 2516 | else j = 0; |
2517 | 2517 | args[i * 2] = "style"; |
2518 | - args[i * 2 + 1] = (void *)j; | |
2518 | + args[i * 2 + 1] = (void *)(intptr_t)j; | |
2519 | 2519 | args[i * 2 + 2] = NULL; |
2520 | 2520 | } else if (kval == sWeightSymbol) { |
2521 | 2521 | if (aval == sMediumSymbol) |
@@ -2526,7 +2526,7 @@ s_RubyDialog_Font(int argc, VALUE *argv, VALUE self) | ||
2526 | 2526 | j = 2; |
2527 | 2527 | else j = 0; |
2528 | 2528 | args[i * 2] = "weight"; |
2529 | - args[i * 2 + 1] = (void *)j; | |
2529 | + args[i * 2 + 1] = (void *)(intptr_t)j; | |
2530 | 2530 | args[i * 2 + 2] = NULL; |
2531 | 2531 | } else if (kval == sFamilySymbol) { |
2532 | 2532 | if (aval == sDefaultSymbol) |
@@ -2539,7 +2539,7 @@ s_RubyDialog_Font(int argc, VALUE *argv, VALUE self) | ||
2539 | 2539 | j = 3; |
2540 | 2540 | else j = 0; |
2541 | 2541 | args[i * 2] = "family"; |
2542 | - args[i * 2 + 1] = (void *)j; | |
2542 | + args[i * 2 + 1] = (void *)(intptr_t)j; | |
2543 | 2543 | args[i * 2 + 2] = NULL; |
2544 | 2544 | } |
2545 | 2545 | } |
@@ -2609,7 +2609,7 @@ s_RubyDialog_Pen(int argc, VALUE *argv, VALUE self) | ||
2609 | 2609 | j = 5; |
2610 | 2610 | else j = 0; |
2611 | 2611 | args[i * 2] = "style"; |
2612 | - args[i * 2 + 1] = (void *)j; | |
2612 | + args[i * 2 + 1] = (void *)(intptr_t)j; | |
2613 | 2613 | args[i * 2 + 2] = NULL; |
2614 | 2614 | } |
2615 | 2615 | } |
@@ -18,8 +18,10 @@ Source: "build\release\Molby\Scripts\mbsf\aromatic\*"; DestDir: {app}\Scripts\mb | ||
18 | 18 | Source: "build\release\Molby\Scripts\mbsf\heterocyclic\*"; DestDir: {app}\Scripts\mbsf\heterocyclic |
19 | 19 | Source: "build\release\Molby\Scripts\mbsf\coordination\*"; DestDir: {app}\Scripts\mbsf\coordination |
20 | 20 | Source: "build\release\Molby\Scripts\mbsf\solvents\*"; DestDir: {app}\Scripts\mbsf\solvents |
21 | +Source: "build\release\Molby\Scripts\mbsf\fragments\*"; DestDir: {app}\Scripts\mbsf\fragments | |
21 | 22 | Source: "build\release\Molby\Scripts\lib\*"; DestDir: {app}\Scripts\lib |
22 | 23 | Source: "build\release\Molby\Scripts\basis_sets\*"; DestDir: {app}\Scripts\basis_sets |
24 | +Source: "build\release\Molby\bitmaps\*"; DestDir: {app}\bitmaps | |
23 | 25 | Source: "build\release\Molby\ortep3\*"; DestDir: {app}\ortep3 |
24 | 26 | |
25 | 27 | [Icons] |
@@ -18,8 +18,10 @@ Source: "build\release\Molby\Scripts\mbsf\aromatic\*"; DestDir: {app}\Scripts\mb | ||
18 | 18 | Source: "build\release\Molby\Scripts\mbsf\heterocyclic\*"; DestDir: {app}\Scripts\mbsf\heterocyclic |
19 | 19 | Source: "build\release\Molby\Scripts\mbsf\coordination\*"; DestDir: {app}\Scripts\mbsf\coordination |
20 | 20 | Source: "build\release\Molby\Scripts\mbsf\solvents\*"; DestDir: {app}\Scripts\mbsf\solvents |
21 | +Source: "build\release\Molby\Scripts\mbsf\fragments\*"; DestDir: {app}\Scripts\mbsf\fragments | |
21 | 22 | Source: "build\release\Molby\Scripts\lib\*"; DestDir: {app}\Scripts\lib |
22 | 23 | Source: "build\release\Molby\Scripts\basis_sets\*"; DestDir: {app}\Scripts\basis_sets |
24 | +Source: "build\release\Molby\bitmaps\*"; DestDir: {app}\bitmaps | |
23 | 25 | Source: "build\release\Molby\ortep3\*"; DestDir: {app}\ortep3 |
24 | 26 | |
25 | 27 | [Icons] |
@@ -26,6 +26,8 @@ | ||
26 | 26 | |
27 | 27 | /* Begin PBXBuildFile section */ |
28 | 28 | E4196C66190B2FA500183E62 /* menu.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4196C65190B2FA500183E62 /* menu.mm */; }; |
29 | + E41A7F962307D61200C65830 /* bitmaps in Resources */ = {isa = PBXBuildFile; fileRef = E41A7F952307D61200C65830 /* bitmaps */; }; | |
30 | + E41A7F972307D71200C65830 /* bitmaps in CopyFiles */ = {isa = PBXBuildFile; fileRef = E41A7F952307D61200C65830 /* bitmaps */; }; | |
29 | 31 | E420BDEF1885746700A2B983 /* ConsoleFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDE81885746700A2B983 /* ConsoleFrame.cpp */; }; |
30 | 32 | E420BDF01885746700A2B983 /* filedlg.mm in Sources */ = {isa = PBXBuildFile; fileRef = E420BDEA1885746700A2B983 /* filedlg.mm */; }; |
31 | 33 | E420BDF11885746700A2B983 /* GlobalParameterFilesFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDEB1885746700A2B983 /* GlobalParameterFilesFrame.cpp */; }; |
@@ -157,6 +159,7 @@ | ||
157 | 159 | dstPath = Molby_resources; |
158 | 160 | dstSubfolderSpec = 16; |
159 | 161 | files = ( |
162 | + E41A7F972307D71200C65830 /* bitmaps in CopyFiles */, | |
160 | 163 | E4DF3BCE1FDCEB120014F980 /* Scripts in CopyFiles */, |
161 | 164 | E4DF3BCF1FDCEB120014F980 /* amber11 in CopyFiles */, |
162 | 165 | E4DF3BD01FDCEB120014F980 /* ortep3 in CopyFiles */, |
@@ -168,6 +171,7 @@ | ||
168 | 171 | /* Begin PBXFileReference section */ |
169 | 172 | 8D1107320486CEB800E47090 /* Molby.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Molby.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
170 | 173 | E4196C65190B2FA500183E62 /* menu.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = menu.mm; sourceTree = "<group>"; }; |
174 | + E41A7F952307D61200C65830 /* bitmaps */ = {isa = PBXFileReference; lastKnownFileType = folder; name = bitmaps; path = ../bitmaps/bitmaps; sourceTree = "<group>"; }; | |
171 | 175 | E420BDE81885746700A2B983 /* ConsoleFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConsoleFrame.cpp; sourceTree = "<group>"; }; |
172 | 176 | E420BDE91885746700A2B983 /* ConsoleFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleFrame.h; sourceTree = "<group>"; }; |
173 | 177 | E420BDEA1885746700A2B983 /* filedlg.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = filedlg.mm; sourceTree = "<group>"; }; |
@@ -440,6 +444,7 @@ | ||
440 | 444 | isa = PBXGroup; |
441 | 445 | children = ( |
442 | 446 | E4FC77D4183E4FF20064FB2E /* molby_icon.icns */, |
447 | + E41A7F952307D61200C65830 /* bitmaps */, | |
443 | 448 | E4FC77D6183E4FFE0064FB2E /* Scripts */, |
444 | 449 | E4FC77D8183E503E0064FB2E /* amber11 */, |
445 | 450 | E4ACACE418C6D32300F08B67 /* ortep3 */, |
@@ -654,6 +659,7 @@ | ||
654 | 659 | E4FC7F821840C22B0064FB2E /* molby_icon.icns in Resources */, |
655 | 660 | E4FC77D7183E4FFE0064FB2E /* Scripts in Resources */, |
656 | 661 | E4FC7802183E503E0064FB2E /* amber11 in Resources */, |
662 | + E41A7F962307D61200C65830 /* bitmaps in Resources */, | |
657 | 663 | E4ACACE718C6D32300F08B67 /* ortep3 in Resources */, |
658 | 664 | ); |
659 | 665 | runOnlyForDeploymentPostprocessing = 0; |
@@ -1070,7 +1076,7 @@ | ||
1070 | 1076 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
1071 | 1077 | CLANG_CXX_LIBRARY = "libc++"; |
1072 | 1078 | CLANG_ENABLE_MODULES = YES; |
1073 | - CLANG_ENABLE_OBJC_ARC = YES; | |
1079 | + CLANG_ENABLE_OBJC_ARC = NO; | |
1074 | 1080 | CLANG_WARN_BOOL_CONVERSION = YES; |
1075 | 1081 | CLANG_WARN_CONSTANT_CONVERSION = YES; |
1076 | 1082 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
@@ -1116,7 +1122,7 @@ | ||
1116 | 1122 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
1117 | 1123 | CLANG_CXX_LIBRARY = "libc++"; |
1118 | 1124 | CLANG_ENABLE_MODULES = YES; |
1119 | - CLANG_ENABLE_OBJC_ARC = YES; | |
1125 | + CLANG_ENABLE_OBJC_ARC = NO; | |
1120 | 1126 | CLANG_WARN_BOOL_CONVERSION = YES; |
1121 | 1127 | CLANG_WARN_CONSTANT_CONVERSION = YES; |
1122 | 1128 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
@@ -1154,7 +1160,7 @@ | ||
1154 | 1160 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
1155 | 1161 | CLANG_CXX_LIBRARY = "libc++"; |
1156 | 1162 | CLANG_ENABLE_MODULES = YES; |
1157 | - CLANG_ENABLE_OBJC_ARC = YES; | |
1163 | + CLANG_ENABLE_OBJC_ARC = NO; | |
1158 | 1164 | CLANG_WARN_BOOL_CONVERSION = YES; |
1159 | 1165 | CLANG_WARN_CONSTANT_CONVERSION = YES; |
1160 | 1166 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
@@ -1200,7 +1206,7 @@ | ||
1200 | 1206 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
1201 | 1207 | CLANG_CXX_LIBRARY = "libc++"; |
1202 | 1208 | CLANG_ENABLE_MODULES = YES; |
1203 | - CLANG_ENABLE_OBJC_ARC = YES; | |
1209 | + CLANG_ENABLE_OBJC_ARC = NO; | |
1204 | 1210 | CLANG_WARN_BOOL_CONVERSION = YES; |
1205 | 1211 | CLANG_WARN_CONSTANT_CONVERSION = YES; |
1206 | 1212 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
@@ -537,7 +537,6 @@ MoleculeView::DoExportGraphic(wxString& fname, float scale, int bg_color, int wi | ||
537 | 537 | wxBitmapType type = wxBITMAP_TYPE_PNG; |
538 | 538 | if (ext.CmpNoCase(_T("tif")) == 0) |
539 | 539 | type = wxBITMAP_TYPE_TIF; |
540 | - MyAppCallback_initImageHandlers(); | |
541 | 540 | img->SaveFile(fname, type); |
542 | 541 | delete img; |
543 | 542 | return 0; |
@@ -256,6 +256,9 @@ bool MyApp::OnInit(void) | ||
256 | 256 | new wxDocTemplate(m_docManager, _T("Z Matrix"), _T("*.zmat"), _T(""), _T("zmat"), _T("Molecule Doc"), _T("Molecule View"), CLASSINFO(MyDocument), CLASSINFO(MoleculeView)); |
257 | 257 | new wxDocTemplate(m_docManager, _T("Any Molecule"), _T("*.*"), _T(""), _T(""), _T("Molecule Doc"), _T("Molecule View"), CLASSINFO(MyDocument), CLASSINFO(MoleculeView)); |
258 | 258 | |
259 | + // Init image handlers | |
260 | + MyAppCallback_initImageHandlers(); | |
261 | + | |
259 | 262 | // Create the main frame window |
260 | 263 | frame = new MyFrame((wxDocManager *) m_docManager, (wxFrame *) NULL, |
261 | 264 | _T("Molby"), wxPoint(0, 0), wxSize(800, 600), |
@@ -1689,6 +1692,62 @@ MyApp::CheckIfAllWindowsAreGone(wxTopLevelWindow *frame) | ||
1689 | 1692 | this->AddPendingEvent(myEvent); |
1690 | 1693 | } |
1691 | 1694 | |
1695 | +#pragma mark ====== AboutBox ====== | |
1696 | + | |
1697 | +IMPLEMENT_CLASS(AboutDialog, wxDialog) | |
1698 | +BEGIN_EVENT_TABLE(AboutDialog, wxDialog) | |
1699 | +END_EVENT_TABLE() | |
1700 | + | |
1701 | +AboutDialog::AboutDialog(): | |
1702 | + wxDialog(NULL, -1, wxT("About Molby")) | |
1703 | +{ | |
1704 | + // vsizer1 --> hsizer1 --> Molby icon | |
1705 | + // | |-> vsizer2 --> "Molby" | |
1706 | + // | |-> version strings | |
1707 | + // | | |
1708 | + // |-> copyright messages | |
1709 | + | |
1710 | + char *s1, *s2; | |
1711 | + Molby_getDescription(&s1, &s2); | |
1712 | + wxString str1(s1, WX_DEFAULT_CONV); | |
1713 | + wxString str2(s2, WX_DEFAULT_CONV); | |
1714 | + free(s1); | |
1715 | + free(s2); | |
1716 | +#if defined(__WXMSW__) | |
1717 | + wxFont *textFont0 = new wxFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD); | |
1718 | + wxFont *textFont1 = new wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); | |
1719 | + wxFont *textFont2 = new wxFont(9, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); | |
1720 | +#else | |
1721 | + wxFont *textFont0 = new wxFont(14, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD); | |
1722 | + wxFont *textFont1 = new wxFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); | |
1723 | + wxFont *textFont2 = new wxFont(11, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); | |
1724 | +#endif | |
1725 | + wxBoxSizer *vsizer1 = new wxBoxSizer(wxVERTICAL); | |
1726 | + wxBoxSizer *vsizer2 = new wxBoxSizer(wxVERTICAL); | |
1727 | + wxBoxSizer *hsizer1 = new wxBoxSizer(wxHORIZONTAL); | |
1728 | + wxString tifname = wxGetApp().FindResourcePath() + wxFILE_SEP_PATH + wxT("bitmaps/molby_icon64.png"); | |
1729 | + wxBitmap *molbyBitmap = new wxBitmap(tifname, wxBITMAP_TYPE_PNG); | |
1730 | + wxStaticText *stext1 = new wxStaticText(this, -1, wxT("Molby")); | |
1731 | + stext1->SetFont(*textFont0); | |
1732 | + wxStaticText *stext2 = new wxStaticText(this, -1, str1); | |
1733 | + stext2->SetFont(*textFont1); | |
1734 | + wxStaticBitmap *staticBitmap = new wxStaticBitmap(this, -1, *molbyBitmap); | |
1735 | + vsizer2->Add(stext1, 0, wxALL | wxEXPAND, 2); | |
1736 | + vsizer2->Add(stext2, 0, wxALL | wxEXPAND, 2); | |
1737 | + hsizer1->AddSpacer(20); | |
1738 | + hsizer1->Add(staticBitmap, 0, 0, 10); | |
1739 | + hsizer1->AddSpacer(20); | |
1740 | + hsizer1->Add(vsizer2, 0, wxALL | wxEXPAND, 5); | |
1741 | + wxStaticText *stext3 = new wxStaticText(this, -1, str2); | |
1742 | + stext3->SetFont(*textFont2); | |
1743 | + vsizer1->Add(hsizer1, 0, wxALL | wxEXPAND, 5); | |
1744 | + vsizer1->Add(stext3, 0, wxALL | wxEXPAND, 5); | |
1745 | + vsizer1->Add(this->CreateButtonSizer(wxOK), 0, wxALL | wxEXPAND, 10); | |
1746 | + vsizer1->Layout(); | |
1747 | + this->SetSizerAndFit(vsizer1); | |
1748 | + this->Centre(); | |
1749 | +} | |
1750 | + | |
1692 | 1751 | #pragma mark ====== MyFrame (top-level window) ====== |
1693 | 1752 | |
1694 | 1753 | /* |
@@ -1717,11 +1776,9 @@ MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, | ||
1717 | 1776 | |
1718 | 1777 | void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) |
1719 | 1778 | { |
1720 | - char *s; | |
1721 | - s = Molby_getDescription(); | |
1722 | - wxString str(s, WX_DEFAULT_CONV); | |
1723 | - (void)wxMessageBox(str, _T("Molby")); | |
1724 | - free(s); | |
1779 | + AboutDialog *d = new AboutDialog(); | |
1780 | + if ( d->ShowModal() == wxID_OK ) | |
1781 | + d->Destroy(); | |
1725 | 1782 | } |
1726 | 1783 | |
1727 | 1784 | MyFrame *GetMainFrame(void) |
@@ -1738,18 +1795,18 @@ MyAppCallback_getGUIDescriptionString(void) | ||
1738 | 1795 | if (desc == NULL) { |
1739 | 1796 | asprintf(&desc, |
1740 | 1797 | "AmberTools 1.3, http://ambermd.org/\n" |
1741 | - " Copyright (C) Junmei Wang, Ross C. Walker, \n" | |
1742 | - " Michael F. Crowley, Scott Brozell and David A. Case\n" | |
1798 | + " Copyright (C) Junmei Wang, Ross C. Walker, " | |
1799 | + "Michael F. Crowley, Scott Brozell and David A. Case\n" | |
1743 | 1800 | "ORTEP-III, http://web.ornl.gov/sci/ortep/\n" |
1744 | - " Michael N. Burnett and Carroll K. Johnson, \n" | |
1745 | - " Oak Ridge National Laboratory Report ORNL-6895,\n" | |
1746 | - " 1996.\n" | |
1801 | + " Michael N. Burnett and Carroll K. Johnson, " | |
1802 | + "Oak Ridge National Laboratory Report ORNL-6895, " | |
1803 | + "1996.\n" | |
1747 | 1804 | "wxWidgets %d.%d.%d, http://www.wxwidgets.org/\n" |
1748 | - " Copyright (C) 1992-2013 Julian Smart, Vadim\n" | |
1749 | - " Zeitlin, Stefan Csomor, Robert Roebling,\n" | |
1750 | - " and other members of the wxWidgets team\n" | |
1751 | - " Portions (C) 1996 Artificial Intelligence \n" | |
1752 | - " Applications Institute\n", | |
1805 | + " Copyright (C) 1992-2013 Julian Smart, Vadim " | |
1806 | + "Zeitlin, Stefan Csomor, Robert Roebling,\n" | |
1807 | + " and other members of the wxWidgets team\n" | |
1808 | + " Portions (C) 1996 Artificial Intelligence " | |
1809 | + "Applications Institute\n", | |
1753 | 1810 | wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER); |
1754 | 1811 | } |
1755 | 1812 | return desc; |
@@ -244,6 +244,17 @@ private: | ||
244 | 244 | |
245 | 245 | DECLARE_APP(MyApp) |
246 | 246 | |
247 | +// About dialog | |
248 | +class AboutDialog: public wxDialog | |
249 | +{ | |
250 | + DECLARE_CLASS(AboutDialog) | |
251 | +public: | |
252 | + AboutDialog(); | |
253 | + void OnOKPressed(wxCommandEvent &event); | |
254 | +private: | |
255 | + DECLARE_EVENT_TABLE() | |
256 | +}; | |
257 | + | |
247 | 258 | // Define a new frame |
248 | 259 | class MyFrame: public wxDocParentFrame |
249 | 260 | { |
@@ -338,8 +338,7 @@ MyDocument::OnExport(wxCommandEvent& event) | ||
338 | 338 | { |
339 | 339 | wxString wildcard; |
340 | 340 | wxFileName fname(GetFilename()); |
341 | - wxString fnstr; | |
342 | - GetPrintableName(fnstr); | |
341 | + wxString fnstr = GetUserReadableName(); | |
343 | 342 | { |
344 | 343 | /* File filter is built from MyDocManager information */ |
345 | 344 | wxString desc, filter, ext; |
@@ -394,7 +393,7 @@ MyDocument::OnExportGraphic(wxCommandEvent& event) | ||
394 | 393 | i = MyAppCallback_getGlobalSettingsWithType("global.export_background_color", 'i', &bg_color); |
395 | 394 | if (i != 0) |
396 | 395 | bg_color = 0; |
397 | - GetPrintableName(fnstr); | |
396 | + fnstr = GetUserReadableName(); | |
398 | 397 | if ((i = fnstr.Find('.', true)) != wxNOT_FOUND) { |
399 | 398 | fnstr = fnstr.Mid(0, i); |
400 | 399 | } |
@@ -1673,7 +1672,7 @@ MoleculeCallback_displayName(Molecule *mol, char *buf, int bufsize) | ||
1673 | 1672 | MyDocument *doc = MyDocumentFromMolecule(mol); |
1674 | 1673 | if (doc != NULL) { |
1675 | 1674 | wxString fname; |
1676 | - doc->GetPrintableName(fname); | |
1675 | + fname = doc->GetUserReadableName(); | |
1677 | 1676 | strncpy(buf, (const char*)fname.mb_str(wxConvFile), bufsize - 1); |
1678 | 1677 | buf[bufsize - 1] = 0; |
1679 | 1678 | } else { |
@@ -36,7 +36,7 @@ MyThread::DetachNewThread(int (*entry_func)(void *, int), int (*exit_func)(void | ||
36 | 36 | MyThread::ExitCode |
37 | 37 | MyThread::Entry() |
38 | 38 | { |
39 | - ExitCode code = (ExitCode)((*m_entry_func)(m_argptr, m_argnum)); | |
39 | + ExitCode code = (ExitCode)(intptr_t)((*m_entry_func)(m_argptr, m_argnum)); | |
40 | 40 | if (m_exit_func) |
41 | 41 | (*m_exit_func)(m_argptr, m_argnum); |
42 | 42 | // Exit(code); |
@@ -1875,7 +1875,6 @@ RubyDialogCallback_saveBitmapToFile(RDBitmap *bitmap, const char *fname) | ||
1875 | 1875 | { |
1876 | 1876 | int len = strlen(fname); |
1877 | 1877 | wxBitmapType type = wxBITMAP_TYPE_PNG; |
1878 | - MyAppCallback_initImageHandlers(); | |
1879 | 1878 | if (len >= 4) { |
1880 | 1879 | if (strcasecmp(fname + len - 4, ".png") == 0) |
1881 | 1880 | type = wxBITMAP_TYPE_PNG; |
@@ -23,7 +23,7 @@ | ||
23 | 23 | #include "wx/sizer.h" |
24 | 24 | #include "wx/panel.h" |
25 | 25 | #include "wx/timer.h" |
26 | -#include "../Mollib/Ruby_bind/ruby_dialog.h" | |
26 | +#include "../MolLib/Ruby_bind/ruby_dialog.h" | |
27 | 27 | #include "MyListCtrl.h" |
28 | 28 | |
29 | 29 | #include "modalwindow.h" |
@@ -113,12 +113,12 @@ bool HasAppKit_10_6() | ||
113 | 113 | { |
114 | 114 | BOOL showObject = YES; |
115 | 115 | |
116 | - NSString* resolvedLink = [[NSFileManager defaultManager] pathContentOfSymbolicLinkAtPath:filename]; | |
116 | + NSString *resolvedLink = [[NSFileManager defaultManager] destinationOfSymbolicLinkAtPath:filename error:NULL]; | |
117 | 117 | if ( resolvedLink != nil ) |
118 | 118 | filename = resolvedLink; |
119 | 119 | |
120 | - NSDictionary* fileAttribs = [[NSFileManager defaultManager] | |
121 | - fileAttributesAtPath:filename traverseLink:YES]; | |
120 | + NSDictionary *fileAttribs = [[NSFileManager defaultManager] attributesOfItemAtPath:filename error:NULL]; | |
121 | + | |
122 | 122 | if (fileAttribs) |
123 | 123 | { |
124 | 124 | // check for packages |