annotate pidgin/gtkstatus-icon-theme.c @ 29244:50256289be74

*** Plucked rev 1cd91846f484f7d7090d25b0e65d851a0dadcb90 (e894e488d2219b69664de488ee1af7f275f8817d): Improved handling of the 0x00d charset in AIM, which is sent by mobile devices speaking ISO-8859-1. Try UTF-8 first (the encoding sent by iChat in a Direct IM with non-ASCII characters), then fall back to ISO-8859-1. Fixes #a13544, a bug created with the fix for iChat DIM encoding new in libpurple 2.6.4 applied changes from 6f3a1b3c52803e11d4cda1e0537c1270599e8d8e through ed0a2a35c7e22519df27c50069c22b03e01c027a *** Plucked rev e8ba4281669ae86859fd4e29f5d8ea0286af3903 (f05c54b03e6bbfdbff38c01697fbd353a969e05e): Changelog the AIM/ICQ issue. Refs #10900.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 07 Jan 2010 23:43:26 +0000
parents 0c7b74fc558e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
1 /*
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
2 * Status Icon Themes for Pidgin
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
3 *
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
4 * Pidgin is the legal property of its developers, whose names are too numerous
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
6 * source distribution.
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
7 *
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
11 * (at your option) any later version.
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
12 *
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
16 * GNU General Public License for more details.
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
17 *
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
21 */
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
22
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
23 #include "gtkstatus-icon-theme.h"
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
24
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
25 /******************************************************************************
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
26 * Globals
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
27 *****************************************************************************/
25402
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
28
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
29 static GObjectClass *parent_class = NULL;
23703
1a4417138a8f clean up formatting, and added render settings for the names/markup on the blist
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23697
diff changeset
30
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
31 /******************************************************************************
25402
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
32 * GObject Stuff
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
33 *****************************************************************************/
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
34
25402
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
35 static void
23703
1a4417138a8f clean up formatting, and added render settings for the names/markup on the blist
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23697
diff changeset
36 pidgin_status_icon_theme_finalize(GObject *obj)
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
37 {
23703
1a4417138a8f clean up formatting, and added render settings for the names/markup on the blist
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23697
diff changeset
38 parent_class->finalize(obj);
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
39 }
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
40
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
41 static void
23703
1a4417138a8f clean up formatting, and added render settings for the names/markup on the blist
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23697
diff changeset
42 pidgin_status_icon_theme_class_init(PidginStatusIconThemeClass *klass)
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
43 {
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
44 GObjectClass *obj_class = G_OBJECT_CLASS(klass);
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
45
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
46 parent_class = g_type_class_peek_parent(klass);
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
47
25402
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
48 obj_class->finalize = pidgin_status_icon_theme_finalize;
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
49 }
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
50
25402
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
51 GType
23703
1a4417138a8f clean up formatting, and added render settings for the names/markup on the blist
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23697
diff changeset
52 pidgin_status_icon_theme_get_type(void)
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
53 {
25402
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
54 static GType type = 0;
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
55 if (type == 0) {
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
56 static const GTypeInfo info = {
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
57 sizeof (PidginStatusIconThemeClass),
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
58 NULL, /* base_init */
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
59 NULL, /* base_finalize */
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
60 (GClassInitFunc)pidgin_status_icon_theme_class_init, /* class_init */
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
61 NULL, /* class_finalize */
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
62 NULL, /* class_data */
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
63 sizeof (PidginStatusIconTheme),
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
64 0, /* n_preallocs */
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
65 NULL,
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
66 NULL, /* value table */
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
67 };
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
68 type = g_type_register_static(PIDGIN_TYPE_ICON_THEME,
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
69 "PidginStatusIconTheme", &info, 0);
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
70 }
0c7b74fc558e Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents: 23703
diff changeset
71 return type;
23697
0bbfb20bad19 Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
72 }