From f2b29cdf76b8095dc44f58e2b9eea652812f8099 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sun, 5 Mar 2006 00:55:10 +0000 Subject: [PATCH] Consolidate the new icons with the existing set of icons. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13485 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 8 ++++ src/gnome-utils/Makefile.am | 1 - src/gnome-utils/gnc-dir.h.in | 1 - src/gnome-utils/gnc-icons.c | 6 +++ src/gnome-utils/gnc-icons.h | 2 + src/gnome/gnc-plugin-page-register.c | 35 +----------------- src/gnome/ui/Makefile.am | 4 +- src/pixmaps/Makefile.am | 4 ++ src/pixmaps/split-transaction-16.png | Bin 0 -> 616 bytes .../split-transaction.png} | Bin src/pixmaps/transfer-16.png | Bin 0 -> 789 bytes .../transfer.png} | Bin 12 files changed, 22 insertions(+), 39 deletions(-) create mode 100644 src/pixmaps/split-transaction-16.png rename src/{gnome/ui/icon-split.png => pixmaps/split-transaction.png} (100%) create mode 100644 src/pixmaps/transfer-16.png rename src/{gnome/ui/icon-transfer.png => pixmaps/transfer.png} (100%) diff --git a/ChangeLog b/ChangeLog index a800033ba1..ef634e45f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2006-03-04 David Hampton + * src/pixmaps/* + * src/gnome-utils/Makefile.am: + * src/gnome-utils/gnc-icons.[ch]: + * src/gnome-utils/gnc-dir.h.in: + * src/gnome/gnc-plugin-page-register.c: + * src/gnome/ui/*: Consolidate the new icons with the existing set + of icons. + * src/gnome-utils/gnc-tree-model-account.c: * src/engine/Account.c: * src/engine/Group.c: Rework the events generated by the diff --git a/src/gnome-utils/Makefile.am b/src/gnome-utils/Makefile.am index 305980070f..24246002e3 100644 --- a/src/gnome-utils/Makefile.am +++ b/src/gnome-utils/Makefile.am @@ -221,7 +221,6 @@ gnc-dir.h: gnc-dir.h.in ${top_builddir}/config.status Makefile sed < $< > $@.tmp \ -e 's:@-GNC_ACCOUNTS_DIR-@:${GNC_ACCOUNTS_DIR}:g' \ -e 's:@-GNC_GLADE_DIR-@:${GNC_GLADE_DIR}:g' \ - -e 's:@-GNC_UI_DIR-@:${GNC_UI_DIR}:g' \ -e 's:@-GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY-@:${GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY}:g' mv $@.tmp $@ diff --git a/src/gnome-utils/gnc-dir.h.in b/src/gnome-utils/gnc-dir.h.in index f132e61a8b..9bd2f48ea3 100644 --- a/src/gnome-utils/gnc-dir.h.in +++ b/src/gnome-utils/gnc-dir.h.in @@ -25,7 +25,6 @@ #define GNC_ACCOUNTS_DIR "@-GNC_ACCOUNTS_DIR-@" #define GNC_GLADE_DIR "@-GNC_GLADE_DIR-@" -#define GNC_UI_DIR "@-GNC_UI_DIR-@" #define GNC_GCONF_DIR "@-GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY-@" #endif diff --git a/src/gnome-utils/gnc-icons.c b/src/gnome-utils/gnc-icons.c index ca0246363e..6c25bae49d 100644 --- a/src/gnome-utils/gnc-icons.c +++ b/src/gnome-utils/gnc-icons.c @@ -16,6 +16,8 @@ static GtkStockItem items[] = { { GNC_STOCK_EDIT_ACCOUNT, N_("_Edit Account"), 0, 0, NULL }, { GNC_STOCK_NEW_ACCOUNT, N_("_New Account"), 0, 0, NULL }, { GNC_STOCK_OPEN_ACCOUNT, N_("_Open Account"), 0, 0, NULL }, + { GNC_STOCK_TRANSFER, N_("_Transfer..."), 0, 0, NULL }, + { GNC_STOCK_SPLIT_TRANS, N_("S_plit Transaction"), 0, 0, NULL }, }; static void @@ -86,5 +88,9 @@ gnc_load_stock_icons (void) "new-account.png", "new-account-16.png"); gnc_add_stock_icon_pair (factory, GNC_STOCK_OPEN_ACCOUNT, "open-account.png", "open-account-16.png"); + gnc_add_stock_icon_pair (factory, GNC_STOCK_TRANSFER, + "transfer.png", "transfer-16.png"); + gnc_add_stock_icon_pair (factory, GNC_STOCK_SPLIT_TRANS, + "split-transaction.png", "split-transaction-16.png"); gtk_icon_factory_add_default (factory); } diff --git a/src/gnome-utils/gnc-icons.h b/src/gnome-utils/gnc-icons.h index 4a31108f79..87c948b3fe 100644 --- a/src/gnome-utils/gnc-icons.h +++ b/src/gnome-utils/gnc-icons.h @@ -14,6 +14,8 @@ G_BEGIN_DECLS #define GNC_STOCK_EDIT_ACCOUNT "gnc-edit-account" #define GNC_STOCK_NEW_ACCOUNT "gnc-new-account" #define GNC_STOCK_OPEN_ACCOUNT "gnc-open-account" +#define GNC_STOCK_SPLIT_TRANS "gnc-split-transaction" +#define GNC_STOCK_TRANSFER "gnc-transfer" //FIXME: use own budget icons? #define GNC_STOCK_BUDGET "gnc-budget" diff --git a/src/gnome/gnc-plugin-page-register.c b/src/gnome/gnc-plugin-page-register.c index 56fe83cee2..3a38f17ba1 100644 --- a/src/gnome/gnc-plugin-page-register.c +++ b/src/gnome/gnc-plugin-page-register.c @@ -51,7 +51,6 @@ #include "dialog-transfer.h" #include "dialog-utils.h" #include "druid-stock-split.h" -#include "gnc-dir.h" #include "gnc-book.h" #include "gnc-gconf-utils.h" #include "gnc-component-manager.h" @@ -83,9 +82,6 @@ static QofLogModule log_module = GNC_MOD_GUI; #define DEFAULT_LINES_OPTION_NAME KEY_NUMBER_OF_ROWS #define DEFAULT_LINES_AMOUNT 20 -#define GNC_STOCK_SPLIT "gnc-stock-split" -#define GNC_STOCK_TRANSFER "gnc-stock-transfer" - static void gnc_plugin_page_register_class_init (GncPluginPageRegisterClass *klass); static void gnc_plugin_page_register_init (GncPluginPageRegister *plugin_page); static void gnc_plugin_page_register_finalize (GObject *object); @@ -269,7 +265,7 @@ static GtkToggleActionEntry toggle_entries[] = { N_("Show two lines of information for each transaction"), G_CALLBACK (gnc_plugin_page_register_cmd_style_double_line), FALSE }, - { "SplitTransactionAction", GNC_STOCK_SPLIT, N_("S_plit Transaction"), NULL, + { "SplitTransactionAction", GNC_STOCK_SPLIT_TRANS, N_("S_plit Transaction"), NULL, N_("Show all splits in the current transaction"), G_CALLBACK (gnc_plugin_page_register_cmd_expand_transaction), FALSE }, }; @@ -510,35 +506,6 @@ gnc_plugin_page_register_class_init (GncPluginPageRegisterClass *klass) gnc_plugin_class->update_edit_menu_actions = gnc_plugin_page_register_update_edit_menu; g_type_class_add_private(klass, sizeof(GncPluginPageRegisterPrivate)); - - // setup custom icons - { - // http://www.gtk.org/api/2.6/gtk/migrating-gnomeuiinfo.html - GtkIconFactory *icon_factory; - GtkIconSet *icon_set; - GtkIconSource *icon_source; - - icon_factory = gtk_icon_factory_new(); - - icon_set = gtk_icon_set_new(); - icon_source = gtk_icon_source_new(); - gtk_icon_source_set_filename(icon_source, GNC_UI_DIR "/icon-split.png"); - gtk_icon_set_add_source(icon_set, icon_source); - gtk_icon_source_free(icon_source); - gtk_icon_factory_add(icon_factory, GNC_STOCK_SPLIT, icon_set); - gtk_icon_set_unref(icon_set); - - icon_set = gtk_icon_set_new(); - icon_source = gtk_icon_source_new(); - gtk_icon_source_set_filename(icon_source, GNC_UI_DIR "/icon-transfer.png"); - gtk_icon_set_add_source(icon_set, icon_source); - gtk_icon_source_free(icon_source); - gtk_icon_factory_add(icon_factory, GNC_STOCK_TRANSFER, icon_set); - gtk_icon_set_unref(icon_set); - - gtk_icon_factory_add_default(icon_factory); - g_object_unref(icon_factory); - } } static void diff --git a/src/gnome/ui/Makefile.am b/src/gnome/ui/Makefile.am index 2cf739c46f..f1e1cfe1b4 100644 --- a/src/gnome/ui/Makefile.am +++ b/src/gnome/ui/Makefile.am @@ -12,8 +12,6 @@ ui_DATA = \ gnc-sxed-to-create-window-ui.xml \ gnc-reconcile-window-ui.xml \ gnc-sxed-window-ui.xml \ - gnc-sxed-window-ui-full.xml \ - icon-split.png \ - icon-transfer.png + gnc-sxed-window-ui-full.xml EXTRA_DIST = $(ui_DATA) diff --git a/src/pixmaps/Makefile.am b/src/pixmaps/Makefile.am index 5a69f37efb..4222d258b7 100644 --- a/src/pixmaps/Makefile.am +++ b/src/pixmaps/Makefile.am @@ -14,6 +14,10 @@ gncpixmap_DATA = \ new-account.png \ open-account-16.png \ open-account.png \ + split-transaction-16.png \ + split-transaction.png \ + transfer-16.png \ + transfer.png \ stock_split_title.png \ stock_split_watermark.png diff --git a/src/pixmaps/split-transaction-16.png b/src/pixmaps/split-transaction-16.png new file mode 100644 index 0000000000000000000000000000000000000000..040f1d7f4058860d708a1a97d127a298cbaf8fcb GIT binary patch literal 616 zcmV-u0+;=XP)D zkHw?35?oaemtu`nfRq5!AiM%5;lv}s2UnsD$ z`U3#3YM3b-?~8oQ(rLyYWKM@SyMz}n zchAKV5gK|8sN>Cy(b2~^afk?Cc6Zs{+5&{;pC;Tt@44I!;5A-N(GV~(#0iD`M`mVc zDdh9q86LjW`t!v_%nXMaAt*ru8UkuctyW`cVd2W`W`>#J)r_D4XM%}fW_;e+;mPzg zA2v5H6{wWUm}!$iGlC#a$Y!&wuB>pvOc0P0h-WNvxop#cnGr%joZ!q+EEah-H%B3# zr!9`@>+dI(N}Y4CI6vQHV66xm0wDxU&ls#OFSEb5cQFH64EQyI*l!E~j!UHrSyakp zObs72xJspRIv5xl;NAKg#0kxIh@-Xt)|(Rs1_#+Ld~z~7HT5v^(L}wTv?q-ul_W_j zX*4=CXsoJjX6D3+Iu|A0M^*2AEpCe|?QvWd;nh#uG6>Ww&6H>W0000P^NGuG-Tz zmBmcIe*g9R`u*37v8iMH|NlR_txV=R((RVIGRYjA9KyeT|7Cdn=F`o*KwS-jF7T_` zq!(zfF#u)|zyJJW`1hZI;qSk{f3H1!y&9%Q-l<4mU01vN9~++xD;ujUN+8~P^tSi>jpw)j z|NqbMFi2Wv2q>$mEdI{SE5pk4|M!n?KMtZ8psy}5 zUrkxu^!?Z049x%k{^DX|W_bDb%bCX)_VY-Xr7)>#Xsl-771QNrXJUBw=t2cUE>c}nm$IK?c$;$Ze{Pm|(mQ}gtGcYhPm_>I^7FJNpVPRrq`1tJ? zgCOJATW3$5b9{1W@-qeo1_maV;&sZJ3gXj#GqMUWF)=V)x&31M?FX+4U@j985j6Yo z;H#UE`Ffn zQ=5S;GhrlU7?85cl=Sv?zJCAF^P|_V-bi_RWa@LQ3UOs&8Qa`MRnLkXLRlRE*