[Greater-commits] r213 - trunk/Administration

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jun 20 14:42:35 CEST 2011


Author: bricks
Date: 2011-06-20 14:42:35 +0200 (Mon, 20 Jun 2011)
New Revision: 213

Added:
   trunk/Administration/Greater1.xpm
Modified:
   trunk/Administration/CMakeLists.txt
   trunk/Administration/MainWindow.cpp
   trunk/Administration/MainWindow.h
Log:
Fix icon loading on linux


Modified: trunk/Administration/CMakeLists.txt
===================================================================
--- trunk/Administration/CMakeLists.txt	2011-06-20 11:49:07 UTC (rev 212)
+++ trunk/Administration/CMakeLists.txt	2011-06-20 12:42:35 UTC (rev 213)
@@ -102,3 +102,7 @@
 endif(MSVC)
 
 install(TARGETS Administration DESTINATION bin)
+if (NOT WIN32)
+    #TODO: should be installed to $(CMAKE_INSTALL_PREFIX)/share/greater/
+    install(FILES Greater1.xpm DESTINATION bin)
+endif(NOT WIN32)

Added: trunk/Administration/Greater1.xpm
===================================================================
--- trunk/Administration/Greater1.xpm	2011-06-20 11:49:07 UTC (rev 212)
+++ trunk/Administration/Greater1.xpm	2011-06-20 12:42:35 UTC (rev 213)
@@ -0,0 +1,39 @@
+/* XPM */
+static char * Greater1_xpm[] = {
+"32 32 4 1",
+" 	c None",
+".	c #00FF00",
+"+	c #0000FF",
+"@	c #FF0000",
+"                                ",
+"                                ",
+"                                ",
+" ...            ...             ",
+"......        ......            ",
+"..+....      ....+......        ",
+" ..++............+........      ",
+"   ..++.....+....+........+     ",
+"   ....++...+....+........+.    ",
+"   ......++..+...+........+.    ",
+"   .......++++...+...@@..+..    ",
+"  ......++@@ ++++++++@@..+..    ",
+" ....+++..@@+.....+..+++++...   ",
+"..+++.......+.....+....+++...   ",
+"...........+.....+......++...   ",
+"..........+......+.......++...  ",
+"      ....+.....+....++++.+.... ",
+"      ...+.....++....+....++... ",
+"       ......++....+++.....++.. ",
+"       ....++.+....+........+.. ",
+"         .+...+...+.........++..",
+"         .....+.............++..",
+"          ...++...........@@++..",
+"           ..+....   .....@@++..",
+"             ....     ......++..",
+"                      ......++..",
+"                      .....++...",
+"                      ....+++...",
+"                      ....++....",
+"                      ....++... ",
+"                       ..++...  ",
+"                       .+++...  "};

Modified: trunk/Administration/MainWindow.cpp
===================================================================
--- trunk/Administration/MainWindow.cpp	2011-06-20 11:49:07 UTC (rev 212)
+++ trunk/Administration/MainWindow.cpp	2011-06-20 12:42:35 UTC (rev 213)
@@ -69,7 +69,12 @@
   const int STATUS_BAR_WIDTHS[2] = {-1, 220};
 
   //set Icon on left upper corner of the application
-  wxIcon icon(wxT("greater1"), wxBITMAP_TYPE_ICO_RESOURCE);
+#if defined(__WXMSW__)
+  wxIcon icon(wxT("Greater1"), wxBITMAP_TYPE_ICO_RESOURCE);
+#else
+  //TODO: path to icon is not correct yet
+  wxIcon icon(wxT("Greater1.xpm"));
+#endif
   SetIcon(icon);
 
   //set minimum size of the window

Modified: trunk/Administration/MainWindow.h
===================================================================
--- trunk/Administration/MainWindow.h	2011-06-20 11:49:07 UTC (rev 212)
+++ trunk/Administration/MainWindow.h	2011-06-20 12:42:35 UTC (rev 213)
@@ -118,7 +118,7 @@
 class MainWindow : public wxFrame  
 {
 public:
-	MainWindow(const wxString& title, const wxPoint& pos, const wxSize& size);
+  MainWindow(const wxString& title, const wxPoint& pos, const wxSize& size);
   ~MainWindow();
   void OnAuthenticate(wxCommandEvent& event);
   void OnDisconnect(wxCommandEvent& event);
@@ -149,7 +149,7 @@
 private:
   wxString             activeUser;
   wxString             activeDB;
-	wxNotebook*          notebook;
+  wxNotebook*          notebook;
   DECLARE_EVENT_TABLE()
   wxMenuBar*           menuBar;
   wxMenu*              menuFile;



More information about the Greater-commits mailing list