[file-roller: 27/123] fixed some crashes here and there
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller: 27/123] fixed some crashes here and there
- Date: Mon, 6 Aug 2012 13:43:08 +0000 (UTC)
commit 36d70f34155dafc86fb990965383a14cce210e8d
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Jul 20 22:55:55 2012 +0200
fixed some crashes here and there
src/fr-process.c | 13 +++++++++----
src/fr-window.c | 13 ++++++++-----
src/main.c | 1 +
3 files changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/src/fr-process.c b/src/fr-process.c
index db427cc..4676895 100644
--- a/src/fr-process.c
+++ b/src/fr-process.c
@@ -659,15 +659,17 @@ execute_cancelled_cb (GCancellable *cancellable,
ExecuteData *exec_data = user_data;
FrProcess *process = exec_data->process;
- g_cancellable_disconnect (exec_data->cancellable, exec_data->cancel_id);
- exec_data->cancel_id = 0;
-
if (! process->priv->running)
return;
if (process->priv->stopping)
return;
+ if (exec_data->cancel_id != 0) {
+ g_cancellable_disconnect (exec_data->cancellable, exec_data->cancel_id);
+ exec_data->cancel_id = 0;
+ }
+
process->priv->stopping = TRUE;
exec_data->error = fr_error_new (FR_ERROR_STOPPED, 0, NULL);
@@ -1059,8 +1061,11 @@ fr_process_execute_finish (FrProcess *process,
if (exec_data->error == NULL)
return TRUE;
- if (error != NULL)
+ if (error != NULL) {
+ if (exec_data->error->gerror == NULL)
+ exec_data->error->gerror = g_error_new_literal (FR_ERROR, exec_data->error->type, "");
*error = fr_error_copy (exec_data->error);
+ }
return FALSE;
}
diff --git a/src/fr-window.c b/src/fr-window.c
index bb4017f..2927758 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -544,8 +544,10 @@ fr_window_free_private_data (FrWindow *window)
window->priv->update_timeout_handle = 0;
}
- while (window->priv->activity_ref > 0)
- fr_window_stop_activity_mode (window);
+ if (window->priv->activity_timeout_handle != 0) {
+ g_source_remove (window->priv->activity_timeout_handle);
+ window->priv->activity_timeout_handle = 0;
+ }
if (window->priv->progress_timeout != 0) {
g_source_remove (window->priv->progress_timeout);
@@ -832,7 +834,7 @@ fr_window_init (FrWindow *window)
window->priv->use_progress_dialog = TRUE;
window->priv->batch_title = NULL;
window->priv->cancellable = g_cancellable_new ();
-
+ window->priv->compression = FR_COMPRESSION_NORMAL;
window->archive = NULL;
g_signal_connect (window,
@@ -2578,7 +2580,7 @@ display_progress_dialog (gpointer data)
gtk_widget_show (GTK_WIDGET (window));
gtk_widget_hide (window->priv->progress_bar);
gtk_widget_show (window->priv->progress_dialog);
- fr_archive_message (window->archive, window->priv->pd_last_message);
+ fr_archive_message_cb (NULL, window->priv->pd_last_message, window);
}
window->priv->progress_timeout = 0;
@@ -4620,12 +4622,13 @@ selection_changed_cb (GtkTreeSelection *selection,
}
-static void
+static gboolean
fr_window_delete_event_cb (GtkWidget *caller,
GdkEvent *event,
FrWindow *window)
{
fr_window_close (window);
+ return TRUE;
}
diff --git a/src/main.c b/src/main.c
index dc18820..35b8006 100644
--- a/src/main.c
+++ b/src/main.c
@@ -602,6 +602,7 @@ fr_application_create_option_context (void)
context = g_option_context_new (N_("- Create and modify an archive"));
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
+ g_option_context_set_ignore_unknown_options (context, TRUE);
if (g_once_init_enter (&initialized)) {
g_option_context_add_group (context, gtk_get_option_group (TRUE));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]