[evolution-patches] Gadu-Gadu support on IM list



Hi!

There is possibility in contact entry, selecting few popular instant
messengers for contacting person, but on the list is missing the most
popular messenger in my country (Poland) - Gadu-Gadu, which is supported
by Gaim. The most important thing is that, Gadu-Gadu is informally
stndard for communication in my country, and other IMs like MSN, Yahoo
or ICQ are not in use. I've made two patches for Evolution and Evolution
Data Server to fix this.

Best regards

	Artur

-- 
Każdy problem ma swoje rozwiązanie, 
jeżeli nie ma rozwiązania to nie ma problemu.
diff -urN evolution-data-server.orig/addressbook/backends/groupwise/e-book-backend-groupwise.c evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c
--- evolution-data-server.orig/addressbook/backends/groupwise/e-book-backend-groupwise.c	2004-06-02 12:31:44.303464592 +0200
+++ evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c	2004-06-02 12:49:41.386723048 +0200
@@ -123,6 +123,7 @@
 	GList *aim_list = NULL;
 	GList *icq_list = NULL;
 	GList *yahoo_list = NULL;
+	GList *gadu_gadu_list = NULL;
 	GList *msn_list = NULL;
 	GList *jabber_list = NULL;
 	GList *groupwise_list = NULL;
@@ -158,6 +159,10 @@
 			im_field_id = E_CONTACT_IM_YAHOO;
 			im_attr_list = &yahoo_list;
 		}
+		else if (g_str_equal (address->service, "gadu-gadu")) {
+			im_field_id = E_CONTACT_IM_GADU_GADU;
+			im_attr_list = &gadu_gadu_list;
+		}
 		else if (g_str_equal (address->service, "jabber")) {
 			im_field_id = E_CONTACT_IM_JABBER;
 			im_attr_list = &jabber_list;
@@ -180,6 +185,7 @@
 	e_contact_set_attributes (contact, E_CONTACT_IM_JABBER, jabber_list);
 	e_contact_set_attributes (contact, E_CONTACT_IM_ICQ, icq_list);
 	e_contact_set_attributes (contact, E_CONTACT_IM_YAHOO, yahoo_list);
+	e_contact_set_attributes (contact, E_CONTACT_IM_GADU_GADU, gadu_gadu_list);
 	e_contact_set_attributes (contact, E_CONTACT_IM_MSN, msn_list);
 	e_contact_set_attributes (contact, E_CONTACT_IM_GROUPWISE, groupwise_list);
 	
@@ -187,6 +193,7 @@
 	free_attr_list (jabber_list);
 	free_attr_list (icq_list);
 	free_attr_list (yahoo_list);
+	free_attr_list (gadu_gadu_list);
 	free_attr_list (msn_list);
 	free_attr_list (groupwise_list);
 }
@@ -219,6 +226,7 @@
   
 	append_ims_to_list (&im_list, contact, "aim", E_CONTACT_IM_AIM);
 	append_ims_to_list (&im_list, contact, "yahoo", E_CONTACT_IM_YAHOO);
+	append_ims_to_list (&im_list, contact, "gadu-gadu", E_CONTACT_IM_GADU_GADU);
 	append_ims_to_list (&im_list, contact, "icq", E_CONTACT_IM_ICQ);
 	append_ims_to_list (&im_list, contact, "msn", E_CONTACT_IM_MSN);
 	append_ims_to_list (&im_list, contact, "jabber", E_CONTACT_IM_JABBER);
@@ -1968,6 +1976,7 @@
 	fields = g_list_append (fields, g_strdup (e_contact_field_name (E_CONTACT_EMAIL_3)));
 	fields = g_list_append (fields, g_strdup (e_contact_field_name (E_CONTACT_IM_ICQ)));
 	fields = g_list_append (fields, g_strdup (e_contact_field_name (E_CONTACT_IM_YAHOO)));
+	fields = g_list_append (fields, g_strdup (e_contact_field_name (E_CONTACT_IM_GADU_GADU)));
 	fields = g_list_append (fields, g_strdup (e_contact_field_name (E_CONTACT_IM_MSN)));
 	fields = g_list_append (fields, g_strdup (e_contact_field_name (E_CONTACT_IM_JABBER)));
 	fields = g_list_append (fields, g_strdup (e_contact_field_name (E_CONTACT_IM_GROUPWISE)));
