Mercurial > pidgin
comparison pidgin/gtkconv-theme-loader.c @ 32731:f2478fe32c79
Override the probe function in the conversation theme loader.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 03 Mar 2012 08:39:34 +0000 |
parents | 73d04f4b18ee |
children |
comparison
equal
deleted
inserted
replaced
32730:f7be1e356a23 | 32731:f2478fe32c79 |
---|---|
95 g_hash_table_destroy(info); | 95 g_hash_table_destroy(info); |
96 info = NULL; | 96 info = NULL; |
97 } | 97 } |
98 | 98 |
99 return info; | 99 return info; |
100 } | |
101 | |
102 static gboolean | |
103 pidgin_conv_loader_probe(const gchar *dir) | |
104 { | |
105 gboolean result; | |
106 gchar *plist_file; | |
107 | |
108 plist_file = g_build_filename(dir, "Contents", "Info.plist", NULL); | |
109 result = g_file_test(plist_file, G_FILE_TEST_IS_REGULAR); | |
110 g_free(plist_file); | |
111 | |
112 return result; | |
100 } | 113 } |
101 | 114 |
102 static PurpleTheme * | 115 static PurpleTheme * |
103 pidgin_conv_loader_build(const gchar *dir) | 116 pidgin_conv_loader_build(const gchar *dir) |
104 { | 117 { |
250 pidgin_conv_theme_loader_class_init(PidginConvThemeLoaderClass *klass) | 263 pidgin_conv_theme_loader_class_init(PidginConvThemeLoaderClass *klass) |
251 { | 264 { |
252 PurpleThemeLoaderClass *loader_klass = PURPLE_THEME_LOADER_CLASS(klass); | 265 PurpleThemeLoaderClass *loader_klass = PURPLE_THEME_LOADER_CLASS(klass); |
253 | 266 |
254 loader_klass->purple_theme_loader_build = pidgin_conv_loader_build; | 267 loader_klass->purple_theme_loader_build = pidgin_conv_loader_build; |
268 loader_klass->probe_directory = pidgin_conv_loader_probe; | |
255 } | 269 } |
256 | 270 |
257 | 271 |
258 GType | 272 GType |
259 pidgin_conversation_theme_loader_get_type(void) | 273 pidgin_conversation_theme_loader_get_type(void) |