r21240 - gnucash/trunk/src/gnc - GSoC Cutecash project by Nitish Dodagatta (first half)

Christian Stimming cstim at code.gnucash.org
Wed Sep 7 14:03:08 EDT 2011


Author: cstim
Date: 2011-09-07 14:03:07 -0400 (Wed, 07 Sep 2011)
New Revision: 21240
Trac: http://svn.gnucash.org/trac/changeset/21240

Added:
   gnucash/trunk/src/gnc/dashboard.cpp
   gnucash/trunk/src/gnc/dashboard.hpp
   gnucash/trunk/src/gnc/dashboard.ui
   gnucash/trunk/src/gnc/fallback-icons.qrc
   gnucash/trunk/src/gnc/icons/
   gnucash/trunk/src/gnc/icons/oxygen/
   gnucash/trunk/src/gnc/icons/oxygen/48x48/
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-new.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-open.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-save-as.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-save.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-copy.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-cut.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-paste.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-redo.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-undo.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/help-about.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/list-add.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/tab-close-other.png
   gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/window-close.png
   gnucash/trunk/src/gnc/icons/oxygen/index.theme
Modified:
   gnucash/trunk/src/gnc/CMakeLists.txt
   gnucash/trunk/src/gnc/mainwindow.cpp
   gnucash/trunk/src/gnc/mainwindow.hpp
   gnucash/trunk/src/gnc/mainwindow.ui
Log:
GSoC Cutecash project by Nitish Dodagatta (first half)

 - Use system icons, fallback icon theme included
 - Prototype of unified transaction entry widget

Modified: gnucash/trunk/src/gnc/CMakeLists.txt
===================================================================
--- gnucash/trunk/src/gnc/CMakeLists.txt	2011-09-06 07:21:04 UTC (rev 21239)
+++ gnucash/trunk/src/gnc/CMakeLists.txt	2011-09-07 18:03:07 UTC (rev 21240)
@@ -28,6 +28,7 @@
   main.cpp
   mainwindow.cpp
   mainwindow-file.cpp
+  dashboard.cpp
 )
 
 SET (gnc_QOBJECT_HEADERS
@@ -37,6 +38,7 @@
   SplitListModel.hpp
   SplitListView.hpp
   mainwindow.hpp
+  dashboard.hpp
 )
 SET (gnc_HEADERS ${gnc_QOBJECT_HEADERS}
   Account.hpp
@@ -54,11 +56,13 @@
 
 SET (gnc_FORMS
   mainwindow.ui
+  dashboard.ui
 )
 
 SET (gnc_RESOURCES
   gnucash.qrc
   gtk-icons.qrc
+  fallback-icons.qrc
 )
 
 IF (WITH_SQL)

Added: gnucash/trunk/src/gnc/dashboard.cpp
===================================================================
--- gnucash/trunk/src/gnc/dashboard.cpp	                        (rev 0)
+++ gnucash/trunk/src/gnc/dashboard.cpp	2011-09-07 18:03:07 UTC (rev 21240)
@@ -0,0 +1,19 @@
+#include "dashboard.hpp"
+#include "ui_dashboard.h"
+
+Dashboard::Dashboard(QWidget *parent) :
+    QMainWindow(parent),
+    ui(new Ui::Dashboard)
+{
+    ui->setupUi(this);
+
+    setCentralWidget(ui->firstPersonOverview);
+
+    this->tabifyDockWidget(ui->txnEntryBasic, ui->txnEntrySplit);
+    ui->txnEntryBasic->raise();
+}
+
+Dashboard::~Dashboard()
+{
+    delete ui;
+}


Property changes on: gnucash/trunk/src/gnc/dashboard.cpp
___________________________________________________________________
Added: svn:eol-style
   + LF

Added: gnucash/trunk/src/gnc/dashboard.hpp
===================================================================
--- gnucash/trunk/src/gnc/dashboard.hpp	                        (rev 0)
+++ gnucash/trunk/src/gnc/dashboard.hpp	2011-09-07 18:03:07 UTC (rev 21240)
@@ -0,0 +1,22 @@
+#ifndef DASHBOARD_HPP
+#define DASHBOARD_HPP
+
+#include <QMainWindow>
+
+namespace Ui {
+    class Dashboard;
+}
+
+class Dashboard : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit Dashboard(QWidget *parent = 0);
+    ~Dashboard();
+
+private:
+    Ui::Dashboard *ui;
+};
+
+#endif // DASHBOARD_HPP


