Commit c276bfa7 authored by Rob Smits's avatar Rob Smits
Browse files

2012-04-30

	* gtk-dialog.c:
	* gtk-ui.c:
	* otr-plugin.c:
	* otr-plugin.h:
	* ui.c: More changes for instance tags. Some logging-
	related changes too (output whether pidgin is logging,
	change default not to log otr conversations). -- Rob
	Smits

2009-06-11

	* gtk-dialog.c:
	* otr-plugin.c:
	* otr-plugin.h: Initial instance tags implementation
	from Lisa Du
parent 1a7b6e27
......@@ -2,7 +2,7 @@ Off-the-Record Messaging plugin for pidgin
Authors:
Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew, Nikita Borisov
Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew, Lisa Du, Nikita Borisov
<otr@cypherpunks.ca>
See the README file for mailing list information
2012-04-30
* gtk-dialog.c:
* gtk-ui.c:
* otr-plugin.c:
* otr-plugin.h:
* ui.c: More changes for instance tags. Some logging-
related changes too (output whether pidgin is logging,
change default not to log otr conversations). -- Rob
Smits
2010-03-02
* po/vi.po: Vietnamese translation from Lyndon Johnson
......@@ -9,6 +20,13 @@
the fingerprints in the manual authentication dialog
selectable (but not selected by default).
2009-06-11
* gtk-dialog.c:
* otr-plugin.c:
* otr-plugin.h: Initial instance tags implementation
from Lisa Du
2009-08-24
* po/fr.po: Fixed \n errors
......
......@@ -51,6 +51,8 @@ Use the provided Makefile.mingw:
make -f Makefile.mingw
See Makefile.mingw.notes for a few hints.
INSTALLATION
You should be able to simply do "make install". If you want to install
......
WIN32=1
# The version number to put in the plugin info
PIDGIN_OTR_VERSION = 3.2.0
PIDGIN_OTR_VERSION = 4.0.0
# Name of the gettext domain
GETTEXT_PACKAGE = pidgin-otr
# 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
PIDGIN_HEADERS ?= -I/usr/i586-mingw32msvc/include/pidgin \
-I/usr/i586-mingw32msvc/include/pidgin/win32
PURPLE_HEADERS ?= -I/usr/i586-mingw32msvc/include/libpurple \
-I/usr/i586-mingw32msvc/include/libpurple/win32
# If you don't have pkg-config, put the appropriate -I entry on the next line
# Replace this with the path to the extracted GTK+ "all-in-one" win32 bundle
GTK_WIN32_BUNDLE ?= /usr/i586-mingw32msvc/misc/gtk_bundle
# Replace this with the to path DLL files from a Win32 Pidgin distributable
# (i.e. pidgin.dll and libpurple.dll)
PIDGIN_WIN32_LIBS ?= /usr/i586-mingw32msvc/misc/pidgin_dlls
# If you don't have pkg-config, uncomment the -I lines below
GTK_HDRS ?= `pkg-config --cflags glib-2.0 gtk+-2.0`
#GTK_HDRS ?= -I$(GTK_WIN32_BUNDLE)/include/gtk-2.0 \
# -I$(GTK_WIN32_BUNDLE)/include/glib-2.0 \
# -I$(GTK_WIN32_BUNDLE)/include/cairo \
# -I$(GTK_WIN32_BUNDLE)/include/pango-1.0 \
# -I$(GTK_WIN32_BUNDLE)/include/atk-1.0 \
# -I$(GTK_WIN32_BUNDLE)/include/gdk-pixbuf-2.0 \
# -I$(GTK_WIN32_BUNDLE)/lib/glib-2.0/include \
# -I$(GTK_WIN32_BUNDLE)/lib/gtk-2.0/include
# The location of the libotr include files. Note that if, for example,
# the full path of message.h is /usr/include/libotr/message.h, you
......@@ -41,12 +59,13 @@ ZIPFILE = pidgin-otr-$(PIDGIN_OTR_VERSION).zip
CC = i586-mingw32msvc-gcc
LDFLAGS = -Wl,--enable-auto-image-base
LDLIBS = $(LIBOTRLIBDIR)/libotr.a -lgtk-win32-2.0 -lglib-2.0 -lgdk_pixbuf-2.0 \
-lgobject-2.0 -lpidgin -llibpurple -lgcrypt -lgpg-error \
-L$(LIBINTLLIBDIR) -lintl
LDLIBS = $(LIBOTRLIBDIR)/libotr.a -L$(GTK_WIN32_BUNDLE)/lib \
-L$(PIDGIN_WIN32_LIBS) -lgtk-win32-2.0 -lglib-2.0 \
-lgdk_pixbuf-2.0 -lgobject-2.0 -lpidgin -llibpurple \
-lgcrypt -lgpg-error -L$(LIBINTLLIBDIR) -lintl
CC ?= gcc
override CFLAGS += -g -O2 -Wall -I$(PIDGIN_HEADERS) -I$(PURPLE_HEADERS) \
override CFLAGS += -g -O2 -Wall $(PIDGIN_HEADERS) $(PURPLE_HEADERS) \
$(GTK_HDRS) -I$(LIBOTRINCDIR) $(FPIC) -DUSING_GTK -DPURPLE_PLUGINS \
-DPIDGIN_OTR_VERSION=\"$(PIDGIN_OTR_VERSION)\" \
-DPIDGIN_NAME=\"Pidgin\" -I$(LIBINTLINCDIR) -DENABLE_NLS \
......@@ -66,8 +85,8 @@ clean:
distclean: clean
$(MAKE) -C po -f Makefile.mingw distclean
## Package up all the pieces needed to build the installer
zip: all
## Prepare the win32_export directory
prepare_win32_export: all
mkdir win32_export
# Copy pieces over from the libotr source dir
for f in otr_mackey.exe otr_parse.exe otr_remac.exe otr_modify.exe \
......@@ -90,8 +109,16 @@ zip: all
i586-mingw32msvc-strip *.exe *.dll; \
perl -pi -e 's/$$/\r/' README.Toolkit.txt Protocol-v2.html \
COPYING.txt COPYING.LIB.txt README.txt; \
installer: prepare_win32_export
makensis packaging/windows/pidgin-otr-rob.nsi
rm -rf win32_export
## Package up all the pieces needed to build the installer
zip: prepare_win32_export
rm -f ../$(ZIPFILE); \
zip -r ../$(ZIPFILE) README.txt \
README.Toolkit.txt Protocol-v2.html COPYING.txt \
COPYING.LIB.txt *.exe *.dll *.nsi locale
rm -rf win32_export
Here are some rough notes that might help you create a pidgin-otr Win32 build on
a Linux system with mingw32. These have been tested on Ubuntu 11.04.
I am listing packages and their build instructions in the order they should be
built. Good luck!
libgpg-error-1.0:
(before configure)
HOST_CC=gcc
DLLTOOL=i586-mingw32msvc-dlltool
AS=i586-mingw32msvc-as
export HOST_CC DLLTOOL AS
./configure --with-pic --build=`./config.guess` --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc
make
sudo make install
gcrypt-1.2.1:
w32root=i586-mingw32msvc ./autogen.sh --build-w32
Then append #undef HAVE_GETTIMEOFDAY to libgcrypt config.h
Apply windows slow random fix (patch on otr website, listed as "Note that if you're compiling from source on win32...")
make
sudo make install
libotr:
./configure --with-pic --build=`./config.guess` --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --with-libgcrypt-prefix=/usr/i586-mingw32msvc
make
sudo make install
pidgin-otr:
You will need: Pidgin source code distributable, Pidgin Win32 distributable, and an "all-in-one bundle" of the GTK+ stack 2.14.7 or greater (e.g., gtk+-bundle_2.24.10-20120208_win32.zip).
In Makefile.mingw, specify the location of PIDGIN_HEADERS, PURPLE_HEADERS, GTK_WIN32_BUNDLE, and PIDGIN_WIN32_LIBS
Ensure either pkg-config will correctly resolve all the dependencies for glib-2.0 and gtk+-2.0 (there is a README in the GTK+ bundle about this), or uncomment (and perhaps revise) the hardcoded list of includes for GTK_HDRS
make -f Makefile.mingw
nsis:
sudo apt-get install nsis
Locate the "nsisunz" plugin (a google search for "nsisunz.zip" should be sufficient)
Extract the DLL to /usr/local/share/nsis/Plugins (yes it's a DLL extension, but it will still work for GNU/Linux nsis)
make -f Makefile.mingw installer <-- This should now build the nsis installer
Off-the-Record Messaging plugin for pidgin
v3.2.0, 15 Jun 2008
v4.0.0, 2012
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
......@@ -300,9 +300,9 @@ The Off-the-Record Messaging plugin for pidgin is covered by the following
(GPL) license:
Off-the-Record Messaging plugin for pidgin
Copyright (C) 2004-2009 Ian Goldberg, Rob Smits,
Copyright (C) 2004-2012 Ian Goldberg, Rob Smits,
Chris Alexander, Willy Lew,
Nikita Borisov
Lisa Du, Nikita Borisov
<otr@cypherpunks.ca>
......@@ -325,7 +325,7 @@ CONTACT
To report problems, comments, suggestions, patches, etc., you can email
the authors:
Ian Goldberg, Rob Smits, Chris Alexander, and Nikita Borisov
Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew, Lisa Du, Nikita Borisov
<otr@cypherpunks.ca>
For more information on Off-the-Record Messaging, visit
......
/*
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2009 Ian Goldberg, Rob Smits,
* Copyright (C) 2004-2012 Ian Goldberg, Rob Smits,
* Chris Alexander, Willy Lew,
* Nikita Borisov
* <otr@cypherpunks.ca>
......
/*
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2009 Ian Goldberg, Rob Smits,
* Copyright (C) 2004-2012 Ian Goldberg, Rob Smits,
* Chris Alexander, Willy Lew,
* Nikita Borisov
* <otr@cypherpunks.ca>
......
This diff is collapsed.
/*
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2009 Ian Goldberg, Rob Smits,
* Copyright (C) 2004-2012 Ian Goldberg, Rob Smits,
* Chris Alexander, Willy Lew,
* Nikita Borisov
* <otr@cypherpunks.ca>
......
/*
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2009 Ian Goldberg, Rob Smits,
* Copyright (C) 2004-2012 Ian Goldberg, Rob Smits,
* Chris Alexander, Willy Lew,
* Nikita Borisov
* <otr@cypherpunks.ca>
......@@ -123,7 +123,9 @@ static void account_menu_changed_cb(GtkWidget *item, PurpleAccount *account,
* UI, if visible. */
static void otrg_gtk_ui_update_fingerprint(void)
{
if (ui_layout.accountmenu) {
g_signal_emit_by_name(G_OBJECT(ui_layout.accountmenu), "changed");
}
}
static void account_menu_added_removed_cb(PurpleAccount *account, void *data)
......@@ -162,17 +164,45 @@ static void otrg_gtk_ui_update_keylist(void)
int i;
PurplePlugin *p;
char *proto_name;
if (context->their_instance != OTRL_INSTAG_MASTER) continue;
fingerprint = context->fingerprint_root.next;
/* If there's no fingerprint, don't add it to the known
* fingerprints list */
while(fingerprint) {
ConnContext *context_iter;
TrustLevel best_level = TRUST_NOT_PRIVATE;
int used = 0;
titles[0] = context->username;
if (context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
context->active_fingerprint != fingerprint) {
titles[1] = _("Unused");
} else {
for (context_iter = context->m_context;
context_iter && context_iter->m_context == context->m_context;
context_iter = context_iter->next) {
TrustLevel this_level = TRUST_NOT_PRIVATE;
if (context_iter->active_fingerprint == fingerprint) {
this_level = otrg_plugin_context_to_trust(context_iter);
used = 1;
if (this_level == TRUST_PRIVATE) {
best_level = TRUST_PRIVATE;
} else if (this_level == TRUST_UNVERIFIED
&& best_level != TRUST_PRIVATE) {
best_level = TRUST_UNVERIFIED;
} else if (this_level == TRUST_FINISHED
&& best_level == TRUST_NOT_PRIVATE) {
best_level = TRUST_FINISHED;
}
}
}
if (used) {
titles[1] = (gchar *)
_(trust_states[otrg_plugin_context_to_trust(context)]);
_(trust_states[best_level]);
}
titles[2] = (fingerprint->trust && fingerprint->trust[0]) ?
_("Yes") : _("No");
......@@ -243,26 +273,33 @@ static void clist_selected(GtkWidget *widget, gint row, gint column,
int verify_sensitive = 0;
Fingerprint *f = gtk_clist_get_row_data(GTK_CLIST(ui_layout.keylist),
row);
if (f && f->context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
f->context->active_fingerprint == f) {
disconnect_sensitive = 1;
}
if (f && f->context->msgstate == OTRL_MSGSTATE_FINISHED) {
disconnect_sensitive = 1;
}
if (f && (f->context->msgstate != OTRL_MSGSTATE_ENCRYPTED ||
f->context->active_fingerprint != f)) {
ConnContext *context_iter;
if (f) {
verify_sensitive = 1;
forget_sensitive = 1;
if (f->context && f->context->m_context) {
for (context_iter = f->context;
context_iter && context_iter->m_context ==
f->context->m_context;
context_iter = context_iter->next) {
if (context_iter->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
context_iter->active_fingerprint == f) {
disconnect_sensitive = 1;
forget_sensitive = 0;
}
if (f && f->context->msgstate == OTRL_MSGSTATE_PLAINTEXT) {
else if (context_iter->msgstate == OTRL_MSGSTATE_FINISHED) {
connect_sensitive = 1;
}
if (f && f->context->msgstate == OTRL_MSGSTATE_FINISHED) {
else if (context_iter->msgstate == OTRL_MSGSTATE_PLAINTEXT) {
connect_sensitive = 1;
}
if (f) {
verify_sensitive = 1;
}
}
}
gtk_widget_set_sensitive(ui_layout.connect_button,
connect_sensitive);
gtk_widget_set_sensitive(ui_layout.disconnect_button,
......@@ -280,23 +317,44 @@ static void clist_unselected(GtkWidget *widget, gint row, gint column,
static int fngsortval(Fingerprint *f)
{
int is_active = (f->context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
f->context->active_fingerprint == f);
TrustLevel level = otrg_plugin_context_to_trust(f->context);
switch(level) {
case TRUST_PRIVATE:
return is_active ? 0 : 100;
case TRUST_UNVERIFIED:
return is_active ? 1 : 100;
case TRUST_FINISHED:
return 2;
case TRUST_NOT_PRIVATE:
return 3;
int result = 200;
ConnContext *context_iter;
for (context_iter = f->context->m_context;
context_iter && context_iter->m_context == f->context->m_context;
context_iter = context_iter->next) {
int is_active = 0;
TrustLevel level;
if (context_iter->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
context_iter->active_fingerprint == f) {
is_active = 1;
}
/* Shouldn't get here, but anyway. */
return 200;
level = otrg_plugin_context_to_trust(context_iter);
if (level == TRUST_PRIVATE) {
if (is_active) {
result = 0;
break;
} else {
result = result > 100 ? 100 : result;
}
} else if (level == TRUST_UNVERIFIED) {
if (is_active) {
result = 1;
} else {
result = result > 100 ? 100 : result;
}
} else if (level == TRUST_FINISHED) {
result = result > 2 ? 2 : result;
} else if (level == TRUST_NOT_PRIVATE) {
result = result > 3 ? 3 : result;
}
}
return result;
}
static gint statuscmp(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
......@@ -345,20 +403,25 @@ static void disconnect_connection(GtkWidget *widget, gpointer data)
{
/* Forget whatever state we've got with this context */
ConnContext *context;
ConnContext *context_iter;
if (ui_layout.selected_fprint == NULL) return;
context = ui_layout.selected_fprint->context;
if (context == NULL) return;
for (context_iter = context->m_context;
context_iter && context_iter->m_context == context->m_context;
context_iter = context_iter->next) {
/* Don't do anything with fingerprints other than the active one
* if we're in the ENCRYPTED state */
if (context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
context->active_fingerprint != ui_layout.selected_fprint) {
return;
if (context_iter->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
context_iter->active_fingerprint == ui_layout.selected_fprint) {
otrg_ui_disconnect_connection(context_iter);
}
}
otrg_ui_disconnect_connection(context);
}
static void forget_fingerprint(GtkWidget *widget, gpointer data)
......@@ -478,7 +541,7 @@ static void otrg_gtk_ui_global_prefs_load(gboolean *enabledp,
*enabledp = TRUE;
*automaticp = TRUE;
*onlyprivatep = FALSE;
*avoidloggingotrp = FALSE;
*avoidloggingotrp = TRUE;
}
}
......
/*
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2009 Ian Goldberg, Rob Smits,
* Copyright (C) 2004-2012 Ian Goldberg, Rob Smits,
* Chris Alexander, Willy Lew,
* Nikita Borisov
* <otr@cypherpunks.ca>
......
/*
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2009 Ian Goldberg, Rob Smits,
* Copyright (C) 2004-2012 Ian Goldberg, Rob Smits,
* Chris Alexander, Willy Lew,
* Nikita Borisov
* <otr@cypherpunks.ca>
......
/*
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2009 Ian Goldberg, Rob Smits,
* Copyright (C) 2004-2012 Ian Goldberg, Rob Smits,
* Chris Alexander, Willy Lew,
* Nikita Borisov
* Lisa Du, Nikita Borisov
* <otr@cypherpunks.ca>
*
* This program is free software; you can redistribute it and/or modify
......@@ -64,6 +64,7 @@
#include <libotr/tlv.h>
#include <libotr/message.h>
#include <libotr/userstate.h>
#include <libotr/instag.h>
/* purple-otr headers */
#include "ui.h"
......@@ -100,6 +101,7 @@ OtrlUserState otrg_plugin_userstate = NULL;
* protocols. */
GHashTable* mms_table;
/* 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(PurpleAccount *account, const char *recipient,
......@@ -162,7 +164,7 @@ static int display_otr_message(void *opdata, const char *accountname,
static void log_message(void *opdata, const char *message)
{
purple_debug_info("otr", message);
purple_debug_info("otr", "%s", message);
}
static OtrlPolicy policy_cb(void *opdata, ConnContext *context)
......@@ -190,7 +192,8 @@ void otrg_plugin_create_privkey(const char *accountname,
#endif /* WIN32 */
FILE *privf;
gchar *privkeyfile = g_build_filename(purple_user_dir(), PRIVKEYFNAME, NULL);
gchar *privkeyfile = g_build_filename(purple_user_dir(),
PRIVKEYFNAME, NULL);
if (!privkeyfile) {
fprintf(stderr, _("Out of memory building filenames!\n"));
return;
......@@ -226,6 +229,38 @@ static void create_privkey_cb(void *opdata, const char *accountname,
otrg_plugin_create_privkey(accountname, protocol);
}
/* Generate a instance tag for the given accountname/protocol */
void otrg_plugin_create_instag(const char *accountname,
const char *protocol)
{
OtrgDialogWaitHandle waithandle;
FILE *instagf;
gchar *instagfile = g_build_filename(purple_user_dir(), INSTAGFNAME, NULL);
if (!instagfile) {
fprintf(stderr, _("Out of memory building filenames!\n"));
return;
}
instagf = g_fopen(instagfile, "w+b");
g_free(instagfile);
if (!instagf) {
fprintf(stderr, _("Could not write private key file\n"));
return;
}
/* Generate the key */
otrl_instag_generate_FILEp(otrg_plugin_userstate, instagf,
accountname, protocol);
fclose(instagf);
}
static void create_instag_cb(void *opdata, const char *accountname,
const char *protocol)
{
otrg_plugin_create_instag(accountname, protocol);
}
static int is_logged_in_cb(void *opdata, const char *accountname,
const char *protocol, const char *recipient)
{
......@@ -322,7 +357,8 @@ static const char* otr_error_message_cb(void *opdata, ConnContext *context,
}
break;
case OTRL_ERRCODE_MSG_UNREADABLE :
err_msg = g_strdup(_("You transmitted an unreadable encrypted message."));
err_msg =
g_strdup(_("You transmitted an unreadable encrypted message."));
break;
case OTRL_ERRCODE_MSG_MALFORMED :
err_msg = g_strdup(_("You transmitted a malformed data message."));
......@@ -377,12 +413,33 @@ static void handle_smp_event_cb(void *opdata, OtrlSMPEvent smp_event,
}
}
void otrg_emit_msg_received(ConnContext *context, const char* message) {
PurpleConversation *conv = otrg_plugin_userinfo_to_conv(
context->accountname, context->protocol, context->username, 1);
PurpleMessageFlags flags = PURPLE_MESSAGE_RECV | PURPLE_MESSAGE_SYSTEM
| PURPLE_MESSAGE_NOTIFY;
PurpleAccount * account = purple_conversation_get_account(conv);
purple_signal_emit(purple_conversations_get_handle(), "received-im-msg",
account, context->username, message, conv, flags);
}
static void handle_msg_event_cb(void *opdata, OtrlMessageEvent msg_event,
ConnContext *context, const char* message, gcry_error_t err)
{
PurpleConversation *conv = NULL;
if (!context) return;
char *buf;
const char *format;
OtrlMessageEvent last_msg_event;
gboolean value_existed;
conv = otrg_plugin_context_to_conv(context, 1);
value_existed = g_hash_table_lookup_extended(conv->data,
"otr-last_msg_event", NULL, (void**)&last_msg_event);
purple_conversation_set_data(conv, "otr-last_msg_event",
(gpointer)msg_event);
switch (msg_event)
{
......@@ -390,8 +447,8 @@ static void handle_msg_event_cb(void *opdata, OtrlMessageEvent msg_event,
break;
case OTRL_MSGEVENT_ENCRYPTION_REQUIRED:
if (display_otr_message(opdata, context->accountname,
context->protocol, context->username, _("Attempting to start a "
"private conversation..."), 1)) {
context->protocol, context->username, _("Attempting to"
" start a private conversation..."), 1)) {
format = _("You attempted to send an "
"unencrypted message to %s");
buf = malloc(strlen(format) +
......@@ -399,8 +456,8 @@ static void handle_msg_event_cb(void *opdata, OtrlMessageEvent msg_event,
if (buf) {
sprintf(buf, format, context->username);
notify(opdata, OTRL_NOTIFY_WARNING, context->accountname,
context->protocol, context->username, _("OTR Policy Violation"),
buf,
context->protocol, context->username, _("OTR Policy"
" Violation"), buf,
_("Unencrypted messages to this recipient are "
"not allowed. Attempting to start a private "
"conversation.\n\nYour message will be "
......@@ -412,10 +469,12 @@ static void handle_msg_event_cb(void *opdata, OtrlMessageEvent msg_event,
break;
case OTRL_MSGEVENT_ENCRYPTION_ERROR:
if (display_otr_message(opdata, context->accountname,
context->protocol, context->username, _("An error occurred when "
"encrypting your message. The message was not sent."), 1)) {
context->protocol, context->username, _("An error occurred "
"when encrypting your message. The message was not sent."
), 1)) {
notify(opdata, OTRL_NOTIFY_ERROR,
context->accountname, context->protocol, context->username,
context->accountname, context->protocol,
context->username,
_("Error encrypting message"),
_("An error occurred when encrypting your message"),
_("The message was not sent."));
......@@ -423,15 +482,17 @@ static void handle_msg_event_cb(void *opdata, OtrlMessageEvent msg_event,
break;
case OTRL_MSGEVENT_CONNECTION_ENDED:
if (display_otr_message(opdata, context->accountname,
context->protocol, context->username, _("Your message was not sent. "
"Either end your private conversation, or restart it."), 1)) {
context->protocol, context->username, _("Your message"
"was not sent. Either end your private conversation, "
"or restart it."), 1)) {
format = _("%s has already closed his/her private "