soc.2009.webkitmessageview: bb76fe6a: Don't crash if we don't have any theme i...
masca at cpw.pidgin.im
masca at cpw.pidgin.im
Sat Feb 6 17:26:25 EST 2010
-----------------------------------------------------------------
Revision: bb76fe6ad2d9f7f8803db3d7bd34444111107caa
Ancestor: 01667b5ac1fb5654112c8f96d83650d3daa2b4cc
Author: masca at cpw.pidgin.im
Date: 2010-02-06T22:08:41
Branch: im.pidgin.soc.2009.webkitmessageview
URL: http://d.pidgin.im/viewmtn/revision/info/bb76fe6ad2d9f7f8803db3d7bd34444111107caa
Modified files:
pidgin/plugins/adiumthemes/webkit.c
ChangeLog:
Don't crash if we don't have any theme installed.
-------------- next part --------------
============================================================
--- pidgin/plugins/adiumthemes/webkit.c cedb620c285e9cc008f85a6139c6ce1accbb7755
+++ pidgin/plugins/adiumthemes/webkit.c e796b9247c3f47daae8c1961c5b29ea43478c7b3
@@ -39,6 +39,7 @@
/* Purple headers */
#include <conversation.h>
#include <debug.h>
+#include <internal.h>
#include <notify.h>
#include <util.h>
#include <version.h>
@@ -551,9 +552,16 @@ style_set_default ()
const char *stylepath = purple_prefs_get_string ("/plugins/gtk/adiumthemes/stylepath");
g_assert (cur_style_dir == NULL);
- if (stylepath)
+ if (stylepath && *stylepath)
styles = g_list_prepend (styles, g_strdup (stylepath));
+ else {
+ purple_notify_error(handle, _("Webkit themes"),
+ _("Can't find installed styles"),
+ _("Please install some theme and verify the installation path"));
+ return;
+ }
+
/* pick any one that works. Note that we have first preference
* for the one in the userdir */
for (iter = styles; iter; iter = g_list_next (iter)) {
More information about the Commits
mailing list