changeset 9999:5d9c991549cd

[gaim-migrate @ 10913] Cleanup on isle 7 committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 09 Sep 2004 22:06:06 +0000
parents 887ade3fabf0
children 3a701f15e45d
files plugins/perl/common/BuddyList_Buddy.xs src/internal.h src/prpl.h src/roomlist.h
diffstat 4 files changed, 55 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/perl/common/BuddyList_Buddy.xs	Thu Sep 09 12:07:33 2004 +0000
+++ b/plugins/perl/common/BuddyList_Buddy.xs	Thu Sep 09 22:06:06 2004 +0000
@@ -21,20 +21,6 @@
 	gaim_blist_update_buddy_presence(buddy, presence);
 
 void
-set_idle_time(buddy, idle)
-	Gaim::BuddyList::Buddy buddy
-	int idle
-CODE:
-	gaim_blist_update_buddy_idle(buddy, idle);
-
-void
-set_warning_percent(buddy, warning)
-	Gaim::BuddyList::Buddy buddy
-	int warning
-CODE:
-	gaim_blist_update_buddy_evil(buddy, warning);
-
-void
 rename(buddy, new_name)
 	Gaim::BuddyList::Buddy buddy
 	const char *new_name
--- a/src/internal.h	Thu Sep 09 12:07:33 2004 +0000
+++ b/src/internal.h	Thu Sep 09 22:06:06 2004 +0000
@@ -29,6 +29,17 @@
 # include <config.h>
 #endif
 
+/*
+ * If we're using NLS, make sure gettext works.  If not, then define
+ * dummy macros in place of the normal gettext macros.
+ *
+ * Also, the perl XS config.h file sometimes defines _  So we need to
+ * make sure _ isn't already defined before trying to define it.
+ *
+ * The Singular/Plural/Number ngettext dummy definition below was
+ * taken from an email to the texinfo mailing list by Manuel Guerrero.
+ * Thank you Manuel, and thank you Alex's good friend Google.
+ */
 #ifdef ENABLE_NLS
 #  include <locale.h>
 #  include <libintl.h>
@@ -41,14 +52,11 @@
 #else
 #  include <locale.h>
 #  define N_(String) (String)
-#  define _(x) (x)
+#  ifndef _
+#    define _(x) (x)
+#  endif
 #  define ngettext(Singular, Plural, Number) ((Number == 1) ? (Singular) : (Plural))
 #endif
-/*
- * The Singular/Plural/Number ngettext definition above was taken
- * from an email to the texinfo mailing list by Manuel Guerrero.
- * Thank you Manuel, and thank you Alex's good friend Google.
- */
 
 #ifdef HAVE_ENDIAN_H
 # include <endian.h>
--- a/src/prpl.h	Thu Sep 09 12:07:33 2004 +0000
+++ b/src/prpl.h	Thu Sep 09 22:06:06 2004 +0000
@@ -34,18 +34,6 @@
 /**************************************************************************/
 /** @name Basic Protocol Information                                      */
 /**************************************************************************/
-/*@{*/
-
-/** Default protocol plugin description */
-#define GAIM_PRPL_DESC(x) \
-		"Allows gaim to use the " (x) " protocol.\n\n"      \
-		"Now that you have loaded this protocol, use the "  \
-		"Account Editor to add an account that uses this "  \
-		"protocol. You can access the Account Editor from " \
-		"the \"Accounts\" button on the login window or "   \
-		"in the \"Tools\" menu in the buddy list window."
-
-/*@}*/
 
 /**
  * Flags applicable to outgoing/incoming IMs from prpls.
@@ -85,12 +73,16 @@
 	GaimIconScaleRules scale_rules;		/**< How to stretch this icon */
 } GaimBuddyIconSpec;
 
-/* This #define exists just to make it easier to fill out the buddy icon field in he prpl info struct for protocols that couldn't care less. */
+/**
+ * This #define exists just to make it easier to fill out the buddy icon
+ * field in the prpl info struct for protocols that couldn't care less.
+ */
 #define NO_BUDDY_ICONS {NULL, 0, 0, 0, 0, 0}
 
 #include "blist.h"
 #include "proxy.h"
 #include "plugin.h"
+#include "roomlist.h"
 #include "status.h"
 
 struct proto_chat_entry {
@@ -128,8 +120,8 @@
 	/**
 	 * Don't require passwords for sign-in.
 	 *
-	 * Zephyr doesn't require passwords, so there's no need for
-	 * a password prompt.
+	 * Zephyr doesn't require passwords, so there's no
+	 * need for a password prompt.
 	 */
 	OPT_PROTO_NO_PASSWORD = 0x00000010,
 
@@ -141,21 +133,11 @@
 	OPT_PROTO_MAIL_CHECK = 0x00000020,
 
 	/**
-	 * Buddy icon support.
-	 *
-	 * Oscar and Jabber have buddy icons.
-	 *
-	 * *We'll do this a bit more sophisticated like, now.
-	 *
-	 * OPT_PROTO_BUDDY_ICON = 0x00000040,
-	 */
-
-	/**
 	 * Images in IMs.
 	 *
 	 * Oscar lets you send images in direct IMs.
 	 */
-	OPT_PROTO_IM_IMAGE = 0x00000080,
+	OPT_PROTO_IM_IMAGE = 0x00000040,
 
 	/**
 	 * Allow passwords to be optional.
@@ -163,21 +145,17 @@
 	 * Passwords in IRC are optional, and are needed for certain
 	 * functionality.
 	 */
-	OPT_PROTO_PASSWORD_OPTIONAL = 0x00000100,
+	OPT_PROTO_PASSWORD_OPTIONAL = 0x00000080,
 
 	/**
 	 * Allows font size to be specified in sane point size
 	 *
 	 * Probably just Jabber and Y!M
 	 */
-	OPT_PROTO_USE_POINTSIZE = 0x00000200
+	OPT_PROTO_USE_POINTSIZE = 0x00000100
 
 } GaimProtocolOptions;
 
