]> spindle.queued.net Git - midori/commitdiff
Look for the formhistory javascript dynamically
authorPeter de Ridder <peter@xfce.org>
Mon, 15 Feb 2010 21:52:45 +0000 (22:52 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 15 Feb 2010 23:59:42 +0000 (00:59 +0100)
extensions/formhistory.c

index 6c1548e02756c8230f0c5396b63575b5fa10a6a3..9b33300e32d68cbcfa1357234870955301527c30 100644 (file)
@@ -31,12 +31,16 @@ static gchar* jsforms;
 static gboolean
 formhistory_prepare_js ()
 {
+   gchar* data_name;
+   gchar* data_path;
    gchar* autosuggest;
    gchar* style;
    guint i;
    gchar* file;
 
-   gchar* data_path = g_build_filename (MDATADIR, PACKAGE_NAME, "res", NULL);
+   data_name = g_build_filename (PACKAGE_NAME, "res", NULL);
+   data_path = sokoke_find_data_filename (data_name);
+   g_free (data_name);
    file = g_build_filename (data_path, G_DIR_SEPARATOR_S, "autosuggestcontrol.js",NULL);
    if (!g_file_get_contents (file, &autosuggest, NULL, NULL))
        return FALSE;