[evolution-kolab/ek-wip-acl] EPlugin: use a #define for the number of folder types we have



commit ee12a096d4d460d4cf81f40241271879cc55c3cd
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Tue Sep 25 12:25:40 2012 +0200

    EPlugin: use a #define for the number of folder types we have
    
    * we only take into account the "super types", i.e.
      mail, events, notes, tasks and contacts
    * since the "default" types are mere cosmetics, we
      ignore them here
    * we also do not differentiate the email types we
      could set (and accumulate them under "email"
      type)

 src/eplugin/e-kolab-folder-metadata.c |    3 ++-
 src/eplugin/e-kolab-folder-metadata.h |    8 ++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/eplugin/e-kolab-folder-metadata.c b/src/eplugin/e-kolab-folder-metadata.c
index 8e9c948..3e38f5f 100644
--- a/src/eplugin/e-kolab-folder-metadata.c
+++ b/src/eplugin/e-kolab-folder-metadata.c
@@ -220,7 +220,7 @@ e_kolab_folder_metadata_ui_new (void)
 
 	/* folder type radio buttons */
 
-	for (ii = 0; ii < 5; ii++) {
+	for (ii = 0; ii < KOLAB_FOLDER_META_UI_NUM_TYPES; ii++) {
 		uidata->widgets->radio_btn_handler_id[ii] =
 			g_signal_connect (G_OBJECT (uidata->widgets->radio_btn_type[ii]),
 			                  "toggled",
@@ -294,6 +294,7 @@ e_kolab_folder_metadata_ui_update_from_uidata (KolabFolderMetaUIData *uidata)
 	g_signal_handler_unblock (widget, handler_id);
 
 	/* radio button group (current folder type) */
+	
 
 	g_warning ("%s: FIXME implement me", __func__);
 }
diff --git a/src/eplugin/e-kolab-folder-metadata.h b/src/eplugin/e-kolab-folder-metadata.h
index 1dd952c..1dfa179 100644
--- a/src/eplugin/e-kolab-folder-metadata.h
+++ b/src/eplugin/e-kolab-folder-metadata.h
@@ -41,6 +41,10 @@
 
 /*----------------------------------------------------------------------------*/
 
+#define KOLAB_FOLDER_META_UI_NUM_TYPES 5
+
+/*----------------------------------------------------------------------------*/
+
 typedef struct _KolabFolderMetaUIWidgets KolabFolderMetaUIWidgets;
 struct _KolabFolderMetaUIWidgets {
 	GtkWidget *container;
@@ -48,8 +52,8 @@ struct _KolabFolderMetaUIWidgets {
 	GtkWidget *frame_type_select;
 	GHashTable *folder_type_map;
 	GSList *radio_group;
-	gulong radio_btn_handler_id[5];
-	GtkWidget *radio_btn_type[5];
+	gulong radio_btn_handler_id[KOLAB_FOLDER_META_UI_NUM_TYPES];
+	GtkWidget *radio_btn_type[KOLAB_FOLDER_META_UI_NUM_TYPES];
 	/* sub-widgets of container - folder options */
 	GtkWidget *frame_options;
 	GtkWidget *chk_btn_show_all;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]