-/** Some structs defined in roomlist.h */
-struct _GaimRoomlist;
-struct _GaimRoomlistRoom;
-
 /**
  * A protocol plugin information structure.
  *
@@ -294,9 +272,9 @@
 	GaimChat *(*find_blist_chat)(GaimAccount *account, const char *name);
 
 	/* room listing prpl callbacks */
-	struct _GaimRoomlist *(*roomlist_get_list)(GaimConnection *gc);
-	void (*roomlist_cancel)(struct _GaimRoomlist *list);
-	void (*roomlist_expand_category)(struct _GaimRoomlist *list, struct _GaimRoomlistRoom *category);
+	GaimRoomlist *(*roomlist_get_list)(GaimConnection *gc);
+	void (*roomlist_cancel)(GaimRoomlist *list);
+	void (*roomlist_expand_category)(GaimRoomlist *list, GaimRoomlistRoom *category);
 
 	/* file transfer callbacks */
 	gboolean (*can_receive_file)(GaimConnection *, const char *who);
--- a/src/roomlist.h	Thu Sep 09 12:07:33 2004 +0000
+++ b/src/roomlist.h	Thu Sep 09 22:06:06 2004 +0000
@@ -26,22 +26,41 @@
 #ifndef _GAIM_ROOMLIST_H_
 #define _GAIM_ROOMLIST_H_
 
+typedef struct _GaimRoomlist GaimRoomlist;
+typedef struct _GaimRoomlistRoom GaimRoomlistRoom;
+typedef struct _GaimRoomlistField GaimRoomlistField;
+typedef struct _GaimRoomlistUiOps GaimRoomlistUiOps;
 
-#include <glib/glist.h>
+/**
+ * The types of rooms.
+ *
+ * These are ORable flags.
+ */
+typedef enum
+{
+	GAIM_ROOMLIST_ROOMTYPE_CATEGORY = 0x01, /**< It's a category, but not a room you can join. */
+	GAIM_ROOMLIST_ROOMTYPE_ROOM = 0x02      /**< It's a room, like the kind you can join. */
+
+} GaimRoomlistRoomType;
+
+/**
+ * The types of fields.
+ */
+typedef enum
+{
+	GAIM_ROOMLIST_FIELD_BOOL,
+	GAIM_ROOMLIST_FIELD_INT,
+	GAIM_ROOMLIST_FIELD_STRING /**< We do a g_strdup on the passed value if it's this type. */
+
+} GaimRoomlistFieldType;
+
 #include "account.h"
-
+#include "internal.h"
 
 /**************************************************************************/
 /** Data Structures                                                       */
 /**************************************************************************/
 
-typedef struct _GaimRoomlist GaimRoomlist;
-typedef struct _GaimRoomlistRoom GaimRoomlistRoom;
-typedef enum _GaimRoomlistRoomType GaimRoomlistRoomType;
-typedef struct _GaimRoomlistField GaimRoomlistField;
-typedef enum _GaimRoomlistFieldType GaimRoomlistFieldType;
-typedef struct _GaimRoomlistUiOps GaimRoomlistUiOps;
-
 /**
  * Represents a list of rooms for a given connection on a given protocol.
  */
@@ -56,16 +75,6 @@
 };
 
 /**
- * The types of rooms.
- *
- * These are ORable flags.
- */
-enum _GaimRoomlistRoomType {
-	GAIM_ROOMLIST_ROOMTYPE_CATEGORY = 0x01, /**< It's a category, but not a room you can join. */
-	GAIM_ROOMLIST_ROOMTYPE_ROOM = 0x02,     /**< It's a room, like the kind you can join. */
-};
-
-/**
  * Represents a room.
  */
 struct _GaimRoomlistRoom {
@@ -77,15 +86,6 @@
 };
 
 /**
- * The types of fields.
- */
-enum _GaimRoomlistFieldType {
-	GAIM_ROOMLIST_FIELD_BOOL,
-	GAIM_ROOMLIST_FIELD_INT,
-	GAIM_ROOMLIST_FIELD_STRING, /**< We do a g_strdup on the passed value if it's this type. */
-};
-
-/**
  * A field a room might have.
  */
 struct _GaimRoomlistField {