Thu, 23 Apr 2009 01:36:55 +0000
Disable the 'Save' buttons since they don't do nothing yet, man.
|
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 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
25 | #include "theme-manager.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
26 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
27 | #include "gtkblist.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
28 | #include "gtkblist-theme.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
29 | #include "gtkutils.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
30 | #include "gtkplugin.h" |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
31 | |
|
26811
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
32 | #define PLUGIN_ID "gtk-theme-editor" |
|
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
33 | |
|
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
34 | #include "themeedit-icon.h" |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
35 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
36 | static gboolean |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
37 | 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
|
38 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
39 | 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
|
40 | 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
|
41 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
42 | 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
|
43 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
44 | |
|
26841
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
45 | #ifdef NOT_SADRUL |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
46 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
47 | 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
|
48 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
49 | /* TODO: SAVE! */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
50 | gtk_widget_destroy(window); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
51 | } |
|
26841
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
52 | #endif |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
53 | |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
54 | 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
|
55 | 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
|
56 | { |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
57 | 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
|
58 | } |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
59 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
60 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
61 | 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
|
62 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
63 | if (response == GTK_RESPONSE_OK) { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
64 | GdkColor color; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
65 | PidginBlistTheme *theme; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
66 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
67 | gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(dialog)->colorsel), &color); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
68 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
69 | theme = pidgin_blist_get_theme(); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
70 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
71 | 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
|
72 | 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
|
73 | } else { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
74 | PidginThemeFont *font = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
75 | 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
|
76 | if (!font) { |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
77 | 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
|
78 | 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
|
79 | 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
|
80 | } else { |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
81 | 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
|
82 | } |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
83 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
84 | pidgin_blist_set_theme(theme); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
85 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
86 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
87 | gtk_widget_destroy(GTK_WIDGET(dialog)); |
|
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 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
90 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
91 | 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
|
92 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
93 | if (response == GTK_RESPONSE_OK || response == GTK_RESPONSE_APPLY) { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
94 | const char *fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(dialog)); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
95 | pidgin_theme_font_set_font_face(font, fontname); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
96 | pidgin_blist_refresh(purple_get_blist()); |
|
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 | gtk_widget_destroy(dialog); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
99 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
100 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
101 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
102 | 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
|
103 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
104 | GtkWidget *dialog; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
105 | PidginBlistTheme *theme; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
106 | 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
|
107 | const char *face; |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
108 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
109 | theme = pidgin_blist_get_theme(); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
110 | 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
|
111 | |
|
26808
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
112 | if (!font) { |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
113 | 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
|
114 | 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
|
115 | 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
|
116 | 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
|
117 | } |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
118 | |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
119 | face = pidgin_theme_font_get_font_face(font); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
120 | dialog = gtk_font_selection_dialog_new(_("Select Font")); |
|
26808
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
121 | if (face && *face) |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
122 | gtk_font_selection_set_font_name(GTK_FONT_SELECTION(GTK_FONT_SELECTION_DIALOG(dialog)->fontsel), |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
123 | face); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
124 | 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
|
125 | font); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
126 | gtk_widget_show_all(dialog); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
127 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
128 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
129 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
130 | 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
|
131 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
132 | GtkWidget *dialog; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
133 | PidginBlistTheme *theme; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
134 | const GdkColor *color = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
135 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
136 | theme = pidgin_blist_get_theme(); |
|
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 | 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
|
139 | 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
|
140 | } else { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
141 | PidginThemeFont *pair = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
142 | 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
|
143 | if (pair) |
|
c120381fbe45
Fix some assertion failures.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26808
diff
changeset
|
144 | 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
|
145 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
146 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
147 | dialog = gtk_color_selection_dialog_new(_("Select Color")); |
|
26809
c120381fbe45
Fix some assertion failures.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26808
diff
changeset
|
148 | if (color) |
|
c120381fbe45
Fix some assertion failures.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26808
diff
changeset
|
149 | gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(dialog)->colorsel), |
|
c120381fbe45
Fix some assertion failures.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26808
diff
changeset
|
150 | color); |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
151 | 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
|
152 | prop); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
153 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
154 | gtk_widget_show_all(dialog); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
155 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
156 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
157 | static GtkWidget * |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
158 | 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
|
159 | GtkSizeGroup *sizegroup) |
|
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 | GtkWidget *color; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
162 | GtkWidget *hbox, *label; |
|
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 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
165 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
166 | label = gtk_label_new(_(text)); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
167 | 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
|
168 | 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
|
169 | 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
|
170 | #if GTK_CHECK_VERSION(2, 12, 0) |
|
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
171 | gtk_widget_set_tooltip_text(label, blurb); |
|
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
172 | #endif |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
173 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
174 | 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
|
175 | PIDGIN_BUTTON_HORIZONTAL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
176 | 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
|
177 | (gpointer)prop); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
178 | 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
|
179 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
180 | return hbox; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
181 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
182 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
183 | static GtkWidget * |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
184 | 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
|
185 | GtkSizeGroup *sizegroup) |
|
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 | GtkWidget *color, *font; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
188 | GtkWidget *hbox, *label; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
189 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
190 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
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 | label = gtk_label_new(_(text)); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
193 | 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
|
194 | 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
|
195 | 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
|
196 | #if GTK_CHECK_VERSION(2, 12, 0) |
|
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
197 | gtk_widget_set_tooltip_text(label, blurb); |
|
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
198 | #endif |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
199 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
200 | 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
|
201 | PIDGIN_BUTTON_HORIZONTAL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
202 | 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
|
203 | (gpointer)prop); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
204 | 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
|
205 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
206 | 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
|
207 | PIDGIN_BUTTON_HORIZONTAL); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
208 | 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
|
209 | (gpointer)prop); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
210 | 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
|
211 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
212 | return hbox; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
213 | } |
|
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 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
216 | pidgin_blist_theme_edit(void) |
|
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 | GtkWidget *dialog; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
219 | GtkWidget *box; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
220 | GtkSizeGroup *group; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
221 | PidginBlistTheme *theme; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
222 | GObjectClass *klass; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
223 | int i, j; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
224 | static struct { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
225 | const char *header; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
226 | const char *props[12]; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
227 | } sections[] = { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
228 | {N_("Contact"), { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
229 | "contact-color", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
230 | "contact", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
231 | "online", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
232 | "away", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
233 | "offline", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
234 | "idle", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
235 | "message", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
236 | "message_nick_said", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
237 | "status", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
238 | NULL |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
239 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
240 | }, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
241 | {N_("Group"), { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
242 | "expanded-color", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
243 | "expanded-text", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
244 | "collapsed-color", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
245 | "collapsed-text", |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
246 | NULL |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
247 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
248 | }, |
|
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 | |
|
26811
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
252 | 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
|
253 | 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
|
254 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
255 | 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
|
256 | if (!theme) { |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
257 | theme = g_object_new(PIDGIN_TYPE_BLIST_THEME, "type", "blist", |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
258 | "author", getlogin(), |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
259 | NULL); |
|
760c79a3df1a
Allow editing the theme when no theme is selected (the default).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26806
diff
changeset
|
260 | 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
|
261 | } |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
262 | 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
|
263 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
264 | 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
|
265 | 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
|
266 | GtkWidget *vbox; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
267 | GtkWidget *hbox; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
268 | GParamSpec *spec; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
269 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
270 | 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
|
271 | 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
|
272 | 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
|
273 | const char *blurb; |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
274 | 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
|
275 | 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
|
276 | 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
|
277 | 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
|
278 | 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
|
279 | sections[i].props[j], group); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
280 | 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
|
281 | } else { |
|
26810
c19a6dbe3f3b
Mark the description of the properties for translation. Show the
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26809
diff
changeset
|
282 | 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
|
283 | sections[i].props[j], group); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
284 | 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
|
285 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
286 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
287 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
288 | |
|
26809
c120381fbe45
Fix some assertion failures.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26808
diff
changeset
|
289 | gtk_dialog_set_has_separator(GTK_DIALOG(dialog), TRUE); |
|
26841
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
290 | #ifdef NOT_SADRUL |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
291 | 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
|
292 | #endif |
|
4de3b5aa28c5
Disable the 'Save' buttons since they don't do nothing yet, man.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26813
diff
changeset
|
293 | 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
|
294 | |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
295 | gtk_widget_show_all(dialog); |
|
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 | g_object_unref(group); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
298 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
299 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
300 | static gboolean |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
301 | plugin_load(PurplePlugin *plugin) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
302 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
303 | return TRUE; |
|
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 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
306 | static GList * |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
307 | actions(PurplePlugin *plugin, gpointer context) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
308 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
309 | GList *l = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
310 | PurplePluginAction *act = NULL; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
311 | |
|
26811
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
312 | 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
|
313 | 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
|
314 | 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
|
315 | l = g_list_append(l, act); |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
316 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
317 | return l; |
|
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 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
320 | static PurplePluginInfo info = |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
321 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
322 | PURPLE_PLUGIN_MAGIC, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
323 | PURPLE_MAJOR_VERSION, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
324 | PURPLE_MINOR_VERSION, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
325 | PURPLE_PLUGIN_STANDARD, /**< type */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
326 | PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
327 | 0, /**< flags */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
328 | NULL, /**< dependencies */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
329 | PURPLE_PRIORITY_DEFAULT, /**< priority */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
330 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
331 | PLUGIN_ID, /**< id */ |
|
26811
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
332 | N_("Pidgin Theme Editor"), /**< name */ |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
333 | DISPLAY_VERSION, /**< version */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
334 | /** summary */ |
|
26811
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
335 | N_("Pidgin Theme Editor."), |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
336 | /** description */ |
|
26811
72045103fad1
A status-icon theme editor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
26810
diff
changeset
|
337 | N_("Pidgin Theme Editor"), |
|
26806
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
338 | "Sadrul Habib Chowdhury <imadil@gmail.com>", /**< author */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
339 | PURPLE_WEBSITE, /**< homepage */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
340 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
341 | plugin_load, /**< load */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
342 | NULL, /**< unload */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
343 | NULL, /**< destroy */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
344 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
345 | NULL, /**< ui_info */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
346 | NULL, /**< extra_info */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
347 | NULL, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
348 | actions, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
349 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
350 | /* padding */ |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
351 | NULL, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
352 | NULL, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
353 | NULL, |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
354 | NULL |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
355 | }; |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
356 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
357 | static void |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
358 | init_plugin(PurplePlugin *plugin) |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
359 | { |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
360 | } |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
361 | |
|
4fb406cd5475
Theme editor plugin (of sorts) for buddylist themes.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
362 | PURPLE_INIT_PLUGIN(themeeditor, init_plugin, info) |