]>
Commit | Line | Data |
---|---|---|
c73c285a MK |
1 | diff -Nuard control-center-2.4.0.orig/capplets/theme-switcher/gnome-theme-installer.c control-center-2.4.0/capplets/theme-switcher/gnome-theme-installer.c |
2 | --- control-center-2.4.0.orig/capplets/theme-switcher/gnome-theme-installer.c 2003-01-16 08:40:29.000000000 +0100 | |
3 | +++ control-center-2.4.0/capplets/theme-switcher/gnome-theme-installer.c 2003-11-19 23:45:37.518048240 +0100 | |
4 | @@ -105,6 +105,7 @@ | |
5 | GnomeVFSURI *src_uri; | |
6 | const gchar *raw; | |
7 | gboolean icon_theme; | |
8 | + gchar *temppath; | |
9 | ||
10 | if (response_id == GTK_RESPONSE_HELP) { | |
11 | capplet_help (GTK_WINDOW (widget), | |
12 | @@ -133,6 +134,33 @@ | |
13 | path = g_build_filename (g_get_home_dir (), ".icons", base, NULL); | |
14 | else | |
15 | path = g_build_filename (g_get_home_dir (), ".themes", base, NULL); | |
16 | + | |
17 | + /* To avoid the copy of /root/.themes to /root/.themes/.themes | |
18 | + * which causes an infinite loop. The user asks to transfer the all | |
19 | + * contents of a folder, to a folder under itseld. So ignore the | |
20 | + * situation. | |
21 | + */ | |
22 | + temppath = g_build_filename (filename, ".themes", NULL); | |
23 | + if (!strcmp(temppath, path)) { | |
24 | + GtkWidget *dialog; | |
25 | + | |
26 | + dialog = gtk_message_dialog_new (NULL, | |
27 | + GTK_DIALOG_MODAL, | |
28 | + GTK_MESSAGE_ERROR, | |
29 | + GTK_BUTTONS_OK, | |
30 | + _("%s is the path where the theme files will be installed. This can not be selected as the source location"), filename); | |
31 | + gtk_dialog_run (GTK_DIALOG (dialog)); | |
32 | + gtk_widget_destroy (dialog); | |
33 | + | |
34 | + g_free (base); | |
35 | + g_free (filename); | |
36 | + g_free(temppath); | |
37 | + return; | |
38 | + } | |
39 | + g_free(temppath); | |
40 | + | |
41 | + | |
42 | + | |
43 | target = g_list_append (NULL, gnome_vfs_uri_new (path)); | |
44 | ||
45 | dlg = file_transfer_dialog_new (); |