This commit is contained in:
Mike Newman 2004-10-28 18:20:17 +00:00
parent 8eac60b616
commit 007bde5c1d
2 changed files with 21 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2004-10-28 Mike Newman <mikegtn@gnome.org>
* gnome-theme-installer.c: (transfer_done_cb) install themes named
.tgz correctly. Show a dialog and remove the file from .themes if the
theme could not be installed (Closes: #148895).
2004-10-27 Sebastien Bacher <seb128@debian.org>
* gnome-theme-installer.c: (transfer_done_targz_idle_cb),

View file

@ -87,12 +87,25 @@ transfer_done_tarbz2_idle_cb (gpointer data)
static void
transfer_done_cb (GtkWidget *dlg, gchar *path)
{
GtkWidget *dialog;
int len = strlen (path);
gtk_widget_destroy (dlg);
if (path && len > 7 && !strcmp (path + len - 7, ".tar.gz"))
g_idle_add (transfer_done_targz_idle_cb, path);
if (path && len > 8 && !strcmp (path + len - 8, ".tar.bz2"))
else if (path && len > 4 && !strcmp (path + len - 4, ".tgz"))
g_idle_add (transfer_done_targz_idle_cb, path);
else if (path && len > 8 && !strcmp (path + len - 8, ".tar.bz2"))
g_idle_add (transfer_done_tarbz2_idle_cb, path);
gtk_widget_destroy (dlg);
else {
dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
_("This theme is not in a supported format."));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
gnome_vfs_unlink (path);
}
}
static void