If the widget is not realized don't do anything, to prevent BadGC's at

2000-10-18  Iain Holmes  <iain@helixcode.com>

        * e-shell-view.c (start_progress_bar): If the widget is not realized
        don't do anything, to prevent BadGC's at shut down.
        (stop_progress_bar): Don't draw anything if the widget is not realized.
        Same reason.

        * e-shell-folder-selection-dialog.c (dbl_click_cb): Emit the
        folder-selected signal.
        (e_shell_folder_selection_dialog_construct): Connect to the e-table's
        double-click signal.

svn path=/trunk/; revision=5995
This commit is contained in:
Iain Holmes
2000-10-18 17:53:52 +00:00
committed by Iain Holmes
parent daaabd4d97
commit b8cf5fe57c
3 changed files with 40 additions and 2 deletions

View File

@ -1,3 +1,15 @@
2000-10-18 Iain Holmes <iain@helixcode.com>
* e-shell-view.c (start_progress_bar): If the widget is not realized
don't do anything, to prevent BadGC's at shut down.
(stop_progress_bar): Don't draw anything if the widget is not realized.
Same reason.
* e-shell-folder-selection-dialog.c (dbl_click_cb): Emit the
folder-selected signal.
(e_shell_folder_selection_dialog_construct): Connect to the e-table's
double-click signal.
2000-10-17 Iain Holmes <iain@helixcode.com>
* e-shell.c (view_deleted_cb): Save the settings before the

View File

@ -120,6 +120,23 @@ impl_destroy (GtkObject *object)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
/* ETable callback */
static void
dbl_click_cb (EStorageSetView *essv,
int row,
EShellFolderSelectionDialog *folder_selection_dialog)
{
EShellFolderSelectionDialogPrivate *priv;
priv = folder_selection_dialog->priv;
if (check_folder_type (folder_selection_dialog)) {
gtk_signal_emit (GTK_OBJECT (folder_selection_dialog),
signals[FOLDER_SELECTED],
e_shell_folder_selection_dialog_get_selected_path (folder_selection_dialog));
}
}
/* GnomeDialog methods. */
@ -288,6 +305,9 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s
priv->storage_set_view = e_storage_set_new_view (priv->storage_set);
GTK_WIDGET_SET_FLAGS (priv->storage_set_view, GTK_CAN_FOCUS);
gtk_signal_connect (GTK_OBJECT (priv->storage_set_view),
"double_click", GTK_SIGNAL_FUNC (dbl_click_cb),
folder_selection_dialog);
g_assert (priv->allowed_types == NULL);
if (allowed_types != NULL) {

View File

@ -711,11 +711,14 @@ start_progress_bar (EShellView *shell_view)
progress = GTK_PROGRESS (priv->progress_bar);
if (!GTK_WIDGET_REALIZED (progress))
return;
if (priv->progress_bar_timeout_id != 0)
return;
priv->progress_bar_timeout_id = gtk_timeout_add (PROGRESS_BAR_TIMEOUT, progress_bar_timeout_cb, shell_view);
gtk_progress_set_activity_mode (progress, TRUE);
gtk_progress_set_value (progress, priv->progress_bar_value);
}
@ -734,6 +737,9 @@ stop_progress_bar (EShellView *shell_view)
priv->progress_bar_timeout_id = 0;
}
if (!GTK_WIDGET_REALIZED (progress_bar))
return;
gtk_progress_set_activity_mode (GTK_PROGRESS (progress_bar), FALSE);
gtk_progress_set_value (GTK_PROGRESS (progress_bar), 0);
}