Property changes on: gnucash/trunk/src/gnc/dashboard.hpp
___________________________________________________________________
Added: svn:eol-style
   + LF

Added: gnucash/trunk/src/gnc/dashboard.ui
===================================================================
--- gnucash/trunk/src/gnc/dashboard.ui	                        (rev 0)
+++ gnucash/trunk/src/gnc/dashboard.ui	2011-09-07 18:03:07 UTC (rev 21240)
@@ -0,0 +1,444 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dashboard</class>
+ <widget class="QMainWindow" name="Dashboard">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1049</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget"/>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>1049</width>
+     <height>21</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QDockWidget" name="txnEntryBasic">
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>425</width>
+     <height>260</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>425</width>
+     <height>260</height>
+    </size>
+   </property>
+   <property name="baseSize">
+    <size>
+     <width>200</width>
+     <height>275</height>
+    </size>
+   </property>
+   <property name="acceptDrops">
+    <bool>false</bool>
+   </property>
+   <attribute name="dockWidgetArea">
+    <number>4</number>
+   </attribute>
+   <widget class="QWidget" name="dockWidgetContents">
+    <widget class="QLineEdit" name="lineEdit">
+     <property name="geometry">
+      <rect>
+       <x>80</x>
+       <y>0</y>
+       <width>331</width>
+       <height>23</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>0</y>
+       <width>101</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Description</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_2">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>30</y>
+       <width>55</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Date</string>
+     </property>
+    </widget>
+    <widget class="QDateEdit" name="dateEdit">
+     <property name="geometry">
+      <rect>
+       <x>80</x>
+       <y>30</y>
+       <width>110</width>
+       <height>23</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton">
+     <property name="geometry">
+      <rect>
+       <x>250</x>
+       <y>200</y>
+       <width>151</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Create Transaction</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="lineEdit_5">
+     <property name="geometry">
+      <rect>
+       <x>80</x>
+       <y>170</y>
+       <width>331</width>
+       <height>23</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_4">
+     <property name="geometry">
+      <rect>
+       <x>210</x>
+       <y>60</y>
+       <width>91</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Transfer To</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="lineEdit_4">
+     <property name="geometry">
+      <rect>
+       <x>80</x>
+       <y>140</y>
+       <width>331</width>
+       <height>23</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_8">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>170</y>
+       <width>55</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Num</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_3">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>60</y>
+       <width>101</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Transfer From</string>
+     </property>
+    </widget>
+    <widget class="QComboBox" name="comboBox_2">
+     <property name="geometry">
+      <rect>
+       <x>210</x>
+       <y>80</y>
+       <width>201</width>
+       <height>24</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="lineEdit_2">
+     <property name="geometry">
+      <rect>
+       <x>80</x>
+       <y>110</y>
+       <width>331</width>
+       <height>23</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_7">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>140</y>
+       <width>55</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Memo</string>
+     </property>
+    </widget>
+    <widget class="QComboBox" name="comboBox">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>80</y>
+       <width>191</width>
+       <height>24</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_5">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>110</y>
+       <width>55</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Amount</string>
+     </property>
+    </widget>
+   </widget>
+  </widget>
+  <widget class="QDockWidget" name="txnEntrySplit">
+   <attribute name="dockWidgetArea">
+    <number>4</number>
+   </attribute>
+   <widget class="QWidget" name="dockWidgetContents_2">
+    <widget class="QGroupBox" name="groupBox">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>60</y>
+       <width>261</width>
+       <height>161</height>
+      </rect>
+     </property>
+     <property name="title">
+      <string>Split</string>
+     </property>
+     <widget class="QLabel" name="label_10">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>30</y>
+        <width>101</width>
+        <height>16</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Transfer From/To</string>
+      </property>
+     </widget>
+     <widget class="QComboBox" name="comboBox_3">
+      <property name="geometry">
+       <rect>
+        <x>120</x>
+        <y>30</y>
+        <width>111</width>
+        <height>24</height>
+       </rect>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_11">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>60</y>
+        <width>55</width>
+        <height>15</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Amount</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_12">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>90</y>
+        <width>55</width>
+        <height>15</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Memo</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_13">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>120</y>
+        <width>55</width>
+        <height>15</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Num</string>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="lineEdit_6">
+      <property name="geometry">
+       <rect>
+        <x>70</x>
+        <y>60</y>
+        <width>181</width>
+        <height>23</height>
+       </rect>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="lineEdit_7">
+      <property name="geometry">
+       <rect>
+        <x>70</x>
+        <y>90</y>
+        <width>181</width>
+        <height>23</height>
+       </rect>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="lineEdit_8">
+      <property name="geometry">
+       <rect>
+        <x>70</x>
+        <y>120</y>
+        <width>181</width>
+        <height>23</height>
+       </rect>
+      </property>
+     </widget>
+    </widget>
+    <widget class="QLineEdit" name="lineEdit_3">
+     <property name="geometry">
+      <rect>
+       <x>80</x>
+       <y>0</y>
+       <width>331</width>
+       <height>23</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_6">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>0</y>
+       <width>81</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Description</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_9">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>30</y>
+       <width>55</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Date</string>
+     </property>
+    </widget>
+    <widget class="QDateEdit" name="dateEdit_2">
+     <property name="geometry">
+      <rect>
+       <x>80</x>
+       <y>30</y>
+       <width>110</width>
+       <height>23</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_2">
+     <property name="geometry">
+      <rect>
+       <x>280</x>
+       <y>130</y>
+       <width>121</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Add Split ></string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_3">
+     <property name="geometry">
+      <rect>
+       <x>280</x>
+       <y>170</y>
+       <width>121</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Create Transaction</string>
+     </property>
+    </widget>
+   </widget>
+  </widget>
+  <widget class="QDockWidget" name="firstPersonOverview">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <attribute name="dockWidgetArea">
+    <number>1</number>
+   </attribute>
+   <widget class="QWidget" name="dockWidgetContents_3"/>
+  </widget>
+  <widget class="QDockWidget" name="logViewer">
+   <property name="minimumSize">
+    <size>
+     <width>100</width>
+     <height>100</height>
+    </size>
+   </property>
+   <attribute name="dockWidgetArea">
+    <number>4</number>
+   </attribute>
+   <widget class="QWidget" name="dockWidgetContents_5"/>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