diff -urN evolution-data-server.orig/addressbook/libebook/e-contact.c evolution-data-server/addressbook/libebook/e-contact.c
--- evolution-data-server.orig/addressbook/libebook/e-contact.c	2004-06-02 12:31:44.883376432 +0200
+++ evolution-data-server/addressbook/libebook/e-contact.c	2004-06-02 12:41:36.416449736 +0200
@@ -155,6 +155,7 @@
         MULTI_LIST_FIELD (E_CONTACT_IM_GROUPWISE, EVC_X_GROUPWISE, "im_groupwise", N_("Groupwise Id List"),       FALSE),
 	MULTI_LIST_FIELD (E_CONTACT_IM_JABBER, 	  EVC_X_JABBER,    "im_jabber",    N_("Jabber Id List"),          FALSE),
 	MULTI_LIST_FIELD (E_CONTACT_IM_YAHOO,  	  EVC_X_YAHOO,     "im_yahoo",     N_("Yahoo! Screen Name List"), FALSE),
+	MULTI_LIST_FIELD (E_CONTACT_IM_GADU_GADU, EVC_X_GADU_GADU, "im_gadu_gadu", N_("Gadu-Gadu Id List"), FALSE),
 	MULTI_LIST_FIELD (E_CONTACT_IM_MSN,    	  EVC_X_MSN,       "im_msn",       N_("MSN Screen Name List"),    FALSE),
 	MULTI_LIST_FIELD (E_CONTACT_IM_ICQ,    	  EVC_X_ICQ,       "im_icq",       N_("ICQ Id List"),             FALSE),
  
@@ -182,6 +183,12 @@
 	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_YAHOO_WORK_1,  EVC_X_YAHOO,  "im_yahoo_work_1",  N_("Yahoo! Work Screen Name 1"), FALSE, "WORK", 0),
 	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_YAHOO_WORK_2,  EVC_X_YAHOO,  "im_yahoo_work_2",  N_("Yahoo! Work Screen Name 2"), FALSE, "WORK", 1),
 	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_YAHOO_WORK_3,  EVC_X_YAHOO,  "im_yahoo_work_3",  N_("Yahoo! Work Screen Name 3"), FALSE, "WORK", 2),
+	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_GADU_GADU_HOME_1,  EVC_X_GADU_GADU,  "im_gadu_gadu_home_1",  N_("Gadu-Gadu Home Id 1"), FALSE, "HOME", 0),
+	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_GADU_GADU_HOME_2,  EVC_X_GADU_GADU,  "im_gadu_gadu_home_2",  N_("Gadu-Gadu Home Id 2"), FALSE, "HOME", 1),
+	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_GADU_GADU_HOME_3,  EVC_X_GADU_GADU,  "im_gadu_gadu_home_3",  N_("Gadu-Gadu Home Id 3"), FALSE, "HOME", 2),
+	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_GADU_GADU_WORK_1,  EVC_X_GADU_GADU,  "im_gadu_gadu_work_1",  N_("Gadu-Gadu Work Id 1"), FALSE, "WORK", 0),
+	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_GADU_GADU_WORK_2,  EVC_X_GADU_GADU,  "im_gadu_gadu_work_2",  N_("Gadu-Gadu Work Id 2"), FALSE, "WORK", 1),
+	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_GADU_GADU_WORK_3,  EVC_X_GADU_GADU,  "im_gadu_gadu_work_3",  N_("Gadu-Gadu Work Id 3"), FALSE, "WORK", 2),
 	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_MSN_HOME_1,    EVC_X_MSN,    "im_msn_home_1",    N_("MSN Home Screen Name 1"),    FALSE, "HOME", 0),
 	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_MSN_HOME_2,    EVC_X_MSN,    "im_msn_home_2",    N_("MSN Home Screen Name 2"),    FALSE, "HOME", 1),
 	ATTR_TYPE_STR_FIELD (E_CONTACT_IM_MSN_HOME_3,    EVC_X_MSN,    "im_msn_home_3",    N_("MSN Home Screen Name 3"),    FALSE, "HOME", 2),
