Mercurial > pidgin.yaz
comparison pidgin/plugins/themeedit.c @ 26662:0dddfdb3a24a
A status-icon theme editor.
TODO:
* Actually create the XML files for the theme laoders (I don't really
plan on writing that part of the code >:) )
* The selected icons are stored in a theme-hierarchy under "/tmp". This
needs to be fixed to use a more appropriate location (volunteers?).
| author | Sadrul Habib Chowdhury <imadil@gmail.com> |
|---|---|
| date | Sun, 19 Apr 2009 17:30:59 +0000 |
| parents | 9b6619a28f5d |
| children | 5d71de58452c |
comparison
equal
deleted
inserted
replaced
| 26661:9b6619a28f5d | 26662:0dddfdb3a24a |
|---|---|
| 27 #include "gtkblist.h" | 27 #include "gtkblist.h" |
| 28 #include "gtkblist-theme.h" | 28 #include "gtkblist-theme.h" |
| 29 #include "gtkutils.h" | 29 #include "gtkutils.h" |
| 30 #include "gtkplugin.h" | 30 #include "gtkplugin.h" |
| 31 | 31 |
| 32 #define PLUGIN_ID "gtk-blist-theme-editor" | 32 #define PLUGIN_ID "gtk-theme-editor" |
| 33 | |
| 34 #include "themeedit-icon.h" | |
| 33 | 35 |
| 34 static gboolean | 36 static gboolean |
| 35 prop_type_is_color(PidginBlistTheme *theme, const char *prop) | 37 prop_type_is_color(PidginBlistTheme *theme, const char *prop) |
| 36 { | 38 { |
| 37 PidginBlistThemeClass *klass = PIDGIN_BLIST_THEME_GET_CLASS(theme); | 39 PidginBlistThemeClass *klass = PIDGIN_BLIST_THEME_GET_CLASS(theme); |
| 237 } | 239 } |
| 238 }, | 240 }, |
| 239 { NULL, { } } | 241 { NULL, { } } |
| 240 }; | 242 }; |
| 241 | 243 |
| 242 dialog = pidgin_create_dialog(_("Pidgin Buddylist Theme Editor"), 0, "theme-editor", FALSE); | 244 dialog = pidgin_create_dialog(_("Pidgin Buddylist Theme Editor"), 0, "theme-editor-blist", FALSE); |
| 243 box = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(dialog), FALSE, PIDGIN_HIG_BOX_SPACE); | 245 box = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(dialog), FALSE, PIDGIN_HIG_BOX_SPACE); |
| 244 | 246 |
| 245 theme = pidgin_blist_get_theme(); | 247 theme = pidgin_blist_get_theme(); |
| 246 if (!theme) { | 248 if (!theme) { |
| 247 theme = g_object_new(PIDGIN_TYPE_BLIST_THEME, "type", "blist", | 249 theme = g_object_new(PIDGIN_TYPE_BLIST_THEME, "type", "blist", |
| 293 actions(PurplePlugin *plugin, gpointer context) | 295 actions(PurplePlugin *plugin, gpointer context) |
| 294 { | 296 { |
| 295 GList *l = NULL; | 297 GList *l = NULL; |
| 296 PurplePluginAction *act = NULL; | 298 PurplePluginAction *act = NULL; |
| 297 | 299 |
| 298 act = purple_plugin_action_new(_("Edit"), pidgin_blist_theme_edit); | 300 act = purple_plugin_action_new(_("Edit Buddylist Theme"), pidgin_blist_theme_edit); |
| 301 l = g_list_append(l, act); | |
| 302 act = purple_plugin_action_new(_("Edit Status Icon Theme"), pidgin_icon_theme_edit); | |
| 299 l = g_list_append(l, act); | 303 l = g_list_append(l, act); |
| 300 | 304 |
| 301 return l; | 305 return l; |
| 302 } | 306 } |
| 303 | 307 |
| 311 0, /**< flags */ | 315 0, /**< flags */ |
| 312 NULL, /**< dependencies */ | 316 NULL, /**< dependencies */ |
| 313 PURPLE_PRIORITY_DEFAULT, /**< priority */ | 317 PURPLE_PRIORITY_DEFAULT, /**< priority */ |
| 314 | 318 |
| 315 PLUGIN_ID, /**< id */ | 319 PLUGIN_ID, /**< id */ |
| 316 N_("Pidgin Buddylist Theme Editor"), /**< name */ | 320 N_("Pidgin Theme Editor"), /**< name */ |
| 317 DISPLAY_VERSION, /**< version */ | 321 DISPLAY_VERSION, /**< version */ |
| 318 /** summary */ | 322 /** summary */ |
| 319 N_("Pidgin Buddylist Theme Editor. Enjoy, motherfucker!!"), | 323 N_("Pidgin Theme Editor."), |
| 320 /** description */ | 324 /** description */ |
| 321 N_("Pidgin Buddylist Theme Editor"), | 325 N_("Pidgin Theme Editor"), |
| 322 "Sadrul Habib Chowdhury <imadil@gmail.com>", /**< author */ | 326 "Sadrul Habib Chowdhury <imadil@gmail.com>", /**< author */ |
| 323 PURPLE_WEBSITE, /**< homepage */ | 327 PURPLE_WEBSITE, /**< homepage */ |
| 324 | 328 |
| 325 plugin_load, /**< load */ | 329 plugin_load, /**< load */ |
| 326 NULL, /**< unload */ | 330 NULL, /**< unload */ |