Added: gnucash/trunk/src/gnc/fallback-icons.qrc
===================================================================
--- gnucash/trunk/src/gnc/fallback-icons.qrc	                        (rev 0)
+++ gnucash/trunk/src/gnc/fallback-icons.qrc	2011-09-07 18:03:07 UTC (rev 21240)
@@ -0,0 +1,18 @@
+<RCC>
+    <qresource prefix="/">
+        <file>icons/oxygen/index.theme</file>
+        <file>icons/oxygen/48x48/actions/list-add.png</file>
+        <file>icons/oxygen/48x48/actions/edit-undo.png</file>
+        <file>icons/oxygen/48x48/actions/edit-redo.png</file>
+        <file>icons/oxygen/48x48/actions/edit-copy.png</file>
+        <file>icons/oxygen/48x48/actions/edit-cut.png</file>
+        <file>icons/oxygen/48x48/actions/edit-paste.png</file>
+        <file>icons/oxygen/48x48/actions/window-close.png</file>
+        <file>icons/oxygen/48x48/actions/tab-close-other.png</file>
+        <file>icons/oxygen/48x48/actions/document-new.png</file>
+        <file>icons/oxygen/48x48/actions/document-open.png</file>
+        <file>icons/oxygen/48x48/actions/document-save.png</file>
+        <file>icons/oxygen/48x48/actions/document-save-as.png</file>
+        <file>icons/oxygen/48x48/actions/help-about.png</file>
+    </qresource>
+</RCC>

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-new.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-new.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-open.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-open.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-save-as.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-save-as.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-save.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/document-save.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-copy.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-copy.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-cut.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-cut.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-paste.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-paste.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-redo.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-redo.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-undo.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/edit-undo.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/help-about.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/help-about.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/list-add.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/list-add.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/tab-close-other.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/tab-close-other.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/window-close.png
===================================================================
(Binary files differ)


