[evolution-kolab/ek-wip-acl] EPlugin: data type fixes



commit 77b93ecee44f3420d69bfe550909bb5f86eb9651
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Tue Sep 25 11:57:07 2012 +0200

    EPlugin: data type fixes
    
    * signal handler IDs are gulong now (guint before)
    * explicitly cast widget to GObject for g_signal_connect()
    * added type assertion for folder metadata uidata

 src/eplugin/e-kolab-folder-metadata.c |    9 ++++++---
 src/eplugin/e-kolab-folder-metadata.h |    4 ++--
 2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/eplugin/e-kolab-folder-metadata.c b/src/eplugin/e-kolab-folder-metadata.c
index b31c839..8e9c948 100644
--- a/src/eplugin/e-kolab-folder-metadata.c
+++ b/src/eplugin/e-kolab-folder-metadata.c
@@ -29,6 +29,7 @@
 #include <config.h>
 
 #include <glib/gi18n-lib.h>
+#include <glib-object.h>
 
 #include <libekolab/camel-kolab-imapx-store.h>
 #include <libekolabutil/kolab-util-error.h>
@@ -212,7 +213,7 @@ e_kolab_folder_metadata_ui_new (void)
 	gtk_container_add (GTK_CONTAINER (uidata->widgets->chk_btn_show_all), widget);
 
 	uidata->widgets->chk_btn_show_all_handler_id =
-		g_signal_connect (uidata->widgets->chk_btn_show_all,
+		g_signal_connect (G_OBJECT (uidata->widgets->chk_btn_show_all),
 		                  "toggled",
 		                  G_CALLBACK (kolab_folder_metadata_ui_show_all_cb),
 		                  uidata);
@@ -221,7 +222,7 @@ e_kolab_folder_metadata_ui_new (void)
 
 	for (ii = 0; ii < 5; ii++) {
 		uidata->widgets->radio_btn_handler_id[ii] =
-			g_signal_connect (uidata->widgets->radio_btn_type[ii],
+			g_signal_connect (G_OBJECT (uidata->widgets->radio_btn_type[ii]),
 			                  "toggled",
 			                  G_CALLBACK (kolab_folder_metadata_ui_foldertype_cb),
 			                  uidata);
@@ -259,9 +260,11 @@ void
 e_kolab_folder_metadata_ui_update_from_uidata (KolabFolderMetaUIData *uidata)
 {
 	GtkWidget *widget = NULL;
-	guint handler_id = 0;
+	gulong handler_id = 0;
 
 	g_return_if_fail (uidata != NULL);
+	g_return_if_fail (E_IS_SHELL_VIEW (uidata->shell_view));
+	g_return_if_fail (E_IS_ALERT_BAR (uidata->alert_bar));
 	g_return_if_fail (uidata->metadata != NULL);
 	g_return_if_fail (uidata->widgets != NULL);
 
diff --git a/src/eplugin/e-kolab-folder-metadata.h b/src/eplugin/e-kolab-folder-metadata.h
index 0010abc..9299d57 100644
--- a/src/eplugin/e-kolab-folder-metadata.h
+++ b/src/eplugin/e-kolab-folder-metadata.h
@@ -48,7 +48,7 @@ struct _KolabFolderMetaUIWidgets {
 	GtkWidget *frame_type_select;
 	GHashTable *folder_type_map;
 	GSList *radio_group;
-	guint radio_btn_handler_id[5];
+	gulong radio_btn_handler_id[5];
 	GtkWidget *radio_btn_type[5];
 #if 0
 	GtkWidget *radio_btn_type_mail;     /* 0 */
@@ -60,7 +60,7 @@ struct _KolabFolderMetaUIWidgets {
 	/* sub-widgets of container - folder options */
 	GtkWidget *frame_options;
 	GtkWidget *chk_btn_show_all;
-	guint chk_btn_show_all_handler_id;
+	gulong chk_btn_show_all_handler_id;
 };
 
 typedef struct _KolabFolderMetaUIData KolabFolderMetaUIData;



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