file-roller r2291 - in trunk: . src
- From: paobac svn gnome org
- To: svn-commits-list gnome org
- Subject: file-roller r2291 - in trunk: . src
- Date: Mon, 2 Jun 2008 17:33:04 +0000 (UTC)
Author: paobac
Date: Mon Jun 2 17:33:04 2008
New Revision: 2291
URL: http://svn.gnome.org/viewvc/file-roller?rev=2291&view=rev
Log:
2008-06-02 Paolo Bacchilega <paobac svn gnome org>
* src/fr-window.c (fr_window_update_files):
(fr_window_open_files):
(fr_window_open_files_with_command):
(fr_window_open_files_with_application):
* src/fr-window.h:
* src/dlg-update.c (update_cb):
Do not allow to open a file or update the archive when an operation is
underway.
Fixes bug #532789 â file-roller crashes when modifying archive,
data destroyed
2008-06-02 Paolo Bacchilega <paobac svn gnome org>
* src/file-utils.c (get_temp_work_dir):
Added a check to avoid segfault described in bug #529949
Modified:
trunk/ChangeLog
trunk/src/dlg-update.c
trunk/src/file-utils.c
trunk/src/fr-window.c
trunk/src/fr-window.h
Modified: trunk/src/dlg-update.c
==============================================================================
--- trunk/src/dlg-update.c (original)
+++ trunk/src/dlg-update.c Mon Jun 2 17:33:04 2008
@@ -100,18 +100,19 @@
{
DialogData *data = callback_data;
GList *selection;
- int n_files;
selection = get_selected_files (data);
- fr_window_update_files (data->window, selection);
+ if (fr_window_update_files (data->window, selection)) {
+ int n_files;
+
+ n_files = g_list_length (data->file_list);
+ if (n_files == 1)
+ gtk_widget_destroy (data->update_file_dialog);
+ else
+ gtk_widget_destroy (data->update_files_dialog);
+ }
if (selection != NULL)
g_list_free (selection);
-
- n_files = g_list_length (data->file_list);
- if (n_files == 1)
- gtk_widget_destroy (data->update_file_dialog);
- else
- gtk_widget_destroy (data->update_files_dialog);
}
Modified: trunk/src/file-utils.c
==============================================================================
--- trunk/src/file-utils.c (original)
+++ trunk/src/file-utils.c Mon Jun 2 17:33:04 2008
@@ -887,7 +887,7 @@
g_free (folder);
}
- if (best_folder == NULL)
+ if ((best_folder == NULL) || (strncmp (best_folder, "file://", 7) != 0))
return NULL;
template = g_strconcat (best_folder + strlen ("file://"), "/.fr-XXXXXX", NULL);
Modified: trunk/src/fr-window.c
==============================================================================
--- trunk/src/fr-window.c (original)
+++ trunk/src/fr-window.c Mon Jun 2 17:33:04 2008
@@ -7507,6 +7507,9 @@
CommandData *cdata;
GList *scan;
+ if (window->priv->activity_ref > 0)
+ return;
+
/* The command data is used to unref the process on exit. */
cdata = g_new0 (CommandData, 1);
@@ -7535,6 +7538,9 @@
GList *uris = NULL, *scan;
GError *error = NULL;
+ if (window->priv->activity_ref > 0)
+ return;
+
for (scan = file_list; scan; scan = scan->next) {
char *filename = g_filename_to_uri (scan->data, NULL, NULL);
uris = g_list_prepend (uris, filename);
@@ -7611,12 +7617,15 @@
}
-void
+gboolean
fr_window_update_files (FrWindow *window,
GList *file_list)
{
GList *scan;
+ if (window->priv->activity_ref > 0)
+ return FALSE;
+
fr_process_clear (window->archive->process);
for (scan = file_list; scan; scan = scan->next) {
@@ -7635,6 +7644,8 @@
}
fr_process_start (window->archive->process);
+
+ return TRUE;
}
@@ -7811,6 +7822,9 @@
{
OpenFilesData *odata;
+ if (window->priv->activity_ref > 0)
+ return;
+
odata = open_files_data_new (window, file_list, ask_application);
fr_window_set_current_batch_action (window,
FR_BATCH_ACTION_OPEN_FILES,
Modified: trunk/src/fr-window.h
==============================================================================
--- trunk/src/fr-window.h (original)
+++ trunk/src/fr-window.h Mon Jun 2 17:33:04 2008
@@ -245,7 +245,7 @@
void fr_window_open_files_with_application (FrWindow *window,
GList *file_list,
GAppInfo *app);
-void fr_window_update_files (FrWindow *window,
+gboolean fr_window_update_files (FrWindow *window,
GList *file_list);
void fr_window_update_columns_visibility (FrWindow *window);
void fr_window_update_history_list (FrWindow *window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]