Property changes on: gnucash/trunk/src/gnc/icons/oxygen/48x48/actions/window-close.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: gnucash/trunk/src/gnc/icons/oxygen/index.theme
===================================================================
--- gnucash/trunk/src/gnc/icons/oxygen/index.theme	                        (rev 0)
+++ gnucash/trunk/src/gnc/icons/oxygen/index.theme	2011-09-07 18:03:07 UTC (rev 21240)
@@ -0,0 +1,35 @@
+[Icon Theme]
+Name=Oxygen
+
+Comment=Oxygen Team
+
+DisplayDepth=32
+
+Inherits=hicolor
+
+Example=folder
+
+LinkOverlay=link
+LockOverlay=lockoverlay
+ShareOverlay=share
+ZipOverlay=zip
+
+DesktopDefault=48
+DesktopSizes=16,22,32,48,64,128,256
+ToolbarDefault=22
+ToolbarSizes=16,22,32,48
+MainToolbarDefault=22
+MainToolbarSizes=16,22,32,48
+SmallDefault=16
+SmallSizes=16,22,32,48
+PanelDefault=32
+PanelSizes=16,22,32,48,64,128,256
+DialogDefault=32
+DialogSizes=16,22,32,48,64,128,256
+
+Directories=48x48/actions
+
+[48x48/actions]
+Size=48
+Context=Actions
+Type=Threshold
\ No newline at end of file

Modified: gnucash/trunk/src/gnc/mainwindow.cpp
===================================================================
--- gnucash/trunk/src/gnc/mainwindow.cpp	2011-09-06 07:21:04 UTC (rev 21239)
+++ gnucash/trunk/src/gnc/mainwindow.cpp	2011-09-07 18:03:07 UTC (rev 21240)
@@ -32,6 +32,7 @@
 #include "config.h"
 #include "mainwindow.hpp"
 #include "ui_mainwindow.h"
+#include "dashboard.hpp"
 
 // gnucash includes
 #include <glib/gi18n.h>
@@ -85,7 +86,11 @@
     createActions();
     createToolBars();
     createStatusBar();
+    setIcons();
 
+    Dashboard *dboard = new Dashboard(this);
+    ui->tabWidget->addTab(dboard, tr("Dashboard"));
+
     /* Properties used by QSettings */
     QCoreApplication::setOrganizationName("Gnucash");
     QCoreApplication::setOrganizationDomain("gnucash.org");
@@ -98,6 +103,10 @@
 
     setWindowIcon(QIcon(":/pixmaps/gnucash-icon-64x64.png"));
 
+    if (!QIcon::hasThemeIcon("document-open")) {
+        QIcon::setThemeName("oxygen");
+    }
+
     newFile();
     setUnifiedTitleAndToolBarOnMac(true);
 }
@@ -193,10 +202,8 @@
     ui->actionSave_as->setShortcuts(QKeySequence::SaveAs);
 
     m_actionRedo = m_undoStack->createRedoAction(ui->menuEdit, tr("&Redo"));
-    m_actionRedo->setIcon(QIcon(":/gtk-icons/gtk-redo.png"));
     m_actionRedo->setShortcuts(QKeySequence::Redo);
     m_actionUndo = m_undoStack->createUndoAction(ui->menuEdit, tr("&Undo"));
-    m_actionUndo->setIcon(QIcon(":/gtk-icons/gtk-undo.png"));
     m_actionUndo->setShortcuts(QKeySequence::Undo);
     ui->menuEdit->insertAction(ui->actionCut, m_actionUndo);
     ui->menuEdit->insertAction(ui->actionCut, m_actionRedo);
@@ -253,6 +260,23 @@
     statusBar()->showMessage(tr("Ready"));
 }
 
