[evolution-patches] e-d-s, categories. Patch for #273905, not adding deleted default categories back.
- From: Sushma Rai <rsushma novell com>
- To: Evolution patches List <evolution-patches gnome org>
- Subject: [evolution-patches] e-d-s, categories. Patch for #273905, not adding deleted default categories back.
- Date: Wed, 26 Oct 2005 15:06:25 +0530
ChangeLog explains.
Please review.
Thanks,
Sushma.
Index: libedataserver/e-categories.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-categories.c,v
retrieving revision 1.15
diff -u -p -r1.15 e-categories.c
--- libedataserver/e-categories.c 31 Aug 2005 04:26:10 -0000 1.15
+++ libedataserver/e-categories.c 26 Oct 2005 08:54:04 -0000
@@ -231,32 +231,34 @@ initialize_categories_config (void)
conf_is_dirty = FALSE;
}
+ else {
+ /* Add default categories only if gconf doesn't contain any category list */
+ /* Make sure we have all categories */
+ e_categories_add (_("Anniversary"), NULL, NULL, TRUE);
+ e_categories_add (_("Birthday"), NULL, E_DATA_SERVER_IMAGESDIR "/category_birthday_16.png", TRUE);
+ e_categories_add (_("Business"), NULL, E_DATA_SERVER_IMAGESDIR "/category_business_16.png", TRUE);
+ e_categories_add (_("Competition"), NULL, NULL, TRUE);
+ e_categories_add (_("Favorites"), NULL, E_DATA_SERVER_IMAGESDIR "/category_favorites_16.png", TRUE);
+ e_categories_add (_("Gifts"), NULL, E_DATA_SERVER_IMAGESDIR "/category_gifts_16.png", TRUE);
+ e_categories_add (_("Goals/Objectives"), NULL, E_DATA_SERVER_IMAGESDIR "/category_goals_16.png", TRUE);
+ e_categories_add (_("Holiday"), NULL, E_DATA_SERVER_IMAGESDIR "/category_holiday_16.png", TRUE);
+ e_categories_add (_("Holiday Cards"), NULL, E_DATA_SERVER_IMAGESDIR "/category_holiday-cards_16.png", TRUE);
+ e_categories_add (_("Hot Contacts"), NULL, E_DATA_SERVER_IMAGESDIR "/category_hot-contacts_16.png", TRUE);
+ e_categories_add (_("Ideas"), NULL, E_DATA_SERVER_IMAGESDIR "/category_ideas_16.png", TRUE);
+ e_categories_add (_("International"), NULL, E_DATA_SERVER_IMAGESDIR "/category_international_16.png", TRUE);
+ e_categories_add (_("Key Customer"), NULL, E_DATA_SERVER_IMAGESDIR "/category_key-customer_16.png", TRUE);
+ e_categories_add (_("Miscellaneous"), NULL, E_DATA_SERVER_IMAGESDIR "/category_miscellaneous_16.png", TRUE);
+ e_categories_add (_("Personal"), NULL, E_DATA_SERVER_IMAGESDIR "/category_personal_16.png", TRUE);
+ e_categories_add (_("Phone Calls"), NULL, E_DATA_SERVER_IMAGESDIR "/category_phonecalls_16.png", TRUE);
+ e_categories_add (_("Status"), NULL, E_DATA_SERVER_IMAGESDIR "/category_status_16.png", TRUE);
+ e_categories_add (_("Strategies"), NULL, E_DATA_SERVER_IMAGESDIR "/category_strategies_16.png", TRUE);
+ e_categories_add (_("Suppliers"), NULL, E_DATA_SERVER_IMAGESDIR "/category_suppliers_16.png", TRUE);
+ e_categories_add (_("Time & Expenses"), NULL, E_DATA_SERVER_IMAGESDIR "/category_time-and-expenses_16.png", TRUE);
+ e_categories_add (_("VIP"), NULL, NULL, TRUE);
+ e_categories_add (_("Waiting"), NULL, NULL, TRUE);
- /* Make sure we have all categories */
- add_category_if_not_present (_("Anniversary"), NULL, NULL, TRUE);
- add_category_if_not_present (_("Birthday"), NULL, E_DATA_SERVER_IMAGESDIR "/category_birthday_16.png", TRUE);
- add_category_if_not_present (_("Business"), NULL, E_DATA_SERVER_IMAGESDIR "/category_business_16.png", TRUE);
- add_category_if_not_present (_("Competition"), NULL, NULL, TRUE);
- add_category_if_not_present (_("Favorites"), NULL, E_DATA_SERVER_IMAGESDIR "/category_favorites_16.png", TRUE);
- add_category_if_not_present (_("Gifts"), NULL, E_DATA_SERVER_IMAGESDIR "/category_gifts_16.png", TRUE);
- add_category_if_not_present (_("Goals/Objectives"), NULL, E_DATA_SERVER_IMAGESDIR "/category_goals_16.png", TRUE);
- add_category_if_not_present (_("Holiday"), NULL, E_DATA_SERVER_IMAGESDIR "/category_holiday_16.png", TRUE);
- add_category_if_not_present (_("Holiday Cards"), NULL, E_DATA_SERVER_IMAGESDIR "/category_holiday-cards_16.png", TRUE);
- add_category_if_not_present (_("Hot Contacts"), NULL, E_DATA_SERVER_IMAGESDIR "/category_hot-contacts_16.png", TRUE);
- add_category_if_not_present (_("Ideas"), NULL, E_DATA_SERVER_IMAGESDIR "/category_ideas_16.png", TRUE);
- add_category_if_not_present (_("International"), NULL, E_DATA_SERVER_IMAGESDIR "/category_international_16.png", TRUE);
- add_category_if_not_present (_("Key Customer"), NULL, E_DATA_SERVER_IMAGESDIR "/category_key-customer_16.png", TRUE);
- add_category_if_not_present (_("Miscellaneous"), NULL, E_DATA_SERVER_IMAGESDIR "/category_miscellaneous_16.png", TRUE);
- add_category_if_not_present (_("Personal"), NULL, E_DATA_SERVER_IMAGESDIR "/category_personal_16.png", TRUE);
- add_category_if_not_present (_("Phone Calls"), NULL, E_DATA_SERVER_IMAGESDIR "/category_phonecalls_16.png", TRUE);
- add_category_if_not_present (_("Status"), NULL, E_DATA_SERVER_IMAGESDIR "/category_status_16.png", TRUE);
- add_category_if_not_present (_("Strategies"), NULL, E_DATA_SERVER_IMAGESDIR "/category_strategies_16.png", TRUE);
- add_category_if_not_present (_("Suppliers"), NULL, E_DATA_SERVER_IMAGESDIR "/category_suppliers_16.png", TRUE);
- add_category_if_not_present (_("Time & Expenses"), NULL, E_DATA_SERVER_IMAGESDIR "/category_time-and-expenses_16.png", TRUE);
- add_category_if_not_present (_("VIP"), NULL, NULL, TRUE);
- add_category_if_not_present (_("Waiting"), NULL, NULL, TRUE);
-
- save_config ();
+ save_config ();
+ }
}
static void
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.312
diff -u -p -r1.312 ChangeLog
--- ChangeLog 25 Oct 2005 11:30:06 -0000 1.312
+++ ChangeLog 26 Oct 2005 09:18:58 -0000
@@ -1,3 +1,10 @@
+2005-10-26 Sushma Rai <rsushma novell com>
+
+ * libedataserver/e-categories.c (initialize_categories_config): Add
+ default categories only if the category list is empty in gconf, so that
+ we don't bring back the deleted category from the default list
+ every time. Fixes #273905.
+
2005-10-25 Harish Krishnaswamy <kharish novell com>
* configure.in: Update version, libtool numbers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]