summaryrefslogtreecommitdiff
path: root/pidgin
diff options
context:
space:
mode:
authorSadrul Habib Chowdhury <sadrul@pidgin.im>2008-10-31 07:59:46 +0000
committerSadrul Habib Chowdhury <sadrul@pidgin.im>2008-10-31 07:59:46 +0000
commitd3cc5bf24a5f759be9b7a83e12e8229196ca8e34 (patch)
tree71a090201ae21d68b0825085fefebf9bc2748fb0 /pidgin
parent65a637da9cd60700ec178cde1ed3dd24e0695f46 (diff)
parent7902d6c9d6e8608a7147949eaa1838206a3b14ea (diff)
downloadpidgin-sadrul.struct.hiding.tar.gz
propagate from branch 'im.pidgin.pidgin' (head 328a7b5211ba8112c8978d5b81f5e39bf2ce2596)sadrul.struct.hiding
to branch 'local.struct.hiding' (head ee0f2a4594bf5beb531faa4978a7a450903a6017)
Diffstat (limited to 'pidgin')
-rw-r--r--pidgin/Makefile.am2
-rw-r--r--pidgin/gtkaccount.c12
-rw-r--r--pidgin/gtkblist.c9
-rw-r--r--pidgin/gtkconv.c123
-rw-r--r--pidgin/gtkconv.h2
-rw-r--r--pidgin/gtkdialogs.c194
-rw-r--r--pidgin/gtkdialogs.h5
-rw-r--r--pidgin/gtkimhtml.c83
-rw-r--r--pidgin/gtkimhtml.h2
-rw-r--r--pidgin/gtkprefs.c6
-rw-r--r--pidgin/gtkstatusbox.c111
-rw-r--r--pidgin/gtkstatusbox.h2
-rw-r--r--pidgin/gtkutils.c4
-rw-r--r--pidgin/gtkutils.h2
-rw-r--r--pidgin/pidgintooltip.c38
-rw-r--r--pidgin/plugins/notify.c6
-rw-r--r--pidgin/plugins/perl/common/gtkmodule.h4
-rw-r--r--pidgin/win32/nsis/translations/finnish.nsh36
-rw-r--r--pidgin/win32/winpidgin.c3
19 files changed, 378 insertions, 266 deletions
diff --git a/pidgin/Makefile.am b/pidgin/Makefile.am
index 6ee04bf7c5..b8eff6a7a6 100644
--- a/pidgin/Makefile.am
+++ b/pidgin/Makefile.am
@@ -5,6 +5,7 @@ EXTRA_DIST = \
Makefile.mingw \
pidgin.pc.in \
pidgin-uninstalled.pc.in \
+ pidginstock-artwork.c \
win32/IdleTracker/Makefile.mingw \
win32/IdleTracker/idletrack.c \
win32/IdleTracker/idletrack.h \
@@ -187,6 +188,7 @@ pidgin_DEPENDENCIES = @LIBOBJS@
pidgin_LDFLAGS = -export-dynamic
pidgin_LDADD = \
@LIBOBJS@ \
+ $(GLIB_LIBS) \
$(DBUS_LIBS) \
$(GSTREAMER_LIBS) \
$(XSS_LIBS) \
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
index 9fa275189b..c9c4866348 100644
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -451,7 +451,8 @@ add_login_options(AccountPrefsDialog *dialog, GtkWidget *parent)
if (dialog->account != NULL)
username = g_strdup(purple_account_get_username(dialog->account));
- if (!username && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(dialog->prpl_info, get_account_text_table)) {
+ if (!username && dialog->prpl_info
+ && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(dialog->prpl_info, get_account_text_table)) {
GdkColor color = {0, 34952, 35466, 34181};
GHashTable *table;
const char *label;
@@ -724,7 +725,7 @@ add_protocol_options(AccountPrefsDialog *dialog, GtkWidget *parent)
{
PurpleAccountOption *option;
PurpleAccount *account;
- GtkWidget *frame, *vbox, *check, *entry, *combo, *menu, *item;
+ GtkWidget *frame, *vbox, *check, *entry, *combo;
GList *list, *node;
gint i, idx, int_value;
GtkListStore *model;
@@ -858,13 +859,6 @@ add_protocol_options(AccountPrefsDialog *dialog, GtkWidget *parent)
gtk_entry_set_invisible_char(GTK_ENTRY(entry), PIDGIN_INVISIBLE_CHAR);
}
- /* Google Talk default domain hackery! */
- menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(dialog->protocol_menu));
- item = gtk_menu_get_active(GTK_MENU(menu));
- if (str_value == NULL && g_object_get_data(G_OBJECT(item), "fake") &&
- !strcmp(_("Connect server"), purple_account_option_get_text(option)))
- str_value = "talk.google.com";
-
if (str_value != NULL)
gtk_entry_set_text(GTK_ENTRY(entry), str_value);
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
index 17a076c129..663454fe51 100644
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -4663,8 +4663,6 @@ add_error_dialog(PidginBuddyList *gtkblist,
{
PidginBuddyListPrivate *priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist);
gtk_container_add(GTK_CONTAINER(priv->error_scrollbook), dialog);
-
- set_urgent();
}
static GtkWidget *
@@ -4811,7 +4809,6 @@ update_generic_error_message(PurpleAccount *account,
GTK_CONTAINER(priv->error_scrollbook), account);
pidgin_mini_dialog_set_description(PIDGIN_MINI_DIALOG(mini_dialog),
description);
- set_urgent();
}
@@ -4967,8 +4964,6 @@ add_to_signed_on_elsewhere(PurpleAccount *account)
gtk_widget_show_all(account_label);
update_signed_on_elsewhere_minidialog_title();
-
- set_urgent();
}
static void
@@ -4994,7 +4989,6 @@ update_signed_on_elsewhere_tooltip(PurpleAccount *account,
GtkContainer *c = GTK_CONTAINER(priv->signed_on_elsewhere->contents);
GtkWidget *label = find_child_widget_by_account(c, account);
gtk_widget_set_tooltip_text(label, description);
- set_urgent();
#endif
}
@@ -7183,7 +7177,10 @@ void pidgin_blist_init(void)
purple_prefs_add_int(PIDGIN_PREFS_ROOT "/blist/y", 0);
purple_prefs_add_int(PIDGIN_PREFS_ROOT "/blist/width", 250); /* Golden ratio, baby */
purple_prefs_add_int(PIDGIN_PREFS_ROOT "/blist/height", 405); /* Golden ratio, baby */
+#if !GTK_CHECK_VERSION(2,14,0)
+ /* This pref is used in pidgintooltip.c. */
purple_prefs_add_int(PIDGIN_PREFS_ROOT "/blist/tooltip_delay", 500);
+#endif
/* Register our signals */
purple_signal_register(gtk_blist_handle, "gtkblist-hiding",
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
index 610433118a..8958d27d60 100644
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -24,6 +24,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*
*/
+#define _PIDGIN_GTKCONV_C_
+
#include "internal.h"
#include "pidgin.h"
@@ -161,7 +163,7 @@ static const char *item_factory_translate_func (const char *path, gpointer func_
gboolean pidgin_conv_has_focus(PurpleConversation *conv);
static GdkColor* generate_nick_colors(guint *numcolors, GdkColor background);
static gboolean color_is_visible(GdkColor foreground, GdkColor background, int color_contrast, int brightness_contrast);
-static GtkTextTag *get_buddy_tag(PurpleConversation *conv, const char *who, gboolean create);
+static GtkTextTag *get_buddy_tag(PurpleConversation *conv, const char *who, PurpleMessageFlags flag, gboolean create);
static void pidgin_conv_update_fields(PurpleConversation *conv, PidginConvFields fields);
static void focus_out_from_menubar(GtkWidget *wid, PidginWindow *win);
static void pidgin_conv_tab_pack(PidginWindow *win, PidginConversation *gtkconv);
@@ -172,7 +174,8 @@ static void pidgin_conv_set_position_size(PidginWindow *win, int x, int y,
int width, int height);
static gboolean pidgin_conv_xy_to_right_infopane(PidginWindow *win, int x, int y);
-static const GdkColor *get_nick_color(PidginConversation *gtkconv, const char *name) {
+static const GdkColor *get_nick_color(PidginConversation *gtkconv, const char *name)
+{
static GdkColor col;
GtkStyle *style = gtk_widget_get_style(gtkconv->imhtml);
float scale;
@@ -1910,6 +1913,40 @@ move_to_next_unread_tab(PidginConversation *gtkconv, gboolean forward)
}
static gboolean
+gtkconv_cycle_focus(PidginConversation *gtkconv, GtkDirectionType dir)
+{
+ PurpleConversation *conv = gtkconv->active_conv;
+ gboolean chat = purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT;
+ GtkWidget *next = NULL;
+ struct {
+ GtkWidget *from;
+ GtkWidget *to;
+ } transitions[] = {
+ {gtkconv->entry, gtkconv->imhtml},
+ {gtkconv->imhtml, chat ? gtkconv->u.chat->list : gtkconv->entry},
+ {chat ? gtkconv->u.chat->list : NULL, gtkconv->entry},
+ {NULL, NULL}
+ }, *ptr;
+
+ for (ptr = transitions; !next && ptr->from; ptr++) {
+ GtkWidget *from, *to;
+ if (dir == GTK_DIR_TAB_FORWARD) {
+ from = ptr->from;
+ to = ptr->to;
+ } else {
+ from = ptr->to;
+ to = ptr->from;
+ }
+ if (gtk_widget_is_focus(from))
+ next = to;
+ }
+
+ if (next)
+ gtk_widget_grab_focus(next);
+ return !!next;
+}
+
+static gboolean
conv_keypress_common(PidginConversation *gtkconv, GdkEventKey *event)
{
PidginWindow *win;
@@ -1970,7 +2007,10 @@ conv_keypress_common(PidginConversation *gtkconv, GdkEventKey *event)
#endif
return TRUE;
break;
-
+ case GDK_F6:
+ if (gtkconv_cycle_focus(gtkconv, event->state & GDK_SHIFT_MASK ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD))
+ return TRUE;
+ break;
} /* End of switch */
}
@@ -1997,6 +2037,10 @@ conv_keypress_common(PidginConversation *gtkconv, GdkEventKey *event)
return TRUE;
}
break;
+ case GDK_F6:
+ if (gtkconv_cycle_focus(gtkconv, event->state & GDK_SHIFT_MASK ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD))
+ return TRUE;
+ break;
}
}
return FALSE;
@@ -4423,7 +4467,7 @@ buddy_cb_common(PurpleBuddy *buddy, PurpleConversation *conv, gboolean is_buddy)
blist_node_aliased_cb((PurpleBlistNode *)buddy, NULL, conv);
- texttag = get_buddy_tag(conv, purple_buddy_get_name(buddy), FALSE); /* XXX: do we want the normalized name? */
+ texttag = get_buddy_tag(conv, purple_buddy_get_name(buddy), 0, FALSE); /* XXX: do we want the normalized name? */
if (texttag) {
g_object_set(texttag, "weight", is_buddy ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL, NULL);
}
@@ -5343,16 +5387,35 @@ pidgin_conv_write_im(PurpleConversation *conv, const char *who,
purple_conversation_write(conv, who, message, flags, mtime);
}
+static const char *
+get_text_tag_color(GtkTextTag *tag)
+{
+ GdkColor *color = NULL;
+ gboolean set = FALSE;
+ static char colcode[] = "#XXXXXX";
+ if (tag)
+ g_object_get(G_OBJECT(tag), "foreground-set", &set, "foreground-gdk", &color, NULL);
+ if (set && color)
+ g_snprintf(colcode, sizeof(colcode), "#%02x%02x%02x",
+ color->red >> 8, color->green >> 8, color->blue >> 8);
+ else
+ colcode[0] = '\0';
+ if (color)
+ gdk_color_free(color);
+ return colcode;
+}
+
/* The callback for an event on a link tag. */
static gboolean buddytag_event(GtkTextTag *tag, GObject *imhtml,
- GdkEvent *event, GtkTextIter *arg2, gpointer data) {
+ GdkEvent *event, GtkTextIter *arg2, gpointer data)
+{
if (event->type == GDK_BUTTON_PRESS
|| event->type == GDK_2BUTTON_PRESS) {
GdkEventButton *btn_event = (GdkEventButton*) event;
PurpleConversation *conv = data;
char *buddyname;
- /* strlen("BUDDY ") == 6 */
+ /* strlen("BUDDY " or "HILIT ") == 6 */
g_return_val_if_fail((tag->name != NULL)
&& (strlen(tag->name) > 6), FALSE);
@@ -5392,24 +5455,33 @@ static gboolean buddytag_event(GtkTextTag *tag, GObject *imhtml,
return FALSE;
}
-static GtkTextTag *get_buddy_tag(PurpleConversation *conv, const char *who, gboolean create)
+static GtkTextTag *get_buddy_tag(PurpleConversation *conv, const char *who, PurpleMessageFlags flag,
+ gboolean create)
{
PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
GtkTextTag *buddytag;
gchar *str;
+ gboolean highlight = (flag & PURPLE_MESSAGE_NICK);
+ GtkTextBuffer *buffer = GTK_IMHTML(gtkconv->imhtml)->text_buffer;
- str = g_strdup_printf("BUDDY %s", who);
+ str = g_strdup_printf(highlight ? "HILIT %s" : "BUDDY %s", who);
buddytag = gtk_text_tag_table_lookup(
- gtk_text_buffer_get_tag_table(
- GTK_IMHTML(gtkconv->imhtml)->text_buffer), str);
+ gtk_text_buffer_get_tag_table(buffer), str);
if (buddytag == NULL && create) {
- buddytag = gtk_text_buffer_create_tag(
- GTK_IMHTML(gtkconv->imhtml)->text_buffer, str,
- "foreground-gdk", get_nick_color(gtkconv, who),
- "weight", purple_find_buddy(purple_conversation_get_account(conv), who) ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL,
- NULL);
+ if (highlight)
+ buddytag = gtk_text_buffer_create_tag(buffer, str,
+ "foreground", get_text_tag_color(gtk_text_tag_table_lookup(
+ gtk_text_buffer_get_tag_table(buffer), "highlight-name")),
+ "weight", PANGO_WEIGHT_BOLD,
+ NULL);
+ else
+ buddytag = gtk_text_buffer_create_tag(
+ buffer, str,
+ "foreground-gdk", get_nick_color(gtkconv, who),
+ "weight", purple_find_buddy(purple_conversation_get_account(conv), who) ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL,
+ NULL);
g_signal_connect(G_OBJECT(buddytag), "event",
G_CALLBACK(buddytag_event), conv);
@@ -5766,7 +5838,9 @@ pidgin_conv_write_conv(PurpleConversation *conv, const char *name, const char *a
}
if (flags & PURPLE_MESSAGE_NICK) {
- tagname = "highlight-name";
+ if (type == PURPLE_CONV_TYPE_IM) {
+ tagname = "highlight-name";
+ }
} else if (flags & PURPLE_MESSAGE_RECV) {
/* The tagname for chats is handled by get_buddy_tag */
if (type == PURPLE_CONV_TYPE_IM) {
@@ -5785,7 +5859,7 @@ pidgin_conv_write_conv(PurpleConversation *conv, const char *name, const char *a
if (tagname)
tag = gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(buffer), tagname);
else
- tag = get_buddy_tag(conv, name, TRUE);
+ tag = get_buddy_tag(conv, name, flags, TRUE);
if (GTK_IMHTML(gtkconv->imhtml)->show_comments) {
/* The color for the timestamp has to be set in the font-tags, unfortunately.
@@ -5793,19 +5867,10 @@ pidgin_conv_write_conv(PurpleConversation *conv, const char *name, const char *a
* bold. I thought applying the "comment" tag again, which has "weight" set
* to PANGO_WEIGHT_NORMAL, would remove the boldness. But it doesn't. So
* this will have to do. I don't terribly like it. -- sadrul */
- GdkColor *color = NULL;
- gboolean set = FALSE;
- char colcode[] = "COLOR=\"#XXXXXX\"";
- g_object_get(G_OBJECT(tag), "foreground-set", &set, "foreground-gdk", &color, NULL);
- if (set && color)
- g_snprintf(colcode, sizeof(colcode), "COLOR=\"#%02x%02x%02x\"",
- color->red >> 8, color->green >> 8, color->blue >> 8);
- else
- colcode[0] = '\0';
- g_snprintf(buf2, BUF_LONG, "<FONT %s SIZE=\"2\"><!--%s --></FONT>", colcode, mdate);
+ const char *color = get_text_tag_color(tag);
+ g_snprintf(buf2, BUF_LONG, "<FONT %s%s%s SIZE=\"2\"><!--%s --></FONT>",
+ color ? "COLOR=\"" : "", color ? color : "", color ? "\"" : "", mdate);
gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all | GTK_IMHTML_NO_SCROLL);
- if (color)
- gdk_color_free(color);
}
gtk_text_buffer_get_end_iter(buffer, &end);
diff --git a/pidgin/gtkconv.h b/pidgin/gtkconv.h
index df34aa0017..f94b6efc4a 100644
--- a/pidgin/gtkconv.h
+++ b/pidgin/gtkconv.h
@@ -143,7 +143,7 @@ struct _PidginConversation
GtkWidget *tab_label;
GtkWidget *menu_icon;
GtkWidget *menu_label;
-#ifndef PIDGIN_DISABLE_DEPRECATED
+#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKCONV_C_)
/** @deprecated */
GtkSizeGroup *sg;
#else
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
index a0c987771a..41224823a7 100644
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -23,6 +23,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
+#define _PIDGIN_GTKDIALOGS_C_
+
#include "internal.h"
#include "pidgin.h"
@@ -69,37 +71,35 @@ struct artist {
/* Order: Alphabetical by Last Name */
static const struct developer developers[] = {
- {"Daniel 'datallah' Atallah", N_("developer"), NULL},
- {"John 'rekkanoryo' Bailey", N_("developer"), NULL},
- {"Ethan 'Paco-Paco' Blanton", N_("developer"), NULL},
- {"Thomas Butter", N_("developer"), NULL},
+ {"Daniel 'datallah' Atallah", NULL, NULL},
+ {"John 'rekkanoryo' Bailey", N_("bug master"), "rekkanoryo@pidgin.im"},
+ {"Ethan 'Paco-Paco' Blanton", NULL, NULL},
+ {"Hylke Bons", N_("artist"), "h.bons@student.rug.nl"},
+ {"Thomas Butter", NULL, NULL},
/* feel free to not translate this */
- {N_("Ka-Hing Cheung"), N_("developer"), NULL},
- {"Sadrul Habib Chowdhury", N_("developer"), NULL},
- {"Mark 'KingAnt' Doliner", N_("developer"), "mark@kingant.net"},
- {"Sean Egan", N_("developer"), "sean.egan@gmail.com"},
- {"Casey Harkins", N_("developer"), NULL},
- {"Gary 'grim' Kramlich", N_("developer"), NULL},
- {"Richard 'rlaager' Laager", N_("developer"), NULL},
- {"Richard 'wabz' Nelson", N_("developer"), NULL},
- {"Christopher 'siege' O'Brien", N_("developer"), "taliesein@users.sf.net"},
- {"Bartosz Oler", N_("developer"), NULL},
- {"Etan 'deryni' Reisner", N_("developer"), NULL},
- {"Tim 'marv' Ringenbach", N_("developer"), NULL},
- {"Elliott 'QuLogic' Sales de Andrade", N_("developer"), NULL},
+ {N_("Ka-Hing Cheung"), NULL, NULL},
+ {"Sadrul Habib Chowdhury", NULL, NULL},
+ {"Mark 'KingAnt' Doliner", NULL, "mark@kingant.net"},
+ {"Sean Egan", NULL, "sean.egan@gmail.com"},
+ {"Casey Harkins", NULL, NULL},
+ {"Gary 'grim' Kramlich", NULL, "grim@pidgin.im"},
+ {"Richard 'rlaager' Laager", NULL, "rlaager@pidgin.im"},
+ {"Richard 'wabz' Nelson", NULL, NULL},
+ {"Christopher 'siege' O'Brien", NULL, "taliesein@users.sf.net"},
+ {"Bartosz Oler", NULL, NULL},
+ {"Etan 'deryni' Reisner", NULL, NULL},
+ {"Tim 'marv' Ringenbach", NULL, NULL},
+ {"Elliott 'QuLogic' Sales de Andrade", NULL, NULL},
{"Luke 'LSchiere' Schierer", N_("support"), "lschiere@users.sf.net"},
- {"Megan 'Cae' Schneider", N_("support/QA"), NULL},
- {"Evan Schoenberg", N_("developer"), NULL},
- {"Kevin 'SimGuy' Stange", N_("developer & webmaster"), NULL},
- {"Will 'resiak' Thompson", N_("developer"), NULL},
- {"Stu 'nosnilmot' Tomlinson", N_("developer"), NULL},
- {"Nathan 'faceprint' Walp", N_("developer"), NULL},
+ {"Evan Schoenberg", NULL, NULL},
+ {"Kevin 'SimGuy' Stange", N_("webmaster"), NULL},
+ {"Will 'resiak' Thompson", NULL, NULL},
+ {"Stu 'nosnilmot' Tomlinson", NULL, NULL},
{NULL, NULL, NULL}
};
/* Order: Alphabetical by Last Name */
static const struct developer patch_writers[] = {
- {"Felipe 'shx' Contreras", NULL, NULL},
{"Marcus 'malu' Lundblad", NULL, NULL},
{"Dennis 'EvilDennisR' Ristuccia", N_("Senior Contributor/QA"), NULL},
{"Peter 'Fmoo' Ruibal", NULL, NULL},
@@ -114,17 +114,20 @@ static const struct developer retired_developers[] = {
{"Jim Duchek", N_("maintainer"), "jim@linuxpimps.com"},
{"Rob Flynn", N_("maintainer"), NULL},
{"Adam Fritzler", N_("libfaim maintainer"), NULL},
- {"Christian 'ChipX86' Hammond", N_("developer & webmaster"), NULL},
+ {"Christian 'ChipX86' Hammond", N_("webmaster"), NULL},
/* If "lazy bum" translates literally into a serious insult, use something else or omit it. */
{"Syd Logan", N_("hacker and designated driver [lazy bum]"), NULL},
- {"Jim Seymour", N_("XMPP developer"), NULL},
+ {"Megan 'Cae' Schneider", N_("support/QA"), NULL},
+ {"Jim Seymour", N_("XMPP"), NULL},
{"Mark Spencer", N_("original author"), "markster@marko.net"},
+ {"Nathan 'faceprint' Walp", NULL, NULL},
{"Eric Warmenhoven", N_("lead developer"), "warmenhoven@yahoo.com"},
{NULL, NULL, NULL}
};
/* Order: Alphabetical by Last Name */
static const struct developer retired_patch_writers[] = {
+ {"Felipe 'shx' Contreras", NULL, NULL},
{"Decklin Foster", NULL, NULL},
{"Peter 'Bleeter' Lawler", NULL, NULL},
{"Robert 'Robot101' McQueen", NULL, NULL},
@@ -133,7 +136,7 @@ static const struct developer retired_patch_writers[] = {
};
/* Order: Code, then Alphabetical by Last Name */
-static const struct translator current_translators[] = {
+static const struct translator translators[] = {
{N_("Afrikaans"), "af", "Samuel Murray", "afrikaans@gmail.com"},
{N_("Afrikaans"), "af", "Friedel Wolff", "friedel@translate.org.za"},
{N_("Arabic"), "ar", "Khaled Hosny", "khaledhosny@eglug.org"},
@@ -193,6 +196,7 @@ static const struct translator current_translators[] = {
{N_("Macedonian"), "mk", "Arangel Angov ", "arangel@linux.net.mk"},
{N_("Macedonian"), "mk", "Ivana Kirkovska", "ivana.kirkovska@gmail.com"},
{N_("Macedonian"), "mk", "Jovan Naumovski", "jovan@lugola.net"},
+ {"Mongolian", "mn", "gooyo", NULL},
{N_("Bokmål Norwegian"), "nb", "Espen Stefansen", "espenas@gmail.com"},
{N_("Nepali"), "ne", "Shyam Krishna Bal", "shyamkrishna_bal@yahoo.com"},
{N_("Dutch, Flemish"), "nl", "Vincent van Adrighem", "V.vanAdrighem@dirck.mine.nu"},
@@ -284,10 +288,44 @@ static const struct translator past_translators[] = {
{NULL, NULL, NULL, NULL}
};
-static const struct artist artists[] = {
- {"Hylke Bons", "h.bons@student.rug.nl"},
- {NULL, NULL}
-};
+static void
+add_developers(GString *str, const struct developer *list)
+{
+ for (; list->name != NULL; list++) {
+ if (list->email != NULL) {
+ g_string_append_printf(str, " <a href=\"mailto:%s\">%s</a>%s%s%s<br/>",
+ list->email, _(list->name),
+ list->role ? " (" : "",
+ list->role ? _(list->role) : "",
+ list->role ? ")" : "");
+ } else {
+ g_string_append_printf(str, " %s%s%s%s<br/>",
+ _(list->name),
+ list->role ? " (" : "",
+ list->role ? _(list->role) : "",
+ list->role ? ")" : "");
+ }
+ }
+}
+
+static void
+add_translators(GString *str, const struct translator *list)
+{
+ for (; list->language != NULL; list++) {
+ if (list->email != NULL) {
+ g_string_append_printf(str, " <b>%s (%s)</b> - <a href=\"mailto:%s\">%s</a><br/>",
+ _(list->language),
+ list->abbr,
+ list->email,
+ _(list->name));
+ } else {
+ g_string_append_printf(str, " <b>%s (%s)</b> - %s<br/>",
+ _(list->language),
+ list->abbr,
+ _(list->name));
+ }
+ }
+}
void
pidgin_dialogs_destroy_all()
@@ -354,7 +392,6 @@ void pidgin_dialogs_about()
GtkWidget *button;
GtkTextIter iter;
GString *str;
- int i;
AtkObject *obj;
char* filename, *tmp;
GdkPixbuf *pixbuf;
@@ -425,116 +462,37 @@ void pidgin_dialogs_about()
/* Current Developers */
g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
_("Current Developers"));
- for (i = 0; developers[i].name != NULL; i++) {
- if (developers[i].email != NULL) {
- g_string_append_printf(str, " %s (%s) &lt;<a href=\"mailto:%s\">%s</a>&gt;<br/>",
- _(developers[i].name), _(developers[i].role),
- developers[i].email, developers[i].email);
- } else {
- g_string_append_printf(str, " %s (%s)<br/>",
- _(developers[i].name), _(developers[i].role));
- }
- }
+ add_developers(str, developers);
g_string_append(str, "<BR/>");
/* Crazy Patch Writers */
g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
_("Crazy Patch Writers"));
- for (i = 0; patch_writers[i].name != NULL; i++) {
- if (patch_writers[i].email != NULL) {
- g_string_append_printf(str, " %s &lt;<a href=\"mailto:%s\">%s</a>&gt;<br/>",
- patch_writers[i].name,
- patch_writers[i].email, patch_writers[i].email);
- } else {
- g_string_append_printf(str, " %s<br/>",
- patch_writers[i].name);
- }
- }
+ add_developers(str, patch_writers);
g_string_append(str, "<BR/>");
/* Retired Developers */
g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
_("Retired Developers"));
- for (i = 0; retired_developers[i].name != NULL; i++) {
- if (retired_developers[i].email != NULL) {
- g_string_append_printf(str, " %s (%s) &lt;<a href=\"mailto:%s\">%s</a>&gt;<br/>",
- retired_developers[i].name, _(retired_developers[i].role),
- retired_developers[i].email, retired_developers[i].email);
- } else {
- g_string_append_printf(str, " %s (%s)<br/>",
- retired_developers[i].name, _(retired_developers[i].role));
- }
- }
+ add_developers(str, retired_developers);
g_string_append(str, "<BR/>");
/* Retired Crazy Patch Writers */
g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
_("Retired Crazy Patch Writers"));
- for (i = 0; retired_patch_writers[i].name != NULL; i++) {
- if (retired_patch_writers[i].email != NULL) {
- g_string_append_printf(str, " %s &lt;<a href=\"mailto:%s\">%s</a>&gt;<br/>",
- retired_patch_writers[i].name,
- retired_patch_writers[i].email, retired_patch_writers[i].email);
- } else {
- g_string_append_printf(str, " %s<br/>",
- retired_patch_writers[i].name);
- }
- }
- g_string_append(str, "<BR/>");
-
- /* Artists */
- g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
- _("Artists"));
- for (i = 0; artists[i].name != NULL; i++) {
- if (artists[i].email != NULL) {
- g_string_append_printf(str, " %s &lt;<a href=\"mailto:%s\">%s</a>&gt;<br/>",
- artists[i].name,
- artists[i].email, artists[i].email);
- } else {
- g_string_append_printf(str, " %s<br/>",
- artists[i].name);
- }
- }
+ add_developers(str, retired_patch_writers);
g_string_append(str, "<BR/>");
/* Current Translators */
g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
_("Current Translators"));
- for (i = 0; current_translators[i].language != NULL; i++) {
- if (current_translators[i].email != NULL) {
- g_string_append_printf(str, " <b>%s (%s)</b> - %s &lt;<a href=\"mailto:%s\">%s</a>&gt;<br/>",
- _(current_translators[i].language),
- current_translators[i].abbr,
- _(current_translators[i].name),
- current_translators[i].email,
- current_translators[i].email);
- } else {
- g_string_append_printf(str, " <b>%s (%s)</b> - %s<br/>",
- _(current_translators[i].language),
- current_translators[i].abbr,
- _(current_translators[i].name));
- }
- }
+ add_translators(str, translators);
g_string_append(str, "<BR/>");
/* Past Translators */
g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
_("Past Translators"));
- for (i = 0; past_translators[i].language != NULL; i++) {
- if (past_translators[i].email != NULL) {
- g_string_append_printf(str, " <b>%s (%s)</b> - %s &lt;<a href=\"mailto:%s\">%s</a>&gt;<br/>",
- _(past_translators[i].language),
- past_translators[i].abbr,
- _(past_translators[i].name),
- past_translators[i].email,
- past_translators[i].email);
- } else {
- g_string_append_printf(str, " <b>%s (%s)</b> - %s<br/>",
- _(past_translators[i].language),
- past_translators[i].abbr,
- _(past_translators[i].name));
- }
- }
+ add_translators(str, past_translators);
g_string_append(str, "<BR/>");
g_string_append_printf(str, "<FONT SIZE=\"4\">%s</FONT><br/>", _("Debugging Information"));
@@ -1011,7 +969,7 @@ pidgin_dialogs_log(void)
static void
pidgin_dialogs_alias_contact_cb(PurpleContact *contact, const char *new_alias)
{
- purple_contact_set_alias(contact, new_alias);
+ purple_blist_alias_contact(contact, new_alias);
}
void
diff --git a/pidgin/gtkdialogs.h b/pidgin/gtkdialogs.h
index a663a679e3..3a66249652 100644
--- a/pidgin/gtkdialogs.h
+++ b/pidgin/gtkdialogs.h
@@ -38,11 +38,13 @@ void pidgin_dialogs_im_with_user(PurpleAccount *, const char *);
void pidgin_dialogs_info(void);
void pidgin_dialogs_log(void);
+#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKDIALOGS_C_)
/**
* @deprecated This function is no longer used and will be removed in
* Pidgin 3.0.0 unless there is sufficient demand to keep it.
*/
void pidgin_dialogs_alias_contact(PurpleContact *);
+#endif
void pidgin_dialogs_alias_buddy(PurpleBuddy *);
void pidgin_dialogs_alias_chat(PurpleChat *);
@@ -55,9 +57,12 @@ void pidgin_dialogs_merge_groups(PurpleGroup *, const char *);
/* Everything after this should probably be moved elsewhere */
#ifndef PIDGIN_DISABLE_DEPRECATED
+/* This PIDGIN_DISABLE_DEPRECATED doesn't need to be deactivated by
+ * _PIDGIN_GTKDIALOGS_C_, because it shouldn't be using this macro. */
#define PIDGIN_DIALOG(x) x = gtk_window_new(GTK_WINDOW_TOPLEVEL); \
gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG)
#endif
+
#define PIDGIN_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED)
#endif /* _PIDGINDIALOGS_H_ */
diff --git a/pidgin/gtkimhtml.c b/pidgin/gtkimhtml.c
index bc3bfa60be..a5ee1d9460 100644
--- a/pidgin/gtkimhtml.c
+++ b/pidgin/gtkimhtml.c
@@ -24,6 +24,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*
*/
+#define _PIDGIN_GTKIMHTML_C_
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -348,9 +349,7 @@ gtk_smiley_tree_destroy (GtkSmileyTree *tree)
g_string_free (t->values, TRUE);
g_free (t->children);
}
- if (t && t->image) {
- t->image->imhtml = NULL;
- }
+
g_free (t);
}
}
@@ -1976,7 +1975,7 @@ static void gtk_smiley_tree_remove (GtkSmileyTree *tree,
pos = strchr (t->values->str, *x);
if (pos)
- t = t->children [(unsigned int) pos - (unsigned int) t->values->str];
+ t = t->children [pos - t->values->str];
else
return;
@@ -2522,6 +2521,78 @@ void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml, gboolean smooth)
}
}
+/* CSS colors are either rgb (x,y,z) or #hex
+ * we need to convert to hex if it is RGB */
+static gchar*
+parse_css_color(gchar *in_color)
+{
+ char *tmp = in_color;
+
+ if (*tmp == 'r' && *(++tmp) == 'g' && *(++tmp) == 'b' && *(++tmp)) {
+ int rgbval[] = {0, 0, 0};
+ int count = 0;
+ const char *v_start;
+
+ while (*tmp && g_ascii_isspace(*tmp))
+ tmp++;
+ if (*tmp != '(') {
+ /* We don't support rgba() */
+ purple_debug_warning("gtkimhtml", "Invalid rgb CSS color in '%s'!\n", in_color);
+ return in_color;
+ }
+ tmp++;
+
+ while (count < 3) {
+ /* Skip any leading spaces */
+ while (*tmp && g_ascii_isspace(*tmp))
+ tmp++;
+
+ /* Find the subsequent contiguous digits */
+ v_start = tmp;
+ if (*v_start == '-')
+ tmp++;
+ while (*tmp && g_ascii_isdigit(*tmp))
+ tmp++;
+
+ if (tmp != v_start) {
+ char prev = *tmp;
+ *tmp = '\0';
+ rgbval[count] = atoi(v_start);
+ *tmp = prev;
+
+ /* deal with % */
+ while (*tmp && g_ascii_isspace(*tmp))
+ tmp++;
+ if (*tmp == '%') {
+ rgbval[count] = (rgbval[count] / 100.0) * 255;
+ tmp++;
+ }
+ } else {
+ purple_debug_warning("gtkimhtml", "Invalid rgb CSS color in '%s'!\n", in_color);
+ return in_color;
+ }
+
+ if (rgbval[count] > 255) {
+ rgbval[count] = 255;
+ } else if (rgbval[count] < 0) {
+ rgbval[count] = 0;
+ }
+
+ while (*tmp && g_ascii_isspace(*tmp))
+ tmp++;
+ if (*tmp == ',')
+ tmp++;
+
+ count++;
+ }
+
+ g_free(in_color);
+ return g_strdup_printf("#%02X%02X%02X", rgbval[0], rgbval[1], rgbval[2]);
+ }
+
+ return in_color;
+}
+
void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml,
const gchar *text,
GtkIMHtmlOptions options,
@@ -2982,7 +3053,7 @@ void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml,
oldfont = fonts->data;
if (color && !(options & GTK_IMHTML_NO_COLOURS) && (imhtml->format_functions & GTK_IMHTML_FORECOLOR)) {
- font->fore = color;
+ font->fore = parse_css_color(color);
gtk_imhtml_toggle_forecolor(imhtml, font->fore);
} else {
if (oldfont && oldfont->fore)
@@ -2991,7 +3062,7 @@ void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml,
}
if (background && !(options & GTK_IMHTML_NO_COLOURS) && (imhtml->format_functions & GTK_IMHTML_BACKCOLOR)) {
- font->back = background;
+ font->back = parse_css_color(background);
gtk_imhtml_toggle_backcolor(imhtml, font->back);
} else {
if (oldfont && oldfont->back)
diff --git a/pidgin/gtkimhtml.h b/pidgin/gtkimhtml.h
index 725e71eddd..ef18d99445 100644
--- a/pidgin/gtkimhtml.h
+++ b/pidgin/gtkimhtml.h
@@ -130,7 +130,7 @@ struct _GtkIMHtml {
GtkTextTag *link;
} edit;
-#ifndef PIDGIN_DISABLE_DEPRECATED
+#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKIMHTML_C_)
/** @deprecated */
char *clipboard_text_string;
/** @deprecated */
diff --git a/pidgin/gtkprefs.c b/pidgin/gtkprefs.c
index 8c91e6b7a7..167a32ff92 100644
--- a/pidgin/gtkprefs.c
+++ b/pidgin/gtkprefs.c
@@ -1836,14 +1836,14 @@ mute_changed_cb(const char *pref_name,
gpointer data)
{
GtkToggleButton *button = data;
- gboolean muted = val;
+ gboolean muted = GPOINTER_TO_INT(val);
g_return_if_fail(!strcmp (pref_name, PIDGIN_PREFS_ROOT "/sound/mute"));
/* Block the handler that re-sets the preference. */
- g_signal_handlers_block_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, pref_name);
+ g_signal_handlers_block_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (gpointer)pref_name);
gtk_toggle_button_set_active (button, muted);
- g_signal_handlers_unblock_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, pref_name);
+ g_signal_handlers_unblock_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (gpointer)pref_name);
}
diff --git a/pidgin/gtkstatusbox.c b/pidgin/gtkstatusbox.c
index 734b4dcec8..53760b468a 100644
--- a/pidgin/gtkstatusbox.c
+++ b/pidgin/gtkstatusbox.c
@@ -398,6 +398,12 @@ setup_icon_box(PidginStatusBox *status_box)
gtk_widget_set_parent(status_box->icon_box, GTK_WIDGET(status_box));
gtk_widget_show(status_box->icon_box);
+#if GTK_CHECK_VERSION(2,12,0)
+ gtk_widget_set_tooltip_text(status_box->icon_box,
+ status_box->account ? _("Click to change your buddyicon for this account.") :
+ _("Click to change your buddyicon for all accounts."));
+#endif
+
if (status_box->account &&
!purple_account_get_bool(status_box->account, "use-global-buddyicon", TRUE))
{
@@ -1199,69 +1205,22 @@ cache_pixbufs(PidginStatusBox *status_box)
}
status_box->connecting_index = 0;
- status_box->connecting_pixbufs[0] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT0,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[1] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT1,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[2] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT2,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[3] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT3,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[4] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT4,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[5] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT5,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[6] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT6,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[7] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT7,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[8] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT8,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[9] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT9,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[10] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT10,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[11] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT11,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[12] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT12,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[13] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT13,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[14] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT14,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[15] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT15,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[16] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT16,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[17] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT17,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[18] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT18,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[19] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT19,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[20] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT20,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[21] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT21,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[22] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT22,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[23] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT23,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[24] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT24,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[25] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT25,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[26] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT26,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[27] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT27,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[28] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT28,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[29] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT29,
- icon_size, "PidginStatusBox");
- status_box->connecting_pixbufs[30] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_CONNECT30,
- icon_size, "PidginStatusBox");
+#define CACHE_ANIMATION_CONNECT(index) \
+ status_box->connecting_pixbufs[index] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox),\
+ PIDGIN_STOCK_ANIMATION_CONNECT ## index, icon_size, "PidginStatusBox")
+
+ CACHE_ANIMATION_CONNECT(0);
+ CACHE_ANIMATION_CONNECT(1);
+ CACHE_ANIMATION_CONNECT(2);
+ CACHE_ANIMATION_CONNECT(3);
+ CACHE_ANIMATION_CONNECT(4);
+ CACHE_ANIMATION_CONNECT(5);
+ CACHE_ANIMATION_CONNECT(6);
+ CACHE_ANIMATION_CONNECT(7);
+ CACHE_ANIMATION_CONNECT(8);
+
+#undef CACHE_ANIMATION_CONNECT
for (i = 0; i < G_N_ELEMENTS(status_box->typing_pixbufs); i++) {
if (status_box->typing_pixbufs[i] != NULL)
@@ -1269,16 +1228,18 @@ cache_pixbufs(PidginStatusBox *status_box)
}
status_box->typing_index = 0;
- status_box->typing_pixbufs[0] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_TYPING0,
- icon_size, "PidginStatusBox");
- status_box->typing_pixbufs[1] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_TYPING1,
- icon_size, "PidginStatusBox");
- status_box->typing_pixbufs[2] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_TYPING2,
- icon_size, "PidginStatusBox");
- status_box->typing_pixbufs[3] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_TYPING3,
- icon_size, "PidginStatusBox");
- status_box->typing_pixbufs[4] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_ANIMATION_TYPING4,
- icon_size, "PidginStatusBox");
+
+#define CACHE_ANIMATION_TYPING(index) \
+ status_box->typing_pixbufs[index] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), \
+ PIDGIN_STOCK_ANIMATION_TYPING ## index, icon_size, "PidginStatusBox")
+
+ CACHE_ANIMATION_TYPING(0);
+ CACHE_ANIMATION_TYPING(1);
+ CACHE_ANIMATION_TYPING(2);
+ CACHE_ANIMATION_TYPING(3);
+ CACHE_ANIMATION_TYPING(4);
+
+#undef CACHE_ANIMATION_TYPING
}
static void account_enabled_cb(PurpleAccount *acct, PidginStatusBox *status_box)
@@ -2712,9 +2673,15 @@ static void pidgin_status_box_changed(PidginStatusBox *status_box)
{
if (status_box->imhtml_visible)
{
+ GtkTextIter start, end;
+ GtkTextBuffer *buffer;
gtk_widget_show_all(status_box->vbox);
status_box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box);
gtk_widget_grab_focus(status_box->imhtml);
+ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(status_box->imhtml));
+ gtk_text_buffer_get_bounds(buffer, &start, &end);
+ gtk_text_buffer_move_mark(buffer, gtk_text_buffer_get_mark(buffer, "insert"), &end);
+ gtk_text_buffer_move_mark(buffer, gtk_text_buffer_get_mark(buffer, "selection_bound"), &start);
}
else
{
diff --git a/pidgin/gtkstatusbox.h b/pidgin/gtkstatusbox.h
index b685870361..bd116b72b1 100644
--- a/pidgin/gtkstatusbox.h
+++ b/pidgin/gtkstatusbox.h
@@ -111,7 +111,7 @@ struct _PidginStatusBox
GdkPixbuf *error_pixbuf;
int connecting_index;
- GdkPixbuf *connecting_pixbufs[31];
+ GdkPixbuf *connecting_pixbufs[9];
int typing_index;
GdkPixbuf *typing_pixbufs[6];
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
index 9dd223edc9..6667ce5722 100644
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -23,6 +23,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
+#define _PIDGIN_GTKUTILS_C_
+
#include "internal.h"
#include "pidgin.h"
@@ -2878,7 +2880,6 @@ gdk_pixbuf_new_from_file_at_scale(const char *filename, int width, int height,
}
#endif /* ! Gtk 2.6.0 */
-#ifndef PURPLE_DISABLE_DEPRECATED
void pidgin_set_custom_buddy_icon(PurpleAccount *account, const char *who, const char *filename)
{
PurpleBuddy *buddy;
@@ -2893,7 +2894,6 @@ void pidgin_set_custom_buddy_icon(PurpleAccount *account, const char *who, const
contact = purple_buddy_get_contact(buddy);
purple_buddy_icons_node_set_custom_icon_from_file((PurpleBlistNode*)contact, filename);
}
-#endif
char *pidgin_make_pretty_arrows(const char *str)
{
diff --git a/pidgin/gtkutils.h b/pidgin/gtkutils.h
index 7cad487585..ace6bd4d2e 100644
--- a/pidgin/gtkutils.h
+++ b/pidgin/gtkutils.h
@@ -638,7 +638,7 @@ GdkPixbuf *gdk_pixbuf_new_from_file_at_scale(const char *filename, int width, in
GError **error);
#endif
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKUTILS_C_)
/**
* Set or unset a custom buddyicon for a user.
*
diff --git a/pidgin/pidgintooltip.c b/pidgin/pidgintooltip.c
index 964fb0cca8..91b4bd0a3e 100644
--- a/pidgin/pidgintooltip.c
+++ b/pidgin/pidgintooltip.c
@@ -30,6 +30,9 @@
#include "pidgintooltip.h"
#include "debug.h"
+static gboolean enable_tooltips;
+static int tooltip_delay = -1;
+
struct
{
GtkWidget *widget;
@@ -56,6 +59,27 @@ typedef struct
} PidginTooltipData;
static void
+initialize_tooltip_delay()
+{
+#if GTK_CHECK_VERSION(2,14,0)
+ GtkSettings *settings;
+#endif
+
+ if (tooltip_delay != -1)
+ return;
+
+#if GTK_CHECK_VERSION(2,14,0)
+ settings = gtk_settings_get_default();
+
+ g_object_get(settings, "gtk-enable-tooltips", &enable_tooltips, NULL);
+ g_object_get(settings, "gtk-tooltip-timeout", &tooltip_delay, NULL);
+#else
+ tooltip_delay = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/tooltip_delay");
+ enable_tooltips = (tooltip_delay != 0);
+#endif
+}
+
+static void
destroy_tooltip_data(PidginTooltipData *data)
{
gtk_tree_path_free(data->common.treeview.path);
@@ -280,14 +304,12 @@ static gboolean
row_motion_cb(GtkWidget *tv, GdkEventMotion *event, gpointer userdata)
{
GtkTreePath *path;
- int delay;
if (event->window != gtk_tree_view_get_bin_window(GTK_TREE_VIEW(tv)))
return FALSE; /* The cursor is probably on the TreeView's header. */
- /* XXX: probably use something more generic? */
- delay = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/tooltip_delay");
- if (delay == 0)
+ initialize_tooltip_delay();
+ if (!enable_tooltips)
return FALSE;
if (pidgin_tooltip.timeout) {
@@ -307,7 +329,7 @@ row_motion_cb(GtkWidget *tv, GdkEventMotion *event, gpointer userdata)
gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, &pidgin_tooltip.tip_rect);
gtk_tree_path_free(path);
- pidgin_tooltip.timeout = g_timeout_add(delay, (GSourceFunc)pidgin_tooltip_timeout, userdata);
+ pidgin_tooltip.timeout = g_timeout_add(tooltip_delay, (GSourceFunc)pidgin_tooltip_timeout, userdata);
return FALSE;
}
@@ -337,13 +359,13 @@ gboolean pidgin_tooltip_setup_for_treeview(GtkWidget *tree, gpointer userdata,
static gboolean
widget_motion_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
{
- int delay = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/tooltip_delay");
+ initialize_tooltip_delay();
pidgin_tooltip_destroy();
- if (delay == 0)
+ if (!enable_tooltips)
return FALSE;
- pidgin_tooltip.timeout = g_timeout_add(delay, (GSourceFunc)pidgin_tooltip_timeout, data);
+ pidgin_tooltip.timeout = g_timeout_add(tooltip_delay, (GSourceFunc)pidgin_tooltip_timeout, data);
return FALSE;
}
diff --git a/pidgin/plugins/notify.c b/pidgin/plugins/notify.c
index 7ad0b7d211..3924556758 100644
--- a/pidgin/plugins/notify.c
+++ b/pidgin/plugins/notify.c
@@ -557,9 +557,7 @@ handle_count_xprop(PidginWindow *purplewin)
static void
handle_urgent(PidginWindow *win, gboolean set)
{
-#ifndef _WIN32
pidgin_set_urgent(GTK_WINDOW(win->window), set);
-#endif
}
static void
@@ -767,12 +765,14 @@ get_config_frame(PurplePlugin *plugin)
/* Urgent method button */
toggle = gtk_check_button_new_with_mnemonic(_("Set window manager \"_URGENT\" hint"));
+#else
+ toggle = gtk_check_button_new_with_mnemonic(_("_Flash window"));
+#endif
gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle),
purple_prefs_get_bool("/plugins/gtk/X11/notify/method_urgent"));
g_signal_connect(G_OBJECT(toggle), "toggled",
G_CALLBACK(method_toggle_cb), "method_urgent");
-#endif
/* Raise window method button */
toggle = gtk_check_button_new_with_mnemonic(_("R_aise conversation window"));
diff --git a/pidgin/plugins/perl/common/gtkmodule.h b/pidgin/plugins/perl/common/gtkmodule.h
index 5b566babae..7151f077fb 100644
--- a/pidgin/plugins/perl/common/gtkmodule.h
+++ b/pidgin/plugins/perl/common/gtkmodule.h
@@ -1,3 +1,7 @@
+/* Allow the Perl code to see deprecated functions, so we can continue to
+ * export them to Perl plugins. */
+#undef PIDGIN_DISABLE_DEPRECATED
+
typedef struct group *Pidgin__Group;
#define group perl_group
diff --git a/pidgin/win32/nsis/translations/finnish.nsh b/pidgin/win32/nsis/translations/finnish.nsh
index 3457496b78..bb11b6381e 100644
--- a/pidgin/win32/nsis/translations/finnish.nsh
+++ b/pidgin/win32/nsis/translations/finnish.nsh
@@ -1,16 +1,18 @@
;;
-;; finish.nsh
+;; finnish.nsh
;;
-;; Finish language strings for the Windows Pidgin NSIS installer.
+;; Finnish language strings for the Windows Pidgin NSIS installer.
;; Windows Code page: 1252
;;
;; Authors: Toni "Daigle" Impiö <toni.impio@pp1.inet.fi>
;; Timo Jyrinki <timo.jyrinki@iki.fi>, 2008
;;
-;; Version 2
+;; Version 3
;;
-; Startup GTK+ check
+; Startup checks
+!define INSTALLER_IS_RUNNING "Asennusohjelma on jo käynnissä."
+!define PIDGIN_IS_RUNNING "Pidgin on tällä hetkellä käynnissä. Poistu Pidginistä ja yritä uudelleen."
!define GTK_INSTALLER_NEEDED "Ajonaikainen GTK+-ympäristö joko puuttuu tai tarvitsee päivitystä.$\rOle hyvä ja asenna v${GTK_MIN_VERSION} tai uudempi ajonaikainen GTK+-ympäristö."
; License Page
@@ -19,12 +21,12 @@
; Components Page
!define PIDGIN_SECTION_TITLE "Pidgin-pikaviestin (vaaditaan)"
-!define GTK_SECTION_TITLE "Ajonaikainen GTK+-ympäristö (vaaditaan)"
+!define GTK_SECTION_TITLE "Ajonaikainen GTK-ympäristö (vaaditaan)"
!define PIDGIN_SHORTCUTS_SECTION_TITLE "Pikakuvakkeet"
!define PIDGIN_DESKTOP_SHORTCUT_SECTION_TITLE "Työpöytä"
!define PIDGIN_STARTMENU_SHORTCUT_SECTION_TITLE "Käynnistysvalikko"
!define PIDGIN_SECTION_DESCRIPTION "Pidginin ytimen tiedostot ja kirjastot"
-!define GTK_SECTION_DESCRIPTION "Monialustainen Pidginin käyttämä käyttöliittymäkirjasto"
+!define GTK_SECTION_DESCRIPTION "Pidginin käyttämä monialustainen käyttöliittymäkirjasto"
!define PIDGIN_SHORTCUTS_SECTION_DESCRIPTION "Pikakuvakkeet Pidginin käynnistämiseksi"
!define PIDGIN_DESKTOP_SHORTCUT_DESC "Tee Pidgin-pikakuvake työpöydälle"
@@ -53,4 +55,26 @@
!define PIDGIN_SPELLCHECK_DICT_ERROR "Virhe asennettaessa oikoluvun sanakirjaa"
!define PIDGIN_SPELLCHECK_SECTION_DESCRIPTION "Tuki oikoluvulle. (Asennukseen tarvitaan Internet-yhteys)"
!define ASPELL_INSTALL_FAILED "Asennus epäonnistui"
+!define PIDGIN_SPELLCHECK_BRETON "bretoni"
+!define PIDGIN_SPELLCHECK_CATALAN "katalaani"
+!define PIDGIN_SPELLCHECK_CZECH "tshekki"
+!define PIDGIN_SPELLCHECK_WELSH "kymri"
+!define PIDGIN_SPELLCHECK_DANISH "tanska"
+!define PIDGIN_SPELLCHECK_GERMAN "saksa"
+!define PIDGIN_SPELLCHECK_GREEK "kreikka"
+!define PIDGIN_SPELLCHECK_ENGLISH "englanti"
+!define PIDGIN_SPELLCHECK_ESPERANTO "esperanto"
+!define PIDGIN_SPELLCHECK_SPANISH "espanja"
+!define PIDGIN_SPELLCHECK_FAROESE "fääri"
+!define PIDGIN_SPELLCHECK_FRENCH "ranska"
+!define PIDGIN_SPELLCHECK_ITALIAN "italia"
+!define PIDGIN_SPELLCHECK_DUTCH "hollanti"
+!define PIDGIN_SPELLCHECK_NORWEGIAN "norja"
+!define PIDGIN_SPELLCHECK_POLISH "puola"
+!define PIDGIN_SPELLCHECK_PORTUGUESE "portugali"
+!define PIDGIN_SPELLCHECK_ROMANIAN "romania"
+!define PIDGIN_SPELLCHECK_RUSSIAN "venäjä"
+!define PIDGIN_SPELLCHECK_SLOVAK "slovakia"
+!define PIDGIN_SPELLCHECK_SWEDISH "ruotsi"
+!define PIDGIN_SPELLCHECK_UKRAINIAN "ukraina"
diff --git a/pidgin/win32/winpidgin.c b/pidgin/win32/winpidgin.c
index 7e14883866..74917a750d 100644
--- a/pidgin/win32/winpidgin.c
+++ b/pidgin/win32/winpidgin.c
@@ -212,6 +212,9 @@ static void portable_mode_dll_prep(const char *pidgin_dir) {
return;
}
+ /* Set $HOME so that the GTK+ settings get stored in the right place */
+ _snprintf(path2, sizeof(path2), "HOME=%s", path);
+ _putenv(path2);
/* Set up the settings dir base to be \\path\to
* The actual settings dir will be \\path\to\.purple */