Fix for bug #116224, infinite loop when installing themes from ~/.themes.
This commit is contained in:
parent
5f6ff6ffcf
commit
f24fdfa8e8
2 changed files with 33 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-12-05 Srinivasa Ragavan <sragavan@novell.com>
|
||||||
|
|
||||||
|
* gnome-theme-installer.c (install_dialog_response): Fix for infinite
|
||||||
|
loop, when trying to install themes from ~/.themes , #116224
|
||||||
|
|
||||||
2003-10-28 Jody Goldberg <jody@gnome.org>
|
2003-10-28 Jody Goldberg <jody@gnome.org>
|
||||||
|
|
||||||
* Release 2.5.0
|
* Release 2.5.0
|
||||||
|
|
|
@ -105,6 +105,7 @@ install_dialog_response (GtkWidget *widget, int response_id, gpointer data)
|
||||||
GnomeVFSURI *src_uri;
|
GnomeVFSURI *src_uri;
|
||||||
const gchar *raw;
|
const gchar *raw;
|
||||||
gboolean icon_theme;
|
gboolean icon_theme;
|
||||||
|
gchar *temppath;
|
||||||
|
|
||||||
if (response_id == GTK_RESPONSE_HELP) {
|
if (response_id == GTK_RESPONSE_HELP) {
|
||||||
capplet_help (GTK_WINDOW (widget),
|
capplet_help (GTK_WINDOW (widget),
|
||||||
|
@ -133,6 +134,33 @@ install_dialog_response (GtkWidget *widget, int response_id, gpointer data)
|
||||||
path = g_build_filename (g_get_home_dir (), ".icons", base, NULL);
|
path = g_build_filename (g_get_home_dir (), ".icons", base, NULL);
|
||||||
else
|
else
|
||||||
path = g_build_filename (g_get_home_dir (), ".themes", base, NULL);
|
path = g_build_filename (g_get_home_dir (), ".themes", base, NULL);
|
||||||
|
|
||||||
|
/* To avoid the copy of /root/.themes to /root/.themes/.themes
|
||||||
|
* which causes an infinite loop. The user asks to transfer the all
|
||||||
|
* contents of a folder, to a folder under itseld. So ignore the
|
||||||
|
* situation.
|
||||||
|
*/
|
||||||
|
temppath = g_build_filename (filename, ".themes", NULL);
|
||||||
|
if (!strcmp(temppath, path)) {
|
||||||
|
GtkWidget *dialog;
|
||||||
|
|
||||||
|
dialog = gtk_message_dialog_new (NULL,
|
||||||
|
GTK_DIALOG_MODAL,
|
||||||
|
GTK_MESSAGE_ERROR,
|
||||||
|
GTK_BUTTONS_OK,
|
||||||
|
_("%s is the path where the theme files will be installed. This can not be selected as the source location"), filename);
|
||||||
|
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
|
|
||||||
|
g_free (base);
|
||||||
|
g_free (filename);
|
||||||
|
g_free(temppath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
g_free(temppath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
target = g_list_append (NULL, gnome_vfs_uri_new (path));
|
target = g_list_append (NULL, gnome_vfs_uri_new (path));
|
||||||
|
|
||||||
dlg = file_transfer_dialog_new ();
|
dlg = file_transfer_dialog_new ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue