diff options
author | Iain Holmes <iain@helixcode.com> | 2000-10-18 18:56:11 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2000-10-18 18:56:11 +0800 |
commit | 80dbb750f559f058ef656b012c24b031f0881126 (patch) | |
tree | 5c6b0dcffc27eed9503f2c67675eae81778e8988 | |
parent | 8d91a9c1c66077eb71a0bdab2bd946be70afa1ac (diff) | |
download | gsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.tar.gz gsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.tar.zst gsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.zip |
Save the settings before the view is destroyed. (e_shell_quit): Don't save
2000-10-17 Iain Holmes <iain@helixcode.com>
* e-shell.c (view_deleted_cb): Save the settings before the
view is destroyed.
(e_shell_quit): Don't save the settings when there are no views.
2000-10-16 Iain Holmes <iain@helixcode.com>
* e-setup.c (check_evolution_directory): Better dialog.
* e-splash.c (icon_free): Don't unref the canvas item.
(e_splash_construct): Add a frame round the splash screen.
svn path=/trunk/; revision=5985
-rw-r--r-- | shell/ChangeLog | 13 | ||||
-rw-r--r-- | shell/e-setup.c | 37 | ||||
-rw-r--r-- | shell/e-shell.c | 27 | ||||
-rw-r--r-- | shell/e-splash.c | 11 |
4 files changed, 57 insertions, 31 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 053b4942e7..60f2065c31 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,16 @@ +2000-10-17 Iain Holmes <iain@helixcode.com> + + * e-shell.c (view_deleted_cb): Save the settings before the + view is destroyed. + (e_shell_quit): Don't save the settings when there are no views. + +2000-10-16 Iain Holmes <iain@helixcode.com> + + * e-setup.c (check_evolution_directory): Better dialog. + + * e-splash.c (icon_free): Don't unref the canvas item. + (e_splash_construct): Add a frame round the splash screen. + 2000-10-16 Dan Winship <danw@helixcode.com> * evolution-storage-set-view-factory.c diff --git a/shell/e-setup.c b/shell/e-setup.c index 4e261dd808..85bed117a1 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -90,8 +90,7 @@ static gboolean check_evolution_directory (const char *evolution_directory) { GtkWidget *dialog; - GtkWidget *scroller, *clist; - GtkWidget *label; + GtkWidget *label1, *label2; gboolean retval; GList *newfiles, *l; char *defaultdir; @@ -104,31 +103,19 @@ check_evolution_directory (const char *evolution_directory) if (newfiles == NULL) return TRUE; - dialog = gnome_dialog_new (_("Evolution Installation"), - GNOME_STOCK_BUTTON_OK, - GNOME_STOCK_BUTTON_CANCEL, + dialog = gnome_dialog_new (_("Evolution installation"), + GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); - label = gtk_label_new (_("Since Evolution was installed," - "\nthe following files need to be updated")); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, - TRUE, TRUE, 0); - scroller = gtk_scrolled_window_new (NULL, NULL); - clist = gtk_clist_new (1); - gtk_clist_column_titles_hide (GTK_CLIST (clist)); - - for (l = newfiles; l; l = l->next) { - char *row[1]; - - row[0] = l->data; - gtk_clist_append (GTK_CLIST (clist), row); - } - - gtk_container_add (GTK_CONTAINER (scroller), clist); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), scroller, - TRUE, TRUE, 0); + + label1 = gtk_label_new (_("This new version of Evolution needs to install additional files\ninto your personal Evolution directory")); + label2 = gtk_label_new (_("Please click \"OK\" to install the files, or \"Cancel\" to exit.")); + + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label1, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label2, TRUE, TRUE, 0); + + gtk_widget_show (label1); + gtk_widget_show (label2); - gtk_widget_show (label); - gtk_widget_show_all (scroller); result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); if (result != 0) diff --git a/shell/e-shell.c b/shell/e-shell.c index 1875ba3a44..dc355c85e7 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -464,6 +464,22 @@ set_owner_on_components (EShell *shell) /* EShellView destruction callback. */ +static int +view_deleted_cb (GtkObject *object, + GdkEvent *ev, + gpointer data) +{ + EShell *shell; + + g_assert (E_IS_SHELL_VIEW (object)); + + shell = E_SHELL (data); + e_shell_save_settings (shell); + + /* Destroy it */ + return FALSE; +} + static void view_destroy_cb (GtkObject *object, gpointer data) @@ -476,7 +492,6 @@ view_destroy_cb (GtkObject *object, shell->priv->views = g_list_remove ( shell->priv->views, object); - save_settings_for_views (shell); if (shell->priv->views == NULL) { /* FIXME: This looks like a Bonobo bug to me. */ bonobo_object_ref (BONOBO_OBJECT (shell)); @@ -523,7 +538,10 @@ destroy (GtkObject *object) gtk_signal_disconnect_by_func ( GTK_OBJECT (view), GTK_SIGNAL_FUNC (view_destroy_cb), shell); - + gtk_signal_disconnect_by_func (GTK_OBJECT (view), + GTK_SIGNAL_FUNC (view_deleted_cb), + shell); + gtk_object_destroy (GTK_OBJECT (view)); } @@ -737,6 +755,8 @@ e_shell_new_view (EShell *shell, view = e_shell_view_new (shell); gtk_widget_show (GTK_WIDGET (view)); + gtk_signal_connect (GTK_OBJECT (view), "delete-event", + GTK_SIGNAL_FUNC (view_deleted_cb), shell); gtk_signal_connect (GTK_OBJECT (view), "destroy", GTK_SIGNAL_FUNC (view_destroy_cb), shell); @@ -1016,7 +1036,8 @@ e_shell_quit (EShell *shell) g_return_if_fail (shell != NULL); g_return_if_fail (E_IS_SHELL (shell)); - e_shell_save_settings (shell); + if (shell->priv->views) + e_shell_save_settings (shell); priv = shell->priv; diff --git a/shell/e-splash.c b/shell/e-splash.c index 535eafa2ed..8588d085b8 100644 --- a/shell/e-splash.c +++ b/shell/e-splash.c @@ -134,7 +134,7 @@ icon_free (Icon *icon) { gdk_pixbuf_unref (icon->dark_pixbuf); gdk_pixbuf_unref (icon->light_pixbuf); - gtk_object_unref (GTK_OBJECT (icon->canvas_item)); +/* gtk_object_unref (GTK_OBJECT (icon->canvas_item)); */ g_free (icon); } @@ -271,7 +271,7 @@ e_splash_construct (ESplash *splash, GdkPixbuf *splash_image_pixbuf) { ESplashPrivate *priv; - GtkWidget *canvas; + GtkWidget *canvas, *frame; int image_width, image_height; g_return_if_fail (splash != NULL); @@ -292,7 +292,12 @@ e_splash_construct (ESplash *splash, gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), 0, 0, image_width, image_height); gtk_widget_show (canvas); - gtk_container_add (GTK_CONTAINER (splash), canvas); + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); + gtk_container_add (GTK_CONTAINER (frame), canvas); + gtk_widget_show (frame); + + gtk_container_add (GTK_CONTAINER (splash), frame); gnome_canvas_item_new (GNOME_CANVAS_GROUP (priv->canvas->root), GNOME_TYPE_CANVAS_PIXBUF, |