diff -urN evolution-data-server.orig/addressbook/libebook/e-contact.h evolution-data-server/addressbook/libebook/e-contact.h
--- evolution-data-server.orig/addressbook/libebook/e-contact.h	2004-06-02 12:31:44.883376432 +0200
+++ evolution-data-server/addressbook/libebook/e-contact.h	2004-06-02 12:44:07.738445296 +0200
@@ -128,6 +128,12 @@
 	E_CONTACT_IM_YAHOO_WORK_1,     /* Synthetic string field */
 	E_CONTACT_IM_YAHOO_WORK_2,     /* Synthetic string field */
 	E_CONTACT_IM_YAHOO_WORK_3,     /* Synthetic string field */
+	E_CONTACT_IM_GADU_GADU_HOME_1, /* Synthetic string field */
+	E_CONTACT_IM_GADU_GADU_HOME_2, /* Synthetic string field */
+	E_CONTACT_IM_GADU_GADU_HOME_3, /* Synthetic string field */
+	E_CONTACT_IM_GADU_GADU_WORK_1, /* Synthetic string field */
+	E_CONTACT_IM_GADU_GADU_WORK_2, /* Synthetic string field */
+	E_CONTACT_IM_GADU_GADU_WORK_3, /* Synthetic string field */
 	E_CONTACT_IM_MSN_HOME_1,       /* Synthetic string field */
 	E_CONTACT_IM_MSN_HOME_2,       /* Synthetic string field */
 	E_CONTACT_IM_MSN_HOME_3,       /* Synthetic string field */
@@ -166,6 +172,7 @@
 	E_CONTACT_IM_GROUPWISE,  /* Multi-valued */
 	E_CONTACT_IM_JABBER,  	 /* Multi-valued */
 	E_CONTACT_IM_YAHOO,   	 /* Multi-valued */
+	E_CONTACT_IM_GADU_GADU,  /* Multi-valued */
 	E_CONTACT_IM_MSN,     	 /* Multi-valued */
 	E_CONTACT_IM_ICQ,     	 /* Multi-valued */
        
diff -urN evolution-data-server.orig/addressbook/libebook/e-vcard.h evolution-data-server/addressbook/libebook/e-vcard.h
--- evolution-data-server.orig/addressbook/libebook/e-vcard.h	2004-06-02 12:31:45.544275960 +0200
+++ evolution-data-server/addressbook/libebook/e-vcard.h	2004-06-02 12:45:00.322451312 +0200
@@ -85,6 +85,7 @@
 #define EVC_X_VIDEO_URL     	"X-EVOLUTION-VIDEO-URL"
 #define EVC_X_WANTS_HTML    	"X-MOZILLA-HTML"
 #define EVC_X_YAHOO         	"X-YAHOO"
+#define EVC_X_GADU_GADU         "X-GADU-GADU"
 #define EVC_X_GROUPWISE     	"X-GROUPWISE"
 
 typedef enum {
diff -urN evolution-data-server.orig/addressbook/libedata-book/e-book-backend-sexp.c evolution-data-server/addressbook/libedata-book/e-book-backend-sexp.c
--- evolution-data-server.orig/addressbook/libedata-book/e-book-backend-sexp.c	2004-06-02 12:31:45.546275656 +0200
+++ evolution-data-server/addressbook/libedata-book/e-book-backend-sexp.c	2004-06-02 12:34:22.944347512 +0200
@@ -89,6 +89,13 @@
 }
 
 static gboolean