+void MainWindow::setIcons()
+{
+    m_actionRedo->setIcon(QIcon::fromTheme("edit-redo"));
+    m_actionUndo->setIcon(QIcon::fromTheme("edit-undo"));
+    ui->actionCut->setIcon(QIcon::fromTheme("edit-cut"));
+    ui->actionCopy->setIcon(QIcon::fromTheme("edit-copy"));
+    ui->actionPaste->setIcon(QIcon::fromTheme("edit-paste"));
+    ui->actionCloseTab->setIcon(QIcon::fromTheme("tab-close-other"));
+    ui->actionNew->setIcon(QIcon::fromTheme("document-new"));
+    ui->actionOpen->setIcon(QIcon::fromTheme("document-open"));
+    ui->actionSave->setIcon(QIcon::fromTheme("document-save"));
+    ui->actionCloseTab->setIcon(QIcon::fromTheme("tab-close-other"));
+    ui->actionSave_as->setIcon(QIcon::fromTheme("document-save-as"));
+    ui->actionExit->setIcon(QIcon::fromTheme("window-close"));
+    ui->actionAbout->setIcon(QIcon::fromTheme("help-about"));
+}
+
 void MainWindow::readSettings()
 {
     QSettings settings;

Modified: gnucash/trunk/src/gnc/mainwindow.hpp
===================================================================
--- gnucash/trunk/src/gnc/mainwindow.hpp	2011-09-06 07:21:04 UTC (rev 21239)
+++ gnucash/trunk/src/gnc/mainwindow.hpp	2011-09-07 18:03:07 UTC (rev 21240)
@@ -91,6 +91,7 @@
     void createActions();
     void createToolBars();
     void createStatusBar();
+    void setIcons();
     void readSettings();
     void writeSettings();
     bool maybeSave();

Modified: gnucash/trunk/src/gnc/mainwindow.ui
===================================================================
--- gnucash/trunk/src/gnc/mainwindow.ui	2011-09-06 07:21:04 UTC (rev 21239)
+++ gnucash/trunk/src/gnc/mainwindow.ui	2011-09-07 18:03:07 UTC (rev 21240)
@@ -14,7 +14,7 @@
    <string>GnuCash Qt Example</string>
   </property>
   <property name="windowIcon">
-   <iconset resource="gnucash.qrc">
+   <iconset>
     <normaloff>:/pixmaps/gnucash-icon-32x32.png</normaloff>:/pixmaps/gnucash-icon-32x32.png</iconset>
   </property>
   <widget class="QWidget" name="centralwidget">
@@ -63,10 +63,10 @@
            <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
 <html><head><meta name="qrichtext" content="1" /><style type="text/css">
 p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Cutecash</span></p>
-<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Free Finance Software. Easy to develop, easy to use.</span></p>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Currently this is more or less a proof-of-concept for developers:</span></p>
+</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;">Cutecash</span></p>
+<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;">Free Finance Software. Easy to develop, easy to use.</span></p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Currently this is more or less a proof-of-concept for developers:</span></p>
 <ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-family:'Sans'; font-size:10pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Load an existing gnucash XML file</li>
 <li style=" font-family:'Sans'; font-size:10pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">It will show the account tree in a tree view and also a list view </li>
 <li style=" font-family:'Sans'; font-size:10pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Double-click on any account in either view; it will open the list of splits in that account.</li>
@@ -75,14 +75,14 @@
 <li style=" font-family:'Sans'; font-size:10pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Delete any of the existings transactions. Or entering a new one. Click Undo. Click Redo. Etc. etc.</li></ol>
 <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:10pt;">The list of splits in the account is comparable to gnucash's single line view.  Amounts, balance, date, all there.</span></p>
 <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:10pt;">The following parts are still missing:</span></p>
-<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Currently the accout selection of a transaction cannot be edited. </li>
-<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Editing or adding multi-split transactions are not yet supported (it shows only the string &quot;--Split Transaction--&quot;). </li>
-<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Editing or adding multi-currency transactions are not yet supported. </li>
-<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Any of the more specialized account views are not yet implemented.</li></ul>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">The fun part is how easy it was to add this. Let's see how far we will get...</span></p>
-<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Images</span></p>
+<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-family:'MS Shell Dlg 2'; font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Currently the accout selection of a transaction cannot be edited. </li>
+<li style=" font-family:'MS Shell Dlg 2'; font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Editing or adding multi-split transactions are not yet supported (it shows only the string &quot;--Split Transaction--&quot;). </li>
+<li style=" font-family:'MS Shell Dlg 2'; font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Editing or adding multi-currency transactions are not yet supported. </li>
+<li style=" font-family:'MS Shell Dlg 2'; font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Any of the more specialized account views are not yet implemented.</li></ul>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">The fun part is how easy it was to add this. Let's see how far we will get...</span></p>
+<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600;">Images</span></p>
 <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/pixmaps/gnucash_splash.png" /></p>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">We can also embed images here in this compiled-in HTML page, as you can see above. Eventually, this page should explain what this software can do for the new user. Maybe a </span><a href="gnc:test"><span style=" font-family:'Sans'; font-size:10pt; text-decoration: underline; color:#0000ff;">hyperlink </span></a><span style=" font-size:8pt;">here?</span></p></body></html></string>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">We can also embed images here in this compiled-in HTML page, as you can see above. Eventually, this page should explain what this software can do for the new user. Maybe a </span><a href="gnc:test"><span style=" font-family:'Sans'; font-size:10pt; text-decoration: underline; color:#0000ff;">hyperlink </span></a><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">here?</span></p></body></html></string>
           </property>
           <property name="openLinks">
            <bool>false</bool>
@@ -108,9 +108,6 @@
           <attribute name="verticalHeaderVisible">
            <bool>false</bool>
           </attribute>
-          <attribute name="verticalHeaderVisible">
-           <bool>false</bool>
-          </attribute>
          </widget>
         </item>
        </layout>
@@ -142,7 +139,7 @@
      <x>0</x>
      <y>0</y>
      <width>707</width>
-     <height>23</height>
+     <height>21</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuFile">
@@ -202,10 +199,6 @@
   </widget>
   <widget class="QStatusBar" name="statusbar"/>
   <action name="actionNew">
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-new.png</normaloff>:/gtk-icons/gtk-new.png</iconset>
-   </property>
    <property name="text">
     <string>&New</string>
    </property>
@@ -217,10 +210,6 @@
    </property>
   </action>
   <action name="actionOpen">
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-open.png</normaloff>:/gtk-icons/gtk-open.png</iconset>
-   </property>
    <property name="text">
     <string>&Open...</string>
    </property>
@@ -232,19 +221,11 @@
    </property>
   </action>
   <action name="actionAbout">
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-about.png</normaloff>:/gtk-icons/gtk-about.png</iconset>
-   </property>
    <property name="text">
     <string>&About</string>
    </property>
   </action>
   <action name="actionSave">
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-save.png</normaloff>:/gtk-icons/gtk-save.png</iconset>
-   </property>
    <property name="text">
     <string>&Save</string>
    </property>
@@ -256,10 +237,6 @@
    </property>
   </action>
   <action name="actionSave_as">
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-save-as.png</normaloff>:/gtk-icons/gtk-save-as.png</iconset>
-   </property>
    <property name="text">
     <string>Save &as...</string>
    </property>
@@ -268,10 +245,6 @@
    </property>
   </action>
   <action name="actionExit">
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-quit.png</normaloff>:/gtk-icons/gtk-quit.png</iconset>
-   </property>
    <property name="text">
     <string>E&xit</string>
    </property>
@@ -322,10 +295,6 @@
    <property name="enabled">
     <bool>false</bool>
    </property>
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-cut.png</normaloff>:/gtk-icons/gtk-cut.png</iconset>
-   </property>
    <property name="text">
     <string>Cu&t</string>
    </property>
@@ -334,10 +303,6 @@
    <property name="enabled">
     <bool>false</bool>
    </property>
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-copy.png</normaloff>:/gtk-icons/gtk-copy.png</iconset>
-   </property>
    <property name="text">
     <string>&Copy</string>
    </property>
@@ -346,10 +311,6 @@
    <property name="enabled">
     <bool>false</bool>
    </property>
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-paste.png</normaloff>:/gtk-icons/gtk-paste.png</iconset>
-   </property>
    <property name="text">
     <string>&Paste</string>
    </property>
@@ -405,10 +366,6 @@
    </property>
   </action>
   <action name="actionCloseTab">
-   <property name="icon">
-    <iconset resource="gtk-icons.qrc">
-     <normaloff>:/gtk-icons/gtk-close.png</normaloff>:/gtk-icons/gtk-close.png</iconset>
-   </property>
    <property name="text">
     <string>&Close Current Tab</string>
    </property>



More information about the gnucash-changes mailing list