Commit c0964cbf authored by cypherpunk's avatar cypherpunk
Browse files

	* Makefile.am:
	* configure.ac:
	* dialogs.c:
	* dialogs.h:
	* gtk-dialog.c:
	* gtk-dialog.h:
	* gtk-ui.c:
	* gtk-ui.h:
	* otr-plugin.c:
	* otr-plugin.h:
	* ui.c:
	* ui.h: Porting to Pidgin 2.0.0 thanks to Reza Jelveh
	<reza.jelveh@tuhh.de>.

	* packaging/windows/gaim-otr.nsi:
	* Makefile.mingw: Porting the Windows version to Pidgin 2.0.0.
parent 4fcc4317
Off-the-Record Messaging plugin for gaim
Off-the-Record Messaging plugin for pidgin
Authors:
......
2007-05-06
* Makefile.am:
* configure.ac:
* dialogs.c:
* dialogs.h:
* gtk-dialog.c:
* gtk-dialog.h:
* gtk-ui.c:
* gtk-ui.h:
* otr-plugin.c:
* otr-plugin.h:
* ui.c:
* ui.h: Porting to Pidgin 2.0.0 thanks to Reza Jelveh
<reza.jelveh@tuhh.de>.
* packaging/windows/gaim-otr.nsi:
* Makefile.mingw: Porting the Windows version to Pidgin 2.0.0.
2006-11-28
* Makefile.mingw: Build under newer mingw cross-compilation
......
AM_CFLAGS= @LIBGCRYPT_CFLAGS@ @LIBOTR_CFLAGS@ @EXTRA_CFLAGS@
AM_CFLAGS+= -DUSING_GTK -DGAIM_PLUGINS \
-DGAIM_OTR_VERSION=\"@VERSION@\"
AM_CFLAGS+= -DUSING_GTK -DPURPLE_PLUGINS \
-DPIDGIN_OTR_VERSION=\"@VERSION@\"
plugindir= ${libdir}/gaim
plugindir= ${libdir}/pidgin
plugin_LTLIBRARIES= gaim-otr.la
plugin_LTLIBRARIES= pidgin-otr.la
gaim_otr_la_SOURCES= otr-plugin.c ui.c dialogs.c gtk-ui.c gtk-dialog.c
gaim_otr_la_LDFLAGS= -module -avoid-version
gaim_otr_la_LDFLAGS+= @LIBGCRYPT_LIBS@ @LIBOTR_LIBS@
pidgin_otr_la_SOURCES= otr-plugin.c ui.c dialogs.c gtk-ui.c gtk-dialog.c
pidgin_otr_la_LDFLAGS= -module -avoid-version
pidgin_otr_la_LDFLAGS+= @LIBGCRYPT_LIBS@ @LIBOTR_LIBS@
EXTRA_DIST= dialogs.h gtk-dialog.h gtk-ui.h otr-plugin.h ui.h \
Makefile.mingw packaging
WIN32=1
# The version number to put in the plugin info
GAIM_OTR_VERSION = 3.0.0
PIDGIN_OTR_VERSION = 3.0.0
# Replace this with the path to the GAIM headers
GAIM_SOURCE ?= /usr/i586-mingw32msvc/include/gaim
# Replace this with the path to the pidgin and purple headers
PIDGIN_HEADERS ?= /usr/i586-mingw32msvc/include/pidgin
PURPLE_HEADERS ?= /usr/i586-mingw32msvc/include/libpurple
# If you don't have pkg-config, put the appropriate -I entry on the next line
GTK_HDRS ?= `pkg-config --cflags glib-2.0 gtk+-2.0`
......@@ -18,16 +19,16 @@ LIBOTRINCDIR = /usr/include
LIBOTRLIBDIR = /usr/lib
# The target
TARGET = gaim-otr.so
TARGET = pidgin-otr.so
ifdef WIN32
CC = i586-mingw32msvc-gcc
LIBOTRINCDIR = /usr/i586-mingw32msvc/include
LIBOTRLIBDIR = /usr/i586-mingw32msvc/lib
TARGET = gaim-otr.dll
TARGET = pidgin-otr.dll
LDFLAGS = -Wl,--enable-auto-image-base
LDLIBS = $(LIBOTRLIBDIR)/libotr.a -lgtk-win32-2.0 -lglib-2.0 -lgdk_pixbuf-2.0 \
-lgobject-2.0 -lgaim -lgtkgaim -lgcrypt -lgpg-error
-lgobject-2.0 -lpidgin -llibpurple -lgcrypt -lgpg-error
else
FPIC = -fPIC
LDFLAGS = -module -avoid-version
......@@ -35,13 +36,13 @@ LDLIBS = -lotr -lgcrypt
endif
# Install directory
GAIMDIR = /usr/lib/gaim
INSTALLDIR = $(DESTDIR)$(GAIMDIR)
PIDGINDIR = /usr/lib/pidgin
INSTALLDIR = $(DESTDIR)$(PIDGINDIR)
CC ?= gcc
override CFLAGS += -g -Wall -I$(GAIM_SOURCE) $(GTK_HDRS) \
-I$(LIBOTRINCDIR) $(FPIC) -DUSING_GTK -DGAIM_PLUGINS \
-DGAIM_OTR_VERSION=\"$(GAIM_OTR_VERSION)\"
override CFLAGS += -g -Wall -I$(PIDGIN_HEADERS) -I$(PURPLE_HEADERS) \
$(GTK_HDRS) -I$(LIBOTRINCDIR) $(FPIC) -DUSING_GTK -DPURPLE_PLUGINS \
-DPIDGIN_OTR_VERSION=\"$(PIDGIN_OTR_VERSION)\" -DPIDGIN_NAME=\"Pidgin\"
all: $(TARGET)
......
06 May 2007:
- Ported to Pidgin 2.0.0
02 Nov 2005:
- Released 3.0.0
......
Off-the-Record Messaging plugin for GAIM
v3.0.0, 2 Nov 2005
Off-the-Record Messaging plugin for pidgin
v3.0.0, 6 May 2007
This is a gaim plugin which implements Off-the-Record (OTR) Messaging.
This is a pidgin plugin which implements Off-the-Record (OTR) Messaging.
It is known to work (at least) under the Linux and Windows versions of
gaim (1.x).
pidgin (2.0).
OTR allows you to have private conversations over IM by providing:
- Encryption
......@@ -25,13 +25,11 @@ http://www.cypherpunks.ca/otr/
USAGE
Run gaim, and open the Preferences panel. (If you had a copy of gaim
running before you installed gaim-otr, you will need to restart it.)
Choose "Plugins". Find the Off-the-Record Messaging plugin, and enable
it by selecting the "Load" box next to it. This will cause
"Off-the-Record Messaging" to appear under "Plugins" in the list at the
left. Click "Off-the-Record Messaging" to bring up the OTR UI. The UI
has two "pages": "Known fingerprints" and "Config".
Run pidgin, and open the Plugins panel. (If you had a copy of pidgin
running before you installed pidgin-otr, you will need to restart it.)
Find the Off-the-Record Messaging plugin, and enable it by selecting the
checkbox next to it. Click "Configure Plugin" to bring up the OTR UI.
The UI has two "pages": "Known fingerprints" and "Config".
The "Config" page allows you generate private keys, and to set OTR
options.
......@@ -143,7 +141,7 @@ Verify fingerprint
Once you do this, the label on the OTR button will change to "OTR:
Private". Note that you only need to do this once per buddy (or
once per fingerprint, if your buddy has more than one fingerprint).
gaim-otr will remember which fingerprints you have marked as
pidgin-otr will remember which fingerprints you have marked as
verified.
View secure session id
......@@ -220,10 +218,10 @@ otr-dev:
LICENSE
The Off-the-Record Messaging plugin for gaim is covered by the following
The Off-the-Record Messaging plugin for pidgin is covered by the following
(GPL) license:
Off-the-Record Messaging plugin for gaim
Off-the-Record Messaging plugin for pidgin
Copyright (C) 2004-2005 Nikita Borisov and Ian Goldberg
<otr@cypherpunks.ca>
......
......@@ -7,7 +7,7 @@ AC_INIT(otr-plugin.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gaim-otr, 3.0.0)
AM_INIT_AUTOMAKE(pidgin-otr, 3.0.0)
AC_PROG_CC
......@@ -19,6 +19,6 @@ AM_PATH_LIBGCRYPT(1:1.2.0,,AC_MSG_ERROR(libgcrypt 1.2.0 or newer is required.))
AM_PATH_LIBOTR(3.0.0,,AC_MSG_ERROR(libotr 3.0.0 or newer is required.))
PKG_CHECK_MODULES(EXTRA, glib-2.0 >= 2.4 gtk+-2.0 >= 2.4 gaim >= 1.0, , AC_MSG_ERROR(glib, gtk and gaim required))
PKG_CHECK_MODULES(EXTRA, glib-2.0 >= 2.4 gtk+-2.0 >= 2.4 pidgin >= 2.0, , AC_MSG_ERROR(glib, gtk and pidgin required))
AC_OUTPUT([Makefile])
/*
* Off-the-Record Messaging plugin for gaim
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2005 Nikita Borisov and Ian Goldberg
* <otr@cypherpunks.ca>
*
......@@ -24,14 +24,14 @@
/* system headers */
#include <stdlib.h>
/* gaim headers */
/* pidgin headers */
#include "notify.h"
/* libotr headers */
#include <libotr/proto.h>
#include <libotr/message.h>
/* gaim-otr headers */
/* pidgin-otr headers */
#include "dialogs.h"
#include "otr-plugin.h"
......@@ -49,10 +49,10 @@ const OtrgDialogUiOps *otrg_dialog_get_ui_ops(void)
return ui_ops;
}
/* This is just like gaim_notify_message, except: (a) it doesn't grab
/* This is just like pidgin_notify_message, except: (a) it doesn't grab
* keyboard focus, (b) the button is "OK" instead of "Close", and (c)
* the labels aren't limited to 2K. */
void otrg_dialog_notify_message(GaimNotifyMsgType type,
void otrg_dialog_notify_message(PurpleNotifyMsgType type,
const char *accountname, const char *protocol, const char *username,
const char *title, const char *primary, const char *secondary)
{
......@@ -65,7 +65,7 @@ void otrg_dialog_notify_error(const char *accountname, const char *protocol,
const char *username, const char *title, const char *primary,
const char *secondary)
{
otrg_dialog_notify_message(GAIM_NOTIFY_MSG_ERROR, accountname,
otrg_dialog_notify_message(PURPLE_NOTIFY_MSG_ERROR, accountname,
protocol, username, title, primary, secondary);
}
......@@ -74,7 +74,7 @@ void otrg_dialog_notify_warning(const char *accountname, const char *protocol,
const char *username, const char *title, const char *primary,
const char *secondary)
{
otrg_dialog_notify_message(GAIM_NOTIFY_MSG_WARNING, accountname,
otrg_dialog_notify_message(PURPLE_NOTIFY_MSG_WARNING, accountname,
protocol, username, title, primary, secondary);
}
......@@ -83,7 +83,7 @@ void otrg_dialog_notify_info(const char *accountname, const char *protocol,
const char *username, const char *title, const char *primary,
const char *secondary)
{
otrg_dialog_notify_message(GAIM_NOTIFY_MSG_INFO, accountname,
otrg_dialog_notify_message(PURPLE_NOTIFY_MSG_INFO, accountname,
protocol, username, title, primary, secondary);
}
......@@ -160,13 +160,13 @@ void otrg_dialog_resensitize_all(void)
}
/* Set up the per-conversation information display */
void otrg_dialog_new_conv(GaimConversation *conv)
void otrg_dialog_new_conv(PurpleConversation *conv)
{
ui_ops->new_conv(conv);
}
/* Remove the per-conversation information display */
void otrg_dialog_remove_conv(GaimConversation *conv)
void otrg_dialog_remove_conv(PurpleConversation *conv)
{
ui_ops->remove_conv(conv);
}
/*
* Off-the-Record Messaging plugin for gaim
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2005 Nikita Borisov and Ian Goldberg
* <otr@cypherpunks.ca>
*
......@@ -20,7 +20,7 @@
#ifndef __OTRG_DIALOGS_H__
#define __OTRG_DIALOGS_H__
/* gaim headers */
/* pidgin headers */
#include "notify.h"
/* libotr headers */
......@@ -37,7 +37,7 @@
typedef struct s_OtrgDialogWait *OtrgDialogWaitHandle;
typedef struct {
void (*notify_message)(GaimNotifyMsgType type,
void (*notify_message)(PurpleNotifyMsgType type,
const char *accountname, const char *protocol, const char *username,
const char *title, const char *primary, const char *secondary);
......@@ -65,9 +65,9 @@ typedef struct {
void (*resensitize_all)(void);
void (*new_conv)(GaimConversation *conv);
void (*new_conv)(PurpleConversation *conv);
void (*remove_conv)(GaimConversation *conv);
void (*remove_conv)(PurpleConversation *conv);
} OtrgDialogUiOps;
/* Set the UI ops */
......@@ -76,10 +76,10 @@ void otrg_dialog_set_ui_ops(const OtrgDialogUiOps *ops);
/* Get the UI ops */
const OtrgDialogUiOps *otrg_dialog_get_ui_ops(void);
/* This is just like gaim_notify_message, except: (a) it doesn't grab
/* This is just like pidgin_notify_message, except: (a) it doesn't grab
* keyboard focus, (b) the button is "OK" instead of "Close", and (c)
* the labels aren't limited to 2K. */
void otrg_dialog_notify_message(GaimNotifyMsgType type,
void otrg_dialog_notify_message(PurpleNotifyMsgType type,
const char *accountname, const char *protocol, const char *username,
const char *title, const char *primary, const char *secondary);
......@@ -141,9 +141,9 @@ void otrg_dialog_finished(const char *accountname, const char *protocol,
void otrg_dialog_resensitize_all(void);
/* Set up the per-conversation information display */
void otrg_dialog_new_conv(GaimConversation *conv);
void otrg_dialog_new_conv(PurpleConversation *conv);
/* Remove the per-conversation information display */
void otrg_dialog_remove_conv(GaimConversation *conv);
void otrg_dialog_remove_conv(PurpleConversation *conv);
#endif
This diff is collapsed.
/*
* Off-the-Record Messaging plugin for gaim
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2005 Nikita Borisov and Ian Goldberg
* <otr@cypherpunks.ca>
*
......
/*
* Off-the-Record Messaging plugin for gaim
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2005 Nikita Borisov and Ian Goldberg
* <otr@cypherpunks.ca>
*
......@@ -26,13 +26,13 @@
/* libotr headers */
#include <libotr/privkey.h>
/* gaim headers */
/* purple headers */
#include "util.h"
#include "account.h"
#include "notify.h"
#include "gtkutils.h"
/* gaim-otr headers */
/* purple-otr headers */
#include "dialogs.h"
#include "ui.h"
#include "otr-plugin.h"
......@@ -65,7 +65,7 @@ static const gchar *trust_states[] = {
"Finished"
};
static void account_menu_changed_cb(GtkWidget *item, GaimAccount *account,
static void account_menu_changed_cb(GtkWidget *item, PurpleAccount *account,
void *data)
{
const char *accountname;
......@@ -76,8 +76,8 @@ static void account_menu_changed_cb(GtkWidget *item, GaimAccount *account,
if (account) {
char fingerprint_buf[45];
accountname = gaim_account_get_username(account);
protocol = gaim_account_get_protocol_id(account);
accountname = purple_account_get_username(account);
protocol = purple_account_get_protocol_id(account);
fingerprint = otrl_privkey_fingerprint(otrg_plugin_userstate,
fingerprint_buf, accountname, protocol);
......@@ -111,7 +111,7 @@ static GtkWidget *accountmenu_get_selected_item(void)
return gtk_menu_get_active(GTK_MENU(menu));
}
static GaimAccount *item_get_account(GtkWidget *item)
static PurpleAccount *item_get_account(GtkWidget *item)
{
if (!item) return NULL;
return g_object_get_data(G_OBJECT(item), "account");
......@@ -122,7 +122,7 @@ static GaimAccount *item_get_account(GtkWidget *item)
static void otrg_gtk_ui_update_fingerprint(void)
{
GtkWidget *item;
GaimAccount *account;
PurpleAccount *account;
gpointer user_data;
item = accountmenu_get_selected_item();
......@@ -136,7 +136,7 @@ static void otrg_gtk_ui_update_fingerprint(void)
account_menu_changed_cb(item, account, user_data);
}
static void account_menu_added_removed_cb(GaimAccount *account, void *data)
static void account_menu_added_removed_cb(PurpleAccount *account, void *data)
{
otrg_gtk_ui_update_fingerprint();
}
......@@ -170,7 +170,7 @@ static void otrg_gtk_ui_update_keylist(void)
for (context = otrg_plugin_userstate->context_root; context != NULL;
context = context->next) {
int i;
GaimPlugin *p;
PurplePlugin *p;
char *proto_name;
fingerprint = context->fingerprint_root.next;
/* If there's no fingerprint, don't add it to the known
......@@ -188,7 +188,7 @@ static void otrg_gtk_ui_update_keylist(void)
"Yes" : "No";
otrl_privkey_hash_to_human(hash, fingerprint->fingerprint);
titles[3] = hash;
p = gaim_find_prpl(context->protocol);
p = purple_find_prpl(context->protocol);
proto_name = (p && p->info->name) ? p->info->name : "Unknown";
titles[4] = g_strdup_printf("%s (%s)", context->accountname,
proto_name);
......@@ -216,13 +216,13 @@ static void otrg_gtk_ui_update_keylist(void)
static void generate(GtkWidget *widget, gpointer data)
{
GaimAccount *account;
PurpleAccount *account;
account = item_get_account(accountmenu_get_selected_item());
if (account == NULL) return;
otrg_plugin_create_privkey(gaim_account_get_username(account),
gaim_account_get_protocol_id(account));
otrg_plugin_create_privkey(purple_account_get_username(account),
purple_account_get_protocol_id(account));
}
static void ui_destroyed(GtkObject *object)
......@@ -445,10 +445,10 @@ static void create_otroption_buttons(struct otroptionsdata *oo,
static void otrg_gtk_ui_global_prefs_load(gboolean *enabledp,
gboolean *automaticp, gboolean *onlyprivatep)
{
if (gaim_prefs_exists("/OTR/enabled")) {
*enabledp = gaim_prefs_get_bool("/OTR/enabled");
*automaticp = gaim_prefs_get_bool("/OTR/automatic");
*onlyprivatep = gaim_prefs_get_bool("/OTR/onlyprivate");
if (purple_prefs_exists("/OTR/enabled")) {
*enabledp = purple_prefs_get_bool("/OTR/enabled");
*automaticp = purple_prefs_get_bool("/OTR/automatic");
*onlyprivatep = purple_prefs_get_bool("/OTR/onlyprivate");
} else {
*enabledp = TRUE;
*automaticp = TRUE;
......@@ -460,43 +460,43 @@ static void otrg_gtk_ui_global_prefs_load(gboolean *enabledp,
static void otrg_gtk_ui_global_prefs_save(gboolean enabled,
gboolean automatic, gboolean onlyprivate)
{
if (! gaim_prefs_exists("/OTR")) {
gaim_prefs_add_none("/OTR");
if (! purple_prefs_exists("/OTR")) {
purple_prefs_add_none("/OTR");
}
gaim_prefs_set_bool("/OTR/enabled", enabled);
gaim_prefs_set_bool("/OTR/automatic", automatic);
gaim_prefs_set_bool("/OTR/onlyprivate", onlyprivate);
purple_prefs_set_bool("/OTR/enabled", enabled);
purple_prefs_set_bool("/OTR/automatic", automatic);
purple_prefs_set_bool("/OTR/onlyprivate", onlyprivate);
}
/* Load the OTR prefs for a particular buddy */
static void otrg_gtk_ui_buddy_prefs_load(GaimBuddy *buddy,
static void otrg_gtk_ui_buddy_prefs_load(PurpleBuddy *buddy,
gboolean *usedefaultp, gboolean *enabledp, gboolean *automaticp,
gboolean *onlyprivatep)
{
GaimBlistNode *node = &(buddy->node);
PurpleBlistNode *node = &(buddy->node);
*usedefaultp = ! gaim_blist_node_get_bool(node, "OTR/overridedefault");
*usedefaultp = ! purple_blist_node_get_bool(node, "OTR/overridedefault");
if (*usedefaultp) {
otrg_gtk_ui_global_prefs_load(enabledp, automaticp, onlyprivatep);
} else {
*enabledp = gaim_blist_node_get_bool(node, "OTR/enabled");
*automaticp = gaim_blist_node_get_bool(node, "OTR/automatic");
*onlyprivatep = gaim_blist_node_get_bool(node, "OTR/onlyprivate");
*enabledp = purple_blist_node_get_bool(node, "OTR/enabled");
*automaticp = purple_blist_node_get_bool(node, "OTR/automatic");
*onlyprivatep = purple_blist_node_get_bool(node, "OTR/onlyprivate");
}
}
/* Save the OTR prefs for a particular buddy */
static void otrg_gtk_ui_buddy_prefs_save(GaimBuddy *buddy,
static void otrg_gtk_ui_buddy_prefs_save(PurpleBuddy *buddy,
gboolean usedefault, gboolean enabled, gboolean automatic,
gboolean onlyprivate)
{
GaimBlistNode *node = &(buddy->node);
PurpleBlistNode *node = &(buddy->node);
gaim_blist_node_set_bool(node, "OTR/overridedefault", !usedefault);
gaim_blist_node_set_bool(node, "OTR/enabled", enabled);
gaim_blist_node_set_bool(node, "OTR/automatic", automatic);
gaim_blist_node_set_bool(node, "OTR/onlyprivate", onlyprivate);
purple_blist_node_set_bool(node, "OTR/overridedefault", !usedefault);
purple_blist_node_set_bool(node, "OTR/enabled", enabled);
purple_blist_node_set_bool(node, "OTR/automatic", automatic);
purple_blist_node_set_bool(node, "OTR/onlyprivate", onlyprivate);
}
static void load_otroptions(struct otroptionsdata *oo)
......@@ -537,18 +537,18 @@ static void make_privkeys_ui(GtkWidget *vbox)
label = gtk_label_new("Key for account:");
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
ui_layout.accountmenu = gaim_gtk_account_option_menu_new(NULL, 1,
ui_layout.accountmenu = pidgin_account_option_menu_new(NULL, 1,
G_CALLBACK(account_menu_changed_cb), NULL, NULL);
gtk_box_pack_start(GTK_BOX(hbox), ui_layout.accountmenu, TRUE, TRUE, 0);
/* Make sure we notice if the menu changes because an account has
* been added or removed */
gaim_signal_connect(gaim_accounts_get_handle(), "account-added",
purple_signal_connect(purple_accounts_get_handle(), "account-added",
ui_layout.accountmenu,
GAIM_CALLBACK(account_menu_added_removed_cb), NULL);
gaim_signal_connect(gaim_accounts_get_handle(), "account-removed",
PURPLE_CALLBACK(account_menu_added_removed_cb), NULL);
purple_signal_connect(purple_accounts_get_handle(), "account-removed",
ui_layout.accountmenu,
GAIM_CALLBACK(account_menu_added_removed_cb), NULL);
PURPLE_CALLBACK(account_menu_added_removed_cb), NULL);
ui_layout.fprint_label = gtk_label_new("");
gtk_label_set_selectable(GTK_LABEL(ui_layout.fprint_label), 1);
......@@ -698,7 +698,7 @@ static void make_fingerprints_ui(GtkWidget *vbox)
}
/* Construct the OTR UI widget */
GtkWidget* otrg_gtk_ui_make_widget(GaimPlugin *plugin)
GtkWidget* otrg_gtk_ui_make_widget(PurplePlugin *plugin)
{
GtkWidget *vbox = gtk_vbox_new(FALSE, 5);
GtkWidget *fingerprintbox = gtk_vbox_new(FALSE, 5);
......@@ -734,7 +734,7 @@ GtkWidget* otrg_gtk_ui_make_widget(GaimPlugin *plugin)
struct cbdata {
GtkWidget *dialog;
GaimBuddy *buddy;
PurpleBuddy *buddy;
GtkWidget *defaultbox;
struct otroptionsdata oo;
};
......@@ -807,7 +807,7 @@ static void config_buddy_response_cb(GtkDialog *dialog, gint resp,
gtk_widget_destroy(data->dialog);
}
static void otrg_gtk_ui_config_buddy(GaimBuddy *buddy)
static void otrg_gtk_ui_config_buddy(PurpleBuddy *buddy)
{
GtkWidget *dialog;
GtkWidget *label;
......@@ -835,7 +835,7 @@ static void otrg_gtk_ui_config_buddy(GaimBuddy *buddy)
/* Set the title */
label_text = g_strdup_printf("<span weight=\"bold\" size=\"larger\">"
"OTR Settings for %s</span>", gaim_buddy_get_contact_alias(buddy));
"OTR Settings for %s</span>", purple_buddy_get_contact_alias(buddy));
label = gtk_label_new(NULL);
......@@ -882,10 +882,10 @@ static void otrg_gtk_ui_config_buddy(GaimBuddy *buddy)
}
/* Calculate the policy for a particular account / username */
static OtrlPolicy otrg_gtk_ui_find_policy(GaimAccount *account,
static OtrlPolicy otrg_gtk_ui_find_policy(PurpleAccount *account,
const char *name)
{
GaimBuddy *buddy;
PurpleBuddy *buddy;
gboolean otrenabled, otrautomatic, otronlyprivate;
gboolean buddyusedefault, buddyenabled, buddyautomatic, buddyonlyprivate;
OtrlPolicy policy = OTRL_POLICY_DEFAULT;
......@@ -907,7 +907,7 @@ static OtrlPolicy otrg_gtk_ui_find_policy(GaimAccount *account,
policy = OTRL_POLICY_NEVER;
}
buddy = gaim_find_buddy(account, name);
buddy = purple_find_buddy(account, name);
if (!buddy) return policy;
/* Get the buddy-specific policy, if present */
......
/*
* Off-the-Record Messaging plugin for gaim
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2005 Nikita Borisov and Ian Goldberg
* <otr@cypherpunks.ca>
*
......@@ -21,7 +21,7 @@
#define __OTRG_GTK_UI_H__
/* Construct the GTK OTR UI widget */
GtkWidget* otrg_gtk_ui_make_widget(GaimPlugin *plugin);
GtkWidget* otrg_gtk_ui_make_widget(PurplePlugin *plugin);
/* Get the GTK UI ops */
const OtrgUiUiOps *otrg_gtk_ui_get_ui_ops(void);
......
This diff is collapsed.
/*
* Off-the-Record Messaging plugin for gaim
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2005 Nikita Borisov and Ian Goldberg
* <otr@cypherpunks.ca>
*
......@@ -20,7 +20,7 @@
#ifndef __OTRG_OTR_PLUGIN_H__
#define __OTRG_OTR_PLUGIN_H__
/* Gaim headers */
/* Purple headers */
#include "account.h"
#include "plugin.h"
......@@ -31,13 +31,13 @@
#define PRIVKEYFNAME "otr.private_key"
#define STOREFNAME "otr.fingerprints"
extern GaimPlugin *otrg_plugin_handle;
extern PurplePlugin *otrg_plugin_handle;
extern OtrlUserState otrg_plugin_userstate;
/* Send an IM from the given account to the given recipient. Display an
* error dialog if that account isn't currently logged in. */
void otrg_plugin_inject_message(GaimAccount *account, const char *recipient,
void otrg_plugin_inject_message(PurpleAccount *account, const char *recipient,
const char *message);
/* Generate a private key for the given accountname/protocol */
......@@ -46,13 +46,13 @@ void otrg_plugin_create_privkey(const char *accountname,
/* Send the default OTR Query message to the correspondent of the given
* context, from the given account. [account is actually a
* GaimAccount*, but it's declared here as void* so this can be passed
* PurpleAccount*, but it's declared here as void* so this can be passed
* as a callback.] */
void otrg_plugin_send_default_query(ConnContext *context, void *account);
/* Send the default OTR Query message to the correspondent of the given
* conversation. */
void otrg_plugin_send_default_query_conv(GaimConversation *conv);
void otrg_plugin_send_default_query_conv(PurpleConversation *conv);