From 4158114036336446c7c4f793db0ae031dfa558c2 Mon Sep 17 00:00:00 2001 From: Christian Neumair Date: Wed, 21 May 2003 12:15:32 +0000 Subject: data/glade/epiphany.glade data/glade/prefs-dialog.glade * data/glade/epiphany.glade * data/glade/prefs-dialog.glade * data/epiphany.schemas.in * embed/downloader-view.c * embed/downloader-view.h: Applied patch from #113367 which inter alia removes the keep_open option from the download manager and does various download UI tweakage. --- ChangeLog | 11 ++++++ data/glade/epiphany.glade | 91 +++++++++++++++++-------------------------- data/glade/prefs-dialog.glade | 2 +- embed/downloader-view.c | 46 +++++++--------------- embed/downloader-view.h | 2 - 5 files changed, 60 insertions(+), 92 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14b65dcc4..540f3e99b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-05-21 Christian Neumair + + * data/glade/epiphany.glade + * data/glade/prefs-dialog.glade + * data/epiphany.schemas.in + * embed/downloader-view.c + * embed/downloader-view.h: + + Applied patch from #113367 which inter alia removes the keep_open + option from the download manager and does various download UI tweakage. + 2003-05-21 Marco Pesenti Gritti * src/bookmarks/ephy-bookmarks-editor.c: diff --git a/data/glade/epiphany.glade b/data/glade/epiphany.glade index 33f9b236d..135c6540d 100644 --- a/data/glade/epiphany.glade +++ b/data/glade/epiphany.glade @@ -302,7 +302,7 @@ 12 - Downloading + Download Manager GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False @@ -402,28 +402,12 @@ - + True - False - 12 - - - - True - True - _Keep dialog open - True - GTK_RELIEF_NORMAL - False - False - True - - - 0 - True - True - - + 1 + 0.5 + 0 + 0 @@ -468,7 +452,7 @@ True - Download _Details... + Download _Details True False GTK_JUSTIFY_LEFT @@ -490,11 +474,6 @@ - - 0 - False - False - @@ -504,16 +483,6 @@ - - - - - 0 - False - False - - - False @@ -526,7 +495,20 @@ 2 False 6 - 6 + 12 + + + + True + + + 0 + 2 + 0 + 1 + fill + + @@ -545,8 +527,8 @@ 0 1 - 0 - 1 + 1 + 2 fill @@ -569,8 +551,8 @@ 0 1 - 1 - 2 + 2 + 3 fill @@ -593,8 +575,8 @@ 0 1 - 2 - 3 + 3 + 4 fill @@ -617,15 +599,15 @@ 0 1 - 3 - 4 + 4 + 5 fill - + True False @@ -643,13 +625,12 @@ 2 2 3 - fill - + True False @@ -667,13 +648,12 @@ 2 3 4 - fill - + True False @@ -689,9 +669,8 @@ 1 2 - 1 - 2 - fill + 4 + 5 @@ -708,7 +687,7 @@ 2 5 6 - fill + diff --git a/data/glade/prefs-dialog.glade b/data/glade/prefs-dialog.glade index 7d6fe4e26..3d9b7abd9 100644 --- a/data/glade/prefs-dialog.glade +++ b/data/glade/prefs-dialog.glade @@ -8,7 +8,7 @@ 5 Preferences GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE + GTK_WIN_POS_CENTER False True False diff --git a/embed/downloader-view.c b/embed/downloader-view.c index 79acafc76..3aeb4e05c 100644 --- a/embed/downloader-view.c +++ b/embed/downloader-view.c @@ -70,7 +70,6 @@ struct DownloaderViewPrivate GtkWidget *details_remaining; GtkWidget *details_progress; GtkWidget *details_button; - GtkWidget *keep_open_check; GtkWidget *open_button; GtkWidget *pause_button; @@ -105,9 +104,7 @@ enum { PROP_WINDOW, PROP_TREEVIEW, - PROP_KEEP_OPEN, PROP_DETAILS_FRAME, - PROP_DETAILS_SEPARATOR, PROP_DETAILS_TABLE, PROP_DETAILS_STATUS, PROP_DETAILS_ELAPSED, @@ -124,9 +121,7 @@ EphyDialogProperty properties [] = { { PROP_WINDOW, "download_manager_dialog", NULL, PT_NORMAL, NULL}, { PROP_TREEVIEW, "clist", NULL, PT_NORMAL, NULL }, - { PROP_KEEP_OPEN, "keep_open_check", CONF_DOWNLOADING_KEEP_OPEN, PT_NORMAL, NULL }, { PROP_DETAILS_FRAME, "details_frame", NULL, PT_NORMAL, NULL }, - { PROP_DETAILS_SEPARATOR, "details_separator", NULL, PT_NORMAL, NULL }, { PROP_DETAILS_TABLE, "details_table", NULL, PT_NORMAL, NULL }, { PROP_DETAILS_STATUS, "details_status", NULL, PT_NORMAL, NULL }, { PROP_DETAILS_ELAPSED, "details_elapsed", NULL, PT_NORMAL, NULL }, @@ -611,7 +606,6 @@ downloader_view_remove_download (DownloaderView *dv, { DownloadDetails *details; GtkTreeIter iter; - GValue keep_open = {0, }; details = g_hash_table_lookup (dv->priv->details_hash, persist_object); @@ -626,17 +620,7 @@ downloader_view_remove_download (DownloaderView *dv, g_hash_table_remove (dv->priv->details_hash, persist_object); - ephy_dialog_get_value (EPHY_DIALOG(dv), PROP_KEEP_OPEN, &keep_open); - - if (!g_value_get_boolean (&keep_open) && - g_hash_table_size (dv->priv->details_hash) == 0) - { - g_object_unref (dv); - } - else - { - ensure_selected_row (dv); - } + ensure_selected_row (dv); } void @@ -677,7 +661,6 @@ downloader_view_set_download_status (DownloaderView *dv, { DownloadDetails *details; GtkTreeIter iter; - GValue keep_open = {0, }; details = g_hash_table_lookup (dv->priv->details_hash, persist_object); @@ -692,13 +675,10 @@ downloader_view_set_download_status (DownloaderView *dv, downloader_view_set_download_info (dv->priv, details, &iter); downloader_view_update_controls (dv->priv); - ephy_dialog_get_value (EPHY_DIALOG(dv), PROP_KEEP_OPEN, &keep_open); - - if (status == DOWNLOAD_STATUS_COMPLETED && - !g_value_get_boolean (&keep_open)) +/* if (status == DOWNLOAD_STATUS_COMPLETED) { downloader_view_remove_download (dv, persist_object); - } + }*/ } static void @@ -725,7 +705,6 @@ downloader_view_build_ui (DownloaderView *dv) priv->details_elapsed = ephy_dialog_get_control (d, PROP_DETAILS_ELAPSED); priv->details_remaining = ephy_dialog_get_control (d, PROP_DETAILS_REMAINING); priv->details_progress = ephy_dialog_get_control (d, PROP_DETAILS_PROGRESS); - priv->keep_open_check = ephy_dialog_get_control (d, PROP_KEEP_OPEN); priv->details_button = ephy_dialog_get_control (d, PROP_DETAILS_BUTTON); priv->open_button = ephy_dialog_get_control (d, PROP_OPEN_BUTTON); priv->pause_button = ephy_dialog_get_control (d, PROP_PAUSE_BUTTON); @@ -734,8 +713,9 @@ downloader_view_build_ui (DownloaderView *dv) /* create file and location details labels */ priv->details_location = ephy_ellipsizing_label_new (""); - gtk_table_attach_defaults (GTK_TABLE(details_table), priv->details_location, - 1, 2, 0, 1); + gtk_table_attach_defaults (GTK_TABLE(details_table), + priv->details_location, + 1, 2, 1, 2); gtk_misc_set_alignment (GTK_MISC(priv->details_location), 0, 0); gtk_label_set_selectable (GTK_LABEL(priv->details_location), TRUE); gtk_widget_show (priv->details_location); @@ -904,11 +884,14 @@ downloader_treeview_selection_changed_cb (GtkTreeSelection *selection, GValue val = {0, }; gpointer *persist_object; DownloadDetails *details = NULL; + GtkWidget *details_button; GtkWidget *details_frame; DownloaderViewPrivate *priv= dv->priv; + details_button = ephy_dialog_get_control (EPHY_DIALOG(dv), + PROP_DETAILS_BUTTON); details_frame = ephy_dialog_get_control (EPHY_DIALOG(dv), - PROP_DETAILS_FRAME); + PROP_DETAILS_FRAME); if (get_selected_row (priv, &iter)) { @@ -919,6 +902,7 @@ downloader_treeview_selection_changed_cb (GtkTreeSelection *selection, persist_object); g_return_if_fail (details); + gtk_widget_set_sensitive (details_button, TRUE); gtk_widget_set_sensitive (details_frame, TRUE); downloader_view_update_details (priv, details); @@ -935,6 +919,8 @@ downloader_treeview_selection_changed_cb (GtkTreeSelection *selection, 0); gtk_widget_set_sensitive (details_frame, FALSE); + if (!gtk_tree_model_get_iter_first (priv->model, &iter)) + gtk_widget_set_sensitive (details_button, FALSE); } } @@ -1003,23 +989,17 @@ download_dialog_details_cb (GtkToggleButton *button, DownloaderView *dv) { GtkWidget *details_frame; - GtkWidget *details_separator; details_frame = ephy_dialog_get_control (EPHY_DIALOG(dv), PROP_DETAILS_FRAME); - details_separator = ephy_dialog_get_control (EPHY_DIALOG(dv), - PROP_DETAILS_SEPARATOR); - if (gtk_toggle_button_get_active (button)) { gtk_widget_show (GTK_WIDGET (details_frame)); - gtk_widget_show (GTK_WIDGET (details_separator)); dv->priv->show_details = TRUE; } else { gtk_widget_hide (GTK_WIDGET (details_frame)); - gtk_widget_hide (GTK_WIDGET (details_separator)); dv->priv->show_details = FALSE; } diff --git a/embed/downloader-view.h b/embed/downloader-view.h index 1a5d9bbdb..2b0b182a3 100644 --- a/embed/downloader-view.h +++ b/embed/downloader-view.h @@ -39,8 +39,6 @@ typedef struct DownloaderViewClass DownloaderViewClass; typedef struct DownloaderViewPrivate DownloaderViewPrivate; -#define CONF_DOWNLOADING_KEEP_OPEN "/apps/epiphany/downloader/keep_open" - typedef enum { DOWNLOAD_STATUS_DOWNLOADING, -- cgit v1.2.3