From ca2e2be6327450107245e4fda4a89745ca920142 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 4 Nov 2009 19:29:29 +0100 Subject: [PATCH] Show the actual paths when clicking the "Add" button in the userscript panel --- panels/midori-addons.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/panels/midori-addons.c b/panels/midori-addons.c index 0d1c092e..efeec635 100644 --- a/panels/midori-addons.c +++ b/panels/midori-addons.c @@ -280,14 +280,21 @@ static void midori_addons_button_add_clicked_cb (GtkToolItem* toolitem, MidoriAddons* addons) { - GtkWidget* dialog = gtk_message_dialog_new ( + gchar* path_scripts, *path_styles; + GtkWidget* dialog; + + path_scripts = g_build_path (G_DIR_SEPARATOR_S, g_get_user_data_dir (), + PACKAGE_NAME, "scripts", NULL); + path_styles = g_build_path (G_DIR_SEPARATOR_S, g_get_user_data_dir (), + PACKAGE_NAME, "styles", NULL); + dialog = gtk_message_dialog_new ( GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (addons))), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Copy userscripts to the folder %s and " - "copy userstyles to the folder %s."), - "~/.local/share/midori/scripts", - "~/.local/share/midori/styles"); + "copy userstyles to the folder %s."), path_scripts, path_styles); + g_free (path_scripts); + g_free (path_styles); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); }