annotate pidgin/plugins/themeedit.c @ 32799:5bd5e024c977

Yahoo: Use file-transfer accessor functions.
author andrew.victor@mxit.com
date Sun, 30 Oct 2011 16:00:14 +0000
parents 3c1563a54785
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
1 /* Pidgin
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
2 *
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
3 * Pidgin is the legal property of its developers, whose names are too numerous
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
5 * source distribution.
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
6 *
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
10 * (at your option) any later version.
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
11 *
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
15 * GNU General Public License for more details.
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
16 *
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
20 */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
21 #include "internal.h"
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
22 #include "pidgin.h"
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
23 #include "version.h"
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
24
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
25 #include "theme-manager.h"
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
26
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
27 #include "gtkblist.h"
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
28 #include "gtkblist-theme.h"
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
29 #include "gtkutils.h"
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
30 #include "gtkplugin.h"
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
31
26662
0dddfdb3a24a A status-icon theme editor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26661
diff changeset
32 #define PLUGIN_ID "gtk-theme-editor"
0dddfdb3a24a A status-icon theme editor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26661
diff changeset
33
0dddfdb3a24a A status-icon theme editor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26661
diff changeset
34 #include "themeedit-icon.h"
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
35
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
36 static gboolean
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
37 prop_type_is_color(PidginBlistTheme *theme, const char *prop)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
38 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
39 PidginBlistThemeClass *klass = PIDGIN_BLIST_THEME_GET_CLASS(theme);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
40 GParamSpec *spec = g_object_class_find_property(G_OBJECT_CLASS(klass), prop);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
41
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
42 return G_IS_PARAM_SPEC_BOXED(spec);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
43 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
44
26720
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
45 #ifdef NOT_SADRUL
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
46 static void
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
47 save_blist_theme(GtkWidget *w, GtkWidget *window)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
48 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
49 /* TODO: SAVE! */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
50 gtk_widget_destroy(window);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
51 }
26720
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
52 #endif
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
53
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
54 static void
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
55 close_blist_theme(GtkWidget *w, GtkWidget *window)
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
56 {
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
57 gtk_widget_destroy(window);
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
58 }
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
59
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
60 static void
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
61 theme_color_selected(GtkDialog *dialog, gint response, const char *prop)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
62 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
63 if (response == GTK_RESPONSE_OK) {
30137
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
64 GtkWidget *colorsel;
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
65 GdkColor color;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
66 PidginBlistTheme *theme;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
67
30137
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
68 #if GTK_CHECK_VERSION(2,14,0)
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
69 colorsel =
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
70 gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog));
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
71 #else
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
72 colorsel = GTK_COLOR_SELECTION_DIALOG(dialog)->colorsel;
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
73 #endif
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
74 gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(colorsel), &color);
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
75
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
76 theme = pidgin_blist_get_theme();
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
77
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
78 if (prop_type_is_color(theme, prop)) {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
79 g_object_set(G_OBJECT(theme), prop, &color, NULL);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
80 } else {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
81 PidginThemeFont *font = NULL;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
82 g_object_get(G_OBJECT(theme), prop, &font, NULL);
26659
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
83 if (!font) {
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
84 font = pidgin_theme_font_new(NULL, &color);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
85 g_object_set(G_OBJECT(theme), prop, font, NULL);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
86 pidgin_theme_font_free(font);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
87 } else {
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
88 pidgin_theme_font_set_color(font, &color);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
89 }
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
90 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
91 pidgin_blist_set_theme(theme);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
92 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
93
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
94 gtk_widget_destroy(GTK_WIDGET(dialog));
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
95 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
96
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
97 static void
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
98 theme_font_face_selected(GtkWidget *dialog, gint response, gpointer font)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
99 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
100 if (response == GTK_RESPONSE_OK || response == GTK_RESPONSE_APPLY) {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
101 const char *fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(dialog));
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
102 pidgin_theme_font_set_font_face(font, fontname);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
103 pidgin_blist_refresh(purple_get_blist());
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
104 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
105 gtk_widget_destroy(dialog);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
106 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
107
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
108 static void
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
109 theme_font_select_face(GtkWidget *widget, gpointer prop)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
110 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
111 GtkWidget *dialog;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
112 PidginBlistTheme *theme;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
113 PidginThemeFont *font = NULL;
26659
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
114 const char *face;
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
115
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
116 theme = pidgin_blist_get_theme();
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
117 g_object_get(G_OBJECT(theme), prop, &font, NULL);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
118
26659
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
119 if (!font) {
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
120 font = pidgin_theme_font_new(NULL, NULL);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
121 g_object_set(G_OBJECT(theme), prop, font, NULL);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
122 pidgin_theme_font_free(font);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
123 g_object_get(G_OBJECT(theme), prop, &font, NULL);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
124 }
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
125
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
126 face = pidgin_theme_font_get_font_face(font);
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
127 dialog = gtk_font_selection_dialog_new(_("Select Font"));
26659
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
128 if (face && *face)
30137
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
129 gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(dialog),
26659
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
130 face);
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
131 g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(theme_font_face_selected),
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
132 font);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
133 gtk_widget_show_all(dialog);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
134 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
135
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
136 static void
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
137 theme_color_select(GtkWidget *widget, gpointer prop)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
138 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
139 GtkWidget *dialog;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
140 PidginBlistTheme *theme;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
141 const GdkColor *color = NULL;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
142
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
143 theme = pidgin_blist_get_theme();
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
144
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
145 if (prop_type_is_color(theme, prop)) {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
146 g_object_get(G_OBJECT(theme), prop, &color, NULL);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
147 } else {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
148 PidginThemeFont *pair = NULL;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
149 g_object_get(G_OBJECT(theme), prop, &pair, NULL);
26660
e9e253607e35 Fix some assertion failures.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26659
diff changeset
150 if (pair)
e9e253607e35 Fix some assertion failures.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26659
diff changeset
151 color = pidgin_theme_font_get_color(pair);
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
152 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
153
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
154 dialog = gtk_color_selection_dialog_new(_("Select Color"));
30137
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
155 #if GTK_CHECK_VERSION(2,14,0)
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
156 if (color)
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
157 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
158 gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog))),
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
159 color);
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
160 #else
26660
e9e253607e35 Fix some assertion failures.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26659
diff changeset
161 if (color)
e9e253607e35 Fix some assertion failures.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26659
diff changeset
162 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(dialog)->colorsel),
e9e253607e35 Fix some assertion failures.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26659
diff changeset
163 color);
30137
4e7a9940627e Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26774
diff changeset
164 #endif
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
165 g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(theme_color_selected),
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
166 prop);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
167
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
168 gtk_widget_show_all(dialog);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
169 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
170
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
171 static GtkWidget *
26661
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
172 pidgin_theme_create_color_selector(const char *text, const char *blurb, const char *prop,
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
173 GtkSizeGroup *sizegroup)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
174 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
175 GtkWidget *color;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
176 GtkWidget *hbox, *label;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
177
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
178 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
179
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
180 label = gtk_label_new(_(text));
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
181 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
182 gtk_size_group_add_widget(sizegroup, label);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
183 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
26661
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
184 #if GTK_CHECK_VERSION(2, 12, 0)
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
185 gtk_widget_set_tooltip_text(label, blurb);
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
186 #endif
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
187
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
188 color = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_COLOR,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
189 PIDGIN_BUTTON_HORIZONTAL);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
190 g_signal_connect(G_OBJECT(color), "clicked", G_CALLBACK(theme_color_select),
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
191 (gpointer)prop);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
192 gtk_box_pack_start(GTK_BOX(hbox), color, FALSE, FALSE, 0);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
193
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
194 return hbox;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
195 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
196
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
197 static GtkWidget *
26661
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
198 pidgin_theme_create_font_selector(const char *text, const char *blurb, const char *prop,
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
199 GtkSizeGroup *sizegroup)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
200 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
201 GtkWidget *color, *font;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
202 GtkWidget *hbox, *label;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
203
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
204 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
205
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
206 label = gtk_label_new(_(text));
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
207 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
208 gtk_size_group_add_widget(sizegroup, label);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
209 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
26661
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
210 #if GTK_CHECK_VERSION(2, 12, 0)
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
211 gtk_widget_set_tooltip_text(label, blurb);
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
212 #endif
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
213
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
214 font = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
215 PIDGIN_BUTTON_HORIZONTAL);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
216 g_signal_connect(G_OBJECT(font), "clicked", G_CALLBACK(theme_font_select_face),
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
217 (gpointer)prop);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
218 gtk_box_pack_start(GTK_BOX(hbox), font, FALSE, FALSE, 0);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
219
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
220 color = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_COLOR,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
221 PIDGIN_BUTTON_HORIZONTAL);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
222 g_signal_connect(G_OBJECT(color), "clicked", G_CALLBACK(theme_color_select),
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
223 (gpointer)prop);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
224 gtk_box_pack_start(GTK_BOX(hbox), color, FALSE, FALSE, 0);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
225
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
226 return hbox;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
227 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
228
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
229 static void
26774
81559f83e993 Fix two warnings in the theme editor plugin
Paul Aurich <paul@darkrain42.org>
parents: 26720
diff changeset
230 pidgin_blist_theme_edit(PurplePluginAction *unused)
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
231 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
232 GtkWidget *dialog;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
233 GtkWidget *box;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
234 GtkSizeGroup *group;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
235 PidginBlistTheme *theme;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
236 GObjectClass *klass;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
237 int i, j;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
238 static struct {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
239 const char *header;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
240 const char *props[12];
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
241 } sections[] = {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
242 {N_("Contact"), {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
243 "contact-color",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
244 "contact",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
245 "online",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
246 "away",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
247 "offline",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
248 "idle",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
249 "message",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
250 "message_nick_said",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
251 "status",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
252 NULL
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
253 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
254 },
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
255 {N_("Group"), {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
256 "expanded-color",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
257 "expanded-text",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
258 "collapsed-color",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
259 "collapsed-text",
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
260 NULL
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
261 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
262 },
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
263 { NULL, { } }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
264 };
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
265
26662
0dddfdb3a24a A status-icon theme editor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26661
diff changeset
266 dialog = pidgin_create_dialog(_("Pidgin Buddylist Theme Editor"), 0, "theme-editor-blist", FALSE);
26660
e9e253607e35 Fix some assertion failures.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26659
diff changeset
267 box = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(dialog), FALSE, PIDGIN_HIG_BOX_SPACE);
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
268
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
269 theme = pidgin_blist_get_theme();
26659
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
270 if (!theme) {
31338
3c1563a54785 Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 30137
diff changeset
271 const char *author;
3c1563a54785 Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 30137
diff changeset
272 #ifndef _WIN32
3c1563a54785 Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 30137
diff changeset
273 author = getlogin();
3c1563a54785 Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 30137
diff changeset
274 #else
3c1563a54785 Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 30137
diff changeset
275 author = "user";
3c1563a54785 Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 30137
diff changeset
276 #endif
26659
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
277 theme = g_object_new(PIDGIN_TYPE_BLIST_THEME, "type", "blist",
31338
3c1563a54785 Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 30137
diff changeset
278 "author", author,
26659
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
279 NULL);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
280 pidgin_blist_set_theme(theme);
4fca203e33be Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26657
diff changeset
281 }
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
282 klass = G_OBJECT_CLASS(PIDGIN_BLIST_THEME_GET_CLASS(theme));
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
283
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
284 group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
285 for (i = 0; sections[i].header; i++) {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
286 GtkWidget *vbox;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
287 GtkWidget *hbox;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
288 GParamSpec *spec;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
289
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
290 vbox = pidgin_make_frame(box, _(sections[i].header));
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
291 for (j = 0; sections[i].props[j]; j++) {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
292 const char *label;
26661
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
293 const char *blurb;
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
294 spec = g_object_class_find_property(klass, sections[i].props[j]);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
295 label = g_param_spec_get_nick(spec);
26661
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
296 blurb = g_param_spec_get_blurb(spec);
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
297 if (G_IS_PARAM_SPEC_BOXED(spec)) {
26661
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
298 hbox = pidgin_theme_create_color_selector(label, blurb,
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
299 sections[i].props[j], group);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
300 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
301 } else {
26661
9b6619a28f5d Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26660
diff changeset
302 hbox = pidgin_theme_create_font_selector(label, blurb,
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
303 sections[i].props[j], group);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
304 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
305 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
306 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
307 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
308
26660
e9e253607e35 Fix some assertion failures.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26659
diff changeset
309 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), TRUE);
26720
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
310 #ifdef NOT_SADRUL
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
311 pidgin_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_SAVE, G_CALLBACK(save_blist_theme), dialog);
26720
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
312 #endif
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
313 pidgin_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, G_CALLBACK(close_blist_theme), dialog);
78bca07e6737 Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26664
diff changeset
314
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
315 gtk_widget_show_all(dialog);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
316
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
317 g_object_unref(group);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
318 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
319
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
320 static gboolean
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
321 plugin_load(PurplePlugin *plugin)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
322 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
323 return TRUE;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
324 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
325
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
326 static GList *
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
327 actions(PurplePlugin *plugin, gpointer context)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
328 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
329 GList *l = NULL;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
330 PurplePluginAction *act = NULL;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
331
26662
0dddfdb3a24a A status-icon theme editor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26661
diff changeset
332 act = purple_plugin_action_new(_("Edit Buddylist Theme"), pidgin_blist_theme_edit);
0dddfdb3a24a A status-icon theme editor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26661
diff changeset
333 l = g_list_append(l, act);
26664
5d71de58452c Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26662
diff changeset
334 act = purple_plugin_action_new(_("Edit Icon Theme"), pidgin_icon_theme_edit);
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
335 l = g_list_append(l, act);
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
336
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
337 return l;
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
338 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
339
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
340 static PurplePluginInfo info =
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
341 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
342 PURPLE_PLUGIN_MAGIC,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
343 PURPLE_MAJOR_VERSION,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
344 PURPLE_MINOR_VERSION,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
345 PURPLE_PLUGIN_STANDARD, /**< type */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
346 PIDGIN_PLUGIN_TYPE, /**< ui_requirement */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
347 0, /**< flags */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
348 NULL, /**< dependencies */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
349 PURPLE_PRIORITY_DEFAULT, /**< priority */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
350
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
351 PLUGIN_ID, /**< id */
26662
0dddfdb3a24a A status-icon theme editor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26661
diff changeset
352 N_("Pidgin Theme Editor"), /**< name */
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
353 DISPLAY_VERSION, /**< version */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
354 /** summary */
26662
0dddfdb3a24a A status-icon theme editor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26661
diff changeset
355 N_("Pidgin Theme Editor."),
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
356 /** description */
26662
0dddfdb3a24a A status-icon theme editor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 26661
diff changeset
357 N_("Pidgin Theme Editor"),
26657
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
358 "Sadrul Habib Chowdhury <imadil@gmail.com>", /**< author */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
359 PURPLE_WEBSITE, /**< homepage */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
360
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
361 plugin_load, /**< load */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
362 NULL, /**< unload */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
363 NULL, /**< destroy */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
364
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
365 NULL, /**< ui_info */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
366 NULL, /**< extra_info */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
367 NULL,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
368 actions,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
369
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
370 /* padding */
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
371 NULL,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
372 NULL,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
373 NULL,
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
374 NULL
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
375 };
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
376
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
377 static void
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
378 init_plugin(PurplePlugin *plugin)
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
379 {
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
380 }
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
381
37aca5864715 Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
382 PURPLE_INIT_PLUGIN(themeeditor, init_plugin, info)