Changeset 84
- Timestamp:
- 21/05/07 15:45:18 (6 years ago)
- Location:
- trunk/OpenYahtzee
- Files:
-
- 1 added
- 7 edited
-
openyahtzee.kdevelop.pcs (modified) (previous)
-
openyahtzee.kdevses (modified) (3 diffs)
-
src/About.h (modified) (1 diff)
-
src/MainFrame.cpp (modified) (2 diffs)
-
src/MainFrame.h (modified) (1 diff)
-
src/Makefile.am (modified) (1 diff)
-
src/Makefile.in (modified) (1 diff)
-
src/UtilityFunctions.h (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/OpenYahtzee/openyahtzee.kdevses
r82 r84 2 2 <!DOCTYPE KDevPrjSession> 3 3 <KDevPrjSession> 4 <DocsAndViews NumberOfDocuments=" 8" >4 <DocsAndViews NumberOfDocuments="10" > 5 5 <Doc0 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/About.cpp" > 6 <View0 Type="Source" />6 <View0 line="0" Type="Source" /> 7 7 </Doc0> 8 8 <Doc1 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/DBwrapper.cpp" > … … 13 13 </Doc2> 14 14 <Doc3 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/HighScoreDialog.cpp" > 15 <View0 line="113"Type="Source" />15 <View0 Type="Source" /> 16 16 </Doc3> 17 17 <Doc4 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/openyahtzee.cpp" > … … 19 19 </Doc4> 20 20 <Doc5 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/MainFrame.cpp" > 21 <View0 line=" 871" Type="Source" />21 <View0 line="36" Type="Source" /> 22 22 </Doc5> 23 23 <Doc6 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/MainFrame.h" > 24 <View0 line=" 77" Type="Source" />24 <View0 line="20" Type="Source" /> 25 25 </Doc6> 26 26 <Doc7 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/HighScoreDialog.h" > 27 27 <View0 line="33" Type="Source" /> 28 28 </Doc7> 29 <Doc8 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/About.h" > 30 <View0 line="66" Type="Source" /> 31 </Doc8> 32 <Doc9 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/UtilityFunctions.h" > 33 <View0 line="80" Type="Source" /> 34 </Doc9> 29 35 </DocsAndViews> 30 36 <pluginList> -
trunk/OpenYahtzee/src/About.h
r66 r84 67 67 68 68 69 69 70 #endif // ABOUT_H -
trunk/OpenYahtzee/src/MainFrame.cpp
r82 r84 35 35 #include "SettingsDialog.h" 36 36 #include "About.h" 37 #include "UtilityFunctions.h" 37 38 #include <iostream> 38 39 #include <sstream> … … 946 947 } 947 948 948 /**949 * This function launches the default browser and directs it to a given url.950 *951 * This function extends the wxWidgets default function for this job by checking manually for952 * different browsers if the wxWidgets' function doesn't find one. This is usually necessary953 * under linux when epiphany isn't installed for some unknown reason.954 * @param link The url that the browser will go to when it stats.955 */956 void MainFrame::LaunchBrowser (wxString link){957 if (!wxLaunchDefaultBrowser(link)){958 //if builtin function doesn't work search for couple of browsers manually. see959 //http://linux-consulting.buanzo.com.ar/2006/05/wxwidgets-code-to-launch-browser.html960 961 // variable declarations962 wxArrayString browsers;963 wxPathList path_list;964 bool BrowserWasFound = false;965 unsigned int i = 0;966 wxString path;967 968 // Add directories to wxPathList's search path from PATH environment variable969 path_list.AddEnvList(wxT("PATH"));970 971 // Add browsers filenames. First item = most priority972 browsers.Add(wxT("firefox"));973 browsers.Add(wxT("firefox-bin"));974 browsers.Add(wxT("mozilla"));975 browsers.Add(wxT("mozilla-bin"));976 browsers.Add(wxT("opera"));977 browsers.Add(wxT("konqueror"));978 browsers.Add(wxT("epiphany"));979 980 for (i = 0; i < browsers.GetCount(); i++) {981 path = path_list.FindAbsoluteValidPath(browsers[i]);982 if (path.IsEmpty()) {983 continue;984 } else {985 BrowserWasFound = true;986 break;987 }988 }989 990 browsers.Clear();991 992 if (BrowserWasFound) {993 path += wxT(" ");994 path += link;995 ::wxExecute(path);996 } else {997 wxMessageBox(wxT("No browser has been found."),wxT("OpenYahtzee"));998 }999 }1000 }1001 949 1002 950 /** -
trunk/OpenYahtzee/src/MainFrame.h
r76 r84 75 75 void PostScore(int id); 76 76 void CalculateSubTotal(); 77 void LaunchBrowser (wxString link);78 77 int InitializeDatabase(); 79 78 -
trunk/OpenYahtzee/src/Makefile.am
r72 r84 11 11 12 12 noinst_HEADERS = MainFrame.h ObjectsID.h SettingsDB.h HighScoreTableDB.h \ 13 HighScoreDialog.h SettingsDialog.h Icon.h icon32.ico wxDynamicBitmap.h 13 HighScoreDialog.h SettingsDialog.h Icon.h icon32.ico wxDynamicBitmap.h UtilityFunctions.h 14 14 15 15 openyahtzee_LDFLAGS = `wx-config --libs` -lsqlite3 -
trunk/OpenYahtzee/src/Makefile.in
r72 r84 196 196 # the library search path. 197 197 noinst_HEADERS = MainFrame.h ObjectsID.h SettingsDB.h HighScoreTableDB.h \ 198 HighScoreDialog.h SettingsDialog.h Icon.h icon32.ico wxDynamicBitmap.h 198 HighScoreDialog.h SettingsDialog.h Icon.h icon32.ico wxDynamicBitmap.h UtilityFunctions.h 199 199 200 200 openyahtzee_LDFLAGS = `wx-config --libs` -lsqlite3
Note: See TracChangeset
for help on using the changeset viewer.