+compare_im_gadu_gadu (EContact *contact, const char *str,
+		  char *(*compare)(const char*, const char*))
+{
+	return compare_im (contact, str, compare, E_CONTACT_IM_GADU_GADU);
+}
+
+static gboolean
 compare_im_jabber (EContact *contact, const char *str,
 		   char *(*compare)(const char*, const char*))
 {
@@ -221,6 +228,7 @@
 	LIST_PROP ( "im_icq",    compare_im_icq ),
 	LIST_PROP ( "im_jabber", compare_im_jabber ),
 	LIST_PROP ( "im_yahoo",  compare_im_yahoo ),
+	LIST_PROP ( "im_gadu_gadu",  compare_im_gadu_gadu ),
 	LIST_PROP ( "email",     compare_email ),
 	LIST_PROP ( "phone",     compare_phone ),
 	LIST_PROP ( "address",   compare_address ),
diff -urN evolution.orig/addressbook/gui/contact-editor/e-contact-editor.c evolution/addressbook/gui/contact-editor/e-contact-editor.c
--- evolution.orig/addressbook/gui/contact-editor/e-contact-editor.c	2004-06-02 12:02:59.915611392 +0200
+++ evolution/addressbook/gui/contact-editor/e-contact-editor.c	2004-06-02 12:11:13.388592096 +0200
@@ -178,6 +178,7 @@
 	{ E_CONTACT_IM_AIM,       N_ ("AIM")       },
 	{ E_CONTACT_IM_JABBER,    N_ ("Jabber")    },
 	{ E_CONTACT_IM_YAHOO,     N_ ("Yahoo")     },
+	{ E_CONTACT_IM_GADU_GADU, N_ ("Gadu-Gadu") },
 	{ E_CONTACT_IM_MSN,       N_ ("MSN")       },
 	{ E_CONTACT_IM_ICQ,       N_ ("ICQ")       },
 	{ E_CONTACT_IM_GROUPWISE, N_ ("GroupWise") }
diff -urN evolution.orig/addressbook/gui/contact-editor/e-contact-editor-im.c evolution/addressbook/gui/contact-editor/e-contact-editor-im.c
--- evolution.orig/addressbook/gui/contact-editor/e-contact-editor-im.c	2004-06-02 12:02:59.890615192 +0200
+++ evolution/addressbook/gui/contact-editor/e-contact-editor-im.c	2004-06-02 12:10:24.371043896 +0200
@@ -63,6 +63,7 @@
         N_("Novell Groupwise"),
 	N_("Jabber"),
 	N_("Yahoo Messenger"),
+	N_("Gadu-Gadu Messenger"),
 	N_("MSN Messenger"),
 	N_("ICQ")
 };
@@ -72,6 +73,7 @@
 	"im-nov",
 	"im-jabber",
 	"im-yahoo",
+	"im-gadu-gadu",
 	"im-msn",
 	"im-icq"
 };
diff -urN evolution.orig/addressbook/gui/widgets/eab-contact-display.c evolution/addressbook/gui/widgets/eab-contact-display.c
--- evolution.orig/addressbook/gui/widgets/eab-contact-display.c	2004-06-02 12:03:00.574511224 +0200
+++ evolution/addressbook/gui/widgets/eab-contact-display.c	2004-06-02 12:09:01.088704736 +0200
@@ -55,6 +55,7 @@
 #define JABBER_ICON       "im-jabber"
 #define MSN_ICON          "im-msn"
 #define YAHOO_ICON        "im-yahoo"
+#define GADU_GADU_ICON	   "im-gadu-gadu"
 #define VIDEOCONF_ICON    "stock_video-conferencing"
 
 #define MAX_COMPACT_IMAGE_DIMENSION 48
@@ -337,6 +338,7 @@
 	accum_attribute (accum, contact, _("Jabber"), E_CONTACT_IM_JABBER_WORK_1, JABBER_ICON, 0);
 	accum_attribute (accum, contact, _("MSN"), E_CONTACT_IM_MSN_WORK_1, MSN_ICON, 0);
 	accum_attribute (accum, contact, _("Yahoo"), E_CONTACT_IM_YAHOO_WORK_1, YAHOO_ICON, 0);
+	accum_attribute (accum, contact, _("Gadu-Gadu"), E_CONTACT_IM_GADU_GADU_WORK_1, GADU_GADU_ICON, 0);
 	accum_attribute (accum, contact, _("Video Conferencing"), E_CONTACT_VIDEO_URL, VIDEOCONF_ICON, E_TEXT_TO_HTML_CONVERT_URLS);
 	accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_BUSINESS, NULL, 0);
 	accum_attribute (accum, contact, _("Fax"), E_CONTACT_PHONE_BUSINESS_FAX, NULL, 0);
@@ -356,6 +358,7 @@
 	accum_attribute (accum, contact, _("Jabber"), E_CONTACT_IM_JABBER_HOME_1, JABBER_ICON, 0);
 	accum_attribute (accum, contact, _("MSN"), E_CONTACT_IM_MSN_HOME_1, MSN_ICON, 0);
 	accum_attribute (accum, contact, _("Yahoo"), E_CONTACT_IM_YAHOO_HOME_1, YAHOO_ICON, 0);
+	accum_attribute (accum, contact, _("Gadu-Gadu"), E_CONTACT_IM_GADU_GADU_HOME_1, GADU_GADU_ICON, 0);
 	accum_attribute (accum, contact, _("WWW"), E_CONTACT_HOMEPAGE_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS);
 	accum_attribute (accum, contact, _("Blog"), E_CONTACT_BLOG_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS);
 


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