Tue, 11 Feb 2014 23:47:33 +0530
Merged default branch
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
1 | /* Pidgin |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
2 | * |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
3 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
5 | * source distribution. |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
6 | * |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
11 | * |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
16 | * |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
20 | */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
21 | #include "internal.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
22 | #include "pidgin.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
23 | #include "version.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
24 | |
|
33284
e3155594ea98
Bugfix: focus lost after sending a message; fix GTK+2 compile.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33275
diff
changeset
|
25 | #include "gtk3compat.h" |
|
e3155594ea98
Bugfix: focus lost after sending a message; fix GTK+2 compile.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33275
diff
changeset
|
26 | |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
27 | #include "theme-manager.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
28 | |
|
34708
dd67596485ca
Undo renames of UI blist headers back to gntblist.h and gtkblist.h
Ankit Vani <a@nevitus.org>
parents:
34706
diff
changeset
|
29 | #include "gtkblist.h" |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
30 | #include "gtkblist-theme.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
31 | #include "gtkutils.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
32 | #include "gtkplugin.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
33 | |
|
26811
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
34 | #define PLUGIN_ID "gtk-theme-editor" |
|
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
35 | |
|
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
36 | #include "themeedit-icon.h" |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
37 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
38 | static gboolean |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
39 | prop_type_is_color(PidginBlistTheme *theme, const char *prop) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
40 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
41 | PidginBlistThemeClass *klass = PIDGIN_BLIST_THEME_GET_CLASS(theme); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
42 | GParamSpec *spec = g_object_class_find_property(G_OBJECT_CLASS(klass), prop); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
43 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
44 | return G_IS_PARAM_SPEC_BOXED(spec); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
45 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
46 | |
|
26841
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
47 | #ifdef NOT_SADRUL |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
48 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
49 | save_blist_theme(GtkWidget *w, GtkWidget *window) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
50 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
51 | /* TODO: SAVE! */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
52 | gtk_widget_destroy(window); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
53 | } |
|
26841
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
54 | #endif |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
55 | |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
56 | static void |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
57 | close_blist_theme(GtkWidget *w, GtkWidget *window) |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
58 | { |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
59 | gtk_widget_destroy(window); |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
60 | } |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
61 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
62 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
63 | theme_color_selected(GtkDialog *dialog, gint response, const char *prop) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
64 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
65 | if (response == GTK_RESPONSE_OK) { |
|
30010
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26869
diff
changeset
|
66 | GtkWidget *colorsel; |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
67 | GdkColor color; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
68 | PidginBlistTheme *theme; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
69 | |
|
30010
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26869
diff
changeset
|
70 | colorsel = |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26869
diff
changeset
|
71 | gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog)); |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26869
diff
changeset
|
72 | gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(colorsel), &color); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
73 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
74 | theme = pidgin_blist_get_theme(); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
75 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
76 | if (prop_type_is_color(theme, prop)) { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
77 | g_object_set(G_OBJECT(theme), prop, &color, NULL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
78 | } else { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
79 | PidginThemeFont *font = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
80 | g_object_get(G_OBJECT(theme), prop, &font, NULL); |
|
26808
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
81 | if (!font) { |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
82 | font = pidgin_theme_font_new(NULL, &color); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
83 | g_object_set(G_OBJECT(theme), prop, font, NULL); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
84 | pidgin_theme_font_free(font); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
85 | } else { |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
86 | pidgin_theme_font_set_color(font, &color); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
87 | } |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
88 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
89 | pidgin_blist_set_theme(theme); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
90 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
91 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
92 | gtk_widget_destroy(GTK_WIDGET(dialog)); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
93 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
94 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
95 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
96 | theme_font_face_selected(GtkWidget *dialog, gint response, gpointer font) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
97 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
98 | if (response == GTK_RESPONSE_OK || response == GTK_RESPONSE_APPLY) { |
|
33275
8da9d2ec671d
Use new GtkFontChooser where available.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
99 | const char *fontname = gtk_font_chooser_get_font(GTK_FONT_CHOOSER(dialog)); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
100 | pidgin_theme_font_set_font_face(font, fontname); |
|
34726
af52ff6660c0
Replaced purple_get_blist() with purple_blist_get_buddy_list()
Ankit Vani <a@nevitus.org>
parents:
34708
diff
changeset
|
101 | pidgin_blist_refresh(purple_blist_get_buddy_list()); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
102 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
103 | gtk_widget_destroy(dialog); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
104 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
105 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
106 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
107 | theme_font_select_face(GtkWidget *widget, gpointer prop) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
108 | { |
|
33275
8da9d2ec671d
Use new GtkFontChooser where available.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
109 | GtkWindow *window; |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
110 | GtkWidget *dialog; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
111 | PidginBlistTheme *theme; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
112 | PidginThemeFont *font = NULL; |
|
26808
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
113 | const char *face; |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
114 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
115 | theme = pidgin_blist_get_theme(); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
116 | g_object_get(G_OBJECT(theme), prop, &font, NULL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
117 | |
|
26808
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
118 | if (!font) { |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
119 | font = pidgin_theme_font_new(NULL, NULL); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
120 | g_object_set(G_OBJECT(theme), prop, font, NULL); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
121 | pidgin_theme_font_free(font); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
122 | g_object_get(G_OBJECT(theme), prop, &font, NULL); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
123 | } |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
124 | |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
125 | face = pidgin_theme_font_get_font_face(font); |
|
33275
8da9d2ec671d
Use new GtkFontChooser where available.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
126 | window = GTK_WINDOW(gtk_widget_get_toplevel(widget)); |
|
8da9d2ec671d
Use new GtkFontChooser where available.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
127 | dialog = gtk_font_chooser_dialog_new(_("Select Font"), window); |
|
26808
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
128 | if (face && *face) |
|
33275
8da9d2ec671d
Use new GtkFontChooser where available.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
129 | gtk_font_chooser_set_font(GTK_FONT_CHOOSER(dialog), face); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
130 | g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(theme_font_face_selected), |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
131 | font); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
132 | gtk_widget_show_all(dialog); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
133 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
134 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
135 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
136 | theme_color_select(GtkWidget *widget, gpointer prop) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
137 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
138 | GtkWidget *dialog; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
139 | PidginBlistTheme *theme; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
140 | const GdkColor *color = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
141 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
142 | theme = pidgin_blist_get_theme(); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
143 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
144 | if (prop_type_is_color(theme, prop)) { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
145 | g_object_get(G_OBJECT(theme), prop, &color, NULL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
146 | } else { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
147 | PidginThemeFont *pair = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
148 | g_object_get(G_OBJECT(theme), prop, &pair, NULL); |
|
26809
c120381fbe45
Fix some assertion failures.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26808
diff
changeset
|
149 | if (pair) |
|
c120381fbe45
Fix some assertion failures.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26808
diff
changeset
|
150 | color = pidgin_theme_font_get_color(pair); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
151 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
152 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
153 | dialog = gtk_color_selection_dialog_new(_("Select Color")); |
|
30010
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26869
diff
changeset
|
154 | if (color) |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26869
diff
changeset
|
155 | gtk_color_selection_set_current_color(GTK_COLOR_SELECTION( |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26869
diff
changeset
|
156 | gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog))), |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26869
diff
changeset
|
157 | color); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
158 | g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(theme_color_selected), |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
159 | prop); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
160 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
161 | gtk_widget_show_all(dialog); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
162 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
163 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
164 | static GtkWidget * |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
165 | pidgin_theme_create_color_selector(const char *text, const char *blurb, const char *prop, |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
166 | GtkSizeGroup *sizegroup) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
167 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
168 | GtkWidget *color; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
169 | GtkWidget *hbox, *label; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
170 | |
|
35526
ed1be305c985
Fix gtk_[hv]box_new gtk3 deprecation warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35060
diff
changeset
|
171 | hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PIDGIN_HIG_CAT_SPACE); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
172 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
173 | label = gtk_label_new(_(text)); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
174 | gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
175 | gtk_size_group_add_widget(sizegroup, label); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
176 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
177 | gtk_widget_set_tooltip_text(label, blurb); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
178 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
179 | color = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_COLOR, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
180 | PIDGIN_BUTTON_HORIZONTAL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
181 | g_signal_connect(G_OBJECT(color), "clicked", G_CALLBACK(theme_color_select), |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
182 | (gpointer)prop); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
183 | gtk_box_pack_start(GTK_BOX(hbox), color, FALSE, FALSE, 0); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
184 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
185 | return hbox; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
186 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
187 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
188 | static GtkWidget * |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
189 | pidgin_theme_create_font_selector(const char *text, const char *blurb, const char *prop, |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
190 | GtkSizeGroup *sizegroup) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
191 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
192 | GtkWidget *color, *font; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
193 | GtkWidget *hbox, *label; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
194 | |
|
35526
ed1be305c985
Fix gtk_[hv]box_new gtk3 deprecation warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35060
diff
changeset
|
195 | hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PIDGIN_HIG_CAT_SPACE); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
196 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
197 | label = gtk_label_new(_(text)); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
198 | gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
199 | gtk_size_group_add_widget(sizegroup, label); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
200 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
201 | gtk_widget_set_tooltip_text(label, blurb); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
202 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
203 | font = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
204 | PIDGIN_BUTTON_HORIZONTAL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
205 | g_signal_connect(G_OBJECT(font), "clicked", G_CALLBACK(theme_font_select_face), |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
206 | (gpointer)prop); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
207 | gtk_box_pack_start(GTK_BOX(hbox), font, FALSE, FALSE, 0); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
208 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
209 | color = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_COLOR, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
210 | PIDGIN_BUTTON_HORIZONTAL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
211 | g_signal_connect(G_OBJECT(color), "clicked", G_CALLBACK(theme_color_select), |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
212 | (gpointer)prop); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
213 | gtk_box_pack_start(GTK_BOX(hbox), color, FALSE, FALSE, 0); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
214 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
215 | return hbox; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
216 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
217 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
218 | static void |
|
26869
210aa82531fe
Fix two warnings in the theme editor plugin
Paul Aurich <darkrain42@pidgin.im>
parents:
26841
diff
changeset
|
219 | pidgin_blist_theme_edit(PurplePluginAction *unused) |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
220 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
221 | GtkWidget *dialog; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
222 | GtkWidget *box; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
223 | GtkSizeGroup *group; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
224 | PidginBlistTheme *theme; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
225 | GObjectClass *klass; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
226 | int i, j; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
227 | static struct { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
228 | const char *header; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
229 | const char *props[12]; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
230 | } sections[] = { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
231 | {N_("Contact"), { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
232 | "contact-color", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
233 | "contact", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
234 | "online", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
235 | "away", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
236 | "offline", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
237 | "idle", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
238 | "message", |
|
35060
195dbb3b6432
pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
239 | "message-nick-said", |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
240 | "status", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
241 | NULL |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
242 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
243 | }, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
244 | {N_("Group"), { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
245 | "expanded-color", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
246 | "expanded-text", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
247 | "collapsed-color", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
248 | "collapsed-text", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
249 | NULL |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
250 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
251 | }, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
252 | { NULL, { } } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
253 | }; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
254 | |
|
26811
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
255 | dialog = pidgin_create_dialog(_("Pidgin Buddylist Theme Editor"), 0, "theme-editor-blist", FALSE); |
|
26809
c120381fbe45
Fix some assertion failures.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26808
diff
changeset
|
256 | box = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(dialog), FALSE, PIDGIN_HIG_BOX_SPACE); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
257 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
258 | theme = pidgin_blist_get_theme(); |
|
26808
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
259 | if (!theme) { |
|
31102
0687ddc92313
Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <datallah@pidgin.im>
parents:
30010
diff
changeset
|
260 | const char *author; |
|
0687ddc92313
Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <datallah@pidgin.im>
parents:
30010
diff
changeset
|
261 | #ifndef _WIN32 |
|
0687ddc92313
Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <datallah@pidgin.im>
parents:
30010
diff
changeset
|
262 | author = getlogin(); |
|
0687ddc92313
Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <datallah@pidgin.im>
parents:
30010
diff
changeset
|
263 | #else |
|
0687ddc92313
Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <datallah@pidgin.im>
parents:
30010
diff
changeset
|
264 | author = "user"; |
|
0687ddc92313
Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <datallah@pidgin.im>
parents:
30010
diff
changeset
|
265 | #endif |
|
26808
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
266 | theme = g_object_new(PIDGIN_TYPE_BLIST_THEME, "type", "blist", |
|
31102
0687ddc92313
Build the "Pidgin Theme Editor" plugin on Windows too.
Daniel Atallah <datallah@pidgin.im>
parents:
30010
diff
changeset
|
267 | "author", author, |
|
26808
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
268 | NULL); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
269 | pidgin_blist_set_theme(theme); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
270 | } |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
271 | klass = G_OBJECT_CLASS(PIDGIN_BLIST_THEME_GET_CLASS(theme)); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
272 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
273 | group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
274 | for (i = 0; sections[i].header; i++) { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
275 | GtkWidget *vbox; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
276 | GtkWidget *hbox; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
277 | GParamSpec *spec; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
278 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
279 | vbox = pidgin_make_frame(box, _(sections[i].header)); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
280 | for (j = 0; sections[i].props[j]; j++) { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
281 | const char *label; |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
282 | const char *blurb; |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
283 | spec = g_object_class_find_property(klass, sections[i].props[j]); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
284 | label = g_param_spec_get_nick(spec); |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
285 | blurb = g_param_spec_get_blurb(spec); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
286 | if (G_IS_PARAM_SPEC_BOXED(spec)) { |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
287 | hbox = pidgin_theme_create_color_selector(label, blurb, |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
288 | sections[i].props[j], group); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
289 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
290 | } else { |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
291 | hbox = pidgin_theme_create_font_selector(label, blurb, |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
292 | sections[i].props[j], group); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
293 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
294 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
295 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
296 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
297 | |
|
26841
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
298 | #ifdef NOT_SADRUL |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
299 | pidgin_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_SAVE, G_CALLBACK(save_blist_theme), dialog); |
|
26841
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
300 | #endif |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
301 | pidgin_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, G_CALLBACK(close_blist_theme), dialog); |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
302 | |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
303 | gtk_widget_show_all(dialog); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
304 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
305 | g_object_unref(group); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
306 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
307 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
308 | static GList * |
|
36758
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
309 | actions(PurplePlugin *plugin) |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
310 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
311 | GList *l = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
312 | PurplePluginAction *act = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
313 | |
|
26811
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
314 | act = purple_plugin_action_new(_("Edit Buddylist Theme"), pidgin_blist_theme_edit); |
|
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
315 | l = g_list_append(l, act); |
|
26813
c1a058a2466e
Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26811
diff
changeset
|
316 | act = purple_plugin_action_new(_("Edit Icon Theme"), pidgin_icon_theme_edit); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
317 | l = g_list_append(l, act); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
318 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
319 | return l; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
320 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
321 | |
|
36758
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
322 | static PidginPluginInfo * |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
323 | plugin_query(GError **error) |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
324 | { |
|
36758
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
325 | const gchar * const authors[] = { |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
326 | "Sadrul Habib Chowdhury <imadil@gmail.com>", |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
327 | NULL |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
328 | }; |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
329 | |
|
36758
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
330 | return pidgin_plugin_info_new( |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
331 | "id", PLUGIN_ID, |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
332 | "name", N_("Pidgin Theme Editor"), |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
333 | "version", DISPLAY_VERSION, |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
334 | "category", N_("Theming"), |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
335 | "summary", N_("Pidgin Theme Editor"), |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
336 | "description", N_("Pidgin Theme Editor."), |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
337 | "authors", authors, |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
338 | "website", PURPLE_WEBSITE, |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
339 | "abi-version", PURPLE_ABI_VERSION, |
|
36934
e7268aeb3b89
Renamed plugin info callback properties to end with "-cb", and their respective symbols.
Ankit Vani <a@nevitus.org>
parents:
36758
diff
changeset
|
340 | "actions-cb", actions, |
|
36758
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
341 | NULL |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
342 | ); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
343 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
344 | |
|
36758
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
345 | static gboolean |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
346 | plugin_load(PurplePlugin *plugin, GError **error) |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
347 | { |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
348 | return TRUE; |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
349 | } |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
350 | |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
351 | static gboolean |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
352 | plugin_unload(PurplePlugin *plugin, GError **error) |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
353 | { |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
354 | return TRUE; |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
355 | } |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
356 | |
|
deee438dc431
Refactored more pidgin plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34726
diff
changeset
|
357 | PURPLE_PLUGIN_INIT(themeeditor, plugin_query, plugin_load, plugin_unload); |