Commit 24fc218c authored by Marco Pesenti Gritti's avatar Marco Pesenti Gritti

Merge new-downloader branch. We reworked the backend, the user

interface is still incomplete.
parent b7a8e995
......@@ -189,6 +189,308 @@
Merge fixes from branch and clean up.
2003-10-16 Marco Pesenti Gritti <marco@gnome.org>
* embed/mozilla/ContentHandler.cpp:
pass handler with full path, not only
exec name. I dont get how it worked before.
2003-10-16 Marco Pesenti Gritti <marco@gnome.org>
* lib/widgets/ephy-cell-renderer-progress.c:
(ephy_cell_renderer_progress_init),
(ephy_cell_renderer_progress_set_value),
(ephy_cell_renderer_progress_set_property), (compute_dimensions),
(ephy_cell_renderer_progress_get_size),
(ephy_cell_renderer_progress_render),
(ephy_cell_renderer_progress_finalize),
(ephy_cell_renderer_progress_class_init):
* lib/widgets/ephy-cell-renderer-progress.h:
fix for unknown/failed states
2003-10-16 Xan Lopez <xan@masilla.org>
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/MozDownload.h:
Unbreak for real.
2003-10-16 Xan Lopez <xan@masilla.org>
* TODO:
* embed/downloader-view.c:
* embed/mozilla/MozDownload.cpp:
Evil marco loves to break my changes, ahem.
2003-10-16 Marco Pesenti Gritti <marco@gnome.org>
* TODO:
* embed/downloader-view.c: (downloader_view_init),
(get_row_from_download), (download_changed_cb),
(downloader_view_add_download), (downloader_view_build_ui),
(download_dialog_pause_cb), (downloader_view_remove_download),
(download_dialog_abort_cb):
* embed/ephy-download.c: (ephy_download_get_state):
* embed/ephy-download.h:
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/MozDownload.h:
* embed/mozilla/mozilla-download.cpp:
Implement state.
2003-10-16 Marco Pesenti Gritti <marco@gnome.org>
* data/glade/epiphany.glade:
Remove details
* embed/downloader-view.c:
Remove details button leftover
2003-10-16 Marco Pesenti Gritti <marco@gnome.org>
* embed/mozilla/MozDownload.cpp:
Fix some bugs
2003-10-16 Marco Pesenti Gritti <marco@gnome.org>
* embed/ephy-embed-persist.h:
* embed/ephy-favicon-cache.c: (ephy_favicon_cache_download):
* embed/mozilla/EphyHeaderSniffer.cpp:
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/MozDownload.h:
Implement no_view downloads and use for favicons.
2003-10-15 Marco Pesenti Gritti <marco@gnome.org>
* embed/mozilla/MozDownload.cpp:
Fix reference problem when using persist.
2003-10-15 Xan Lopez <xan@masilla.org>
* data/glade/epiphany.glade:
* embed/downloader-view.c: (downloader_view_init),
(downloader_view_finalize), (download_changed_cb),
(downloader_view_add_download), (downloader_view_build_ui),
(download_dialog_pause_cb), (downloader_view_remove_download),
(download_dialog_abort_cb), (download_dialog_delete_cb):
Re-add abort UI, drop details
Serious glade cleanup is left as an exercise for the reader
2003-10-15 Xan Lopez <xan@masilla.org>
* data/glade/epiphany.glade:
* embed/downloader-view.c: (downloader_view_add_download),
(download_dialog_pause_cb), (download_dialog_abort_cb):
* embed/downloader-view.h:
Fix stop button (UI not updated yet)
* embed/mozilla/MozDownload.cpp:
Init mEmbedPersist to nsnull (Marco)
2003-10-14 Marco Pesenti Gritti <marco@gnome.org>
* embed/downloader-view.c: (format_interval),
(download_changed_cb), (downloader_view_build_ui):
* embed/ephy-download.c: (ephy_download_get_remaining_time),
(ephy_download_get_current_progress),
(ephy_download_get_total_progress), (ephy_download_get_percent),
(ephy_download_get_elapsed_time):
* embed/ephy-download.h:
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/MozDownload.h:
* embed/mozilla/mozilla-download.cpp:
* lib/widgets/Makefile.am:
Get back the treeview info to work. Use
procman progress renderer for percent.
2003-10-14 Marco Pesenti Gritti <marco@gnome.org>
* embed/downloader-view.c: (download_changed_cb),
(downloader_view_add_download):
Fix percent/filenamee
2003-10-14 Marco Pesenti Gritti <marco@gnome.org>
* embed/downloader-view.c: (download_changed_cb),
(downloader_view_add_download), (downloader_view_build_ui),
(downloader_treeview_selection_changed_cb):
* embed/ephy-download.c: (ephy_download_class_init),
(ephy_download_new), (ephy_download_get_name):
* embed/ephy-download.h:
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/MozDownload.h:
Implement a download changed signal and try to update
percent in the treeview.
2003-10-14 Marco Pesenti Gritti <marco@gnome.org>
* embed/ephy-download.c: (ephy_download_get_source),
(ephy_download_get_target), (ephy_download_get_percent):
* embed/ephy-download.h:
* embed/mozilla/mozilla-download.cpp:
Implement basic download info getters.
2003-10-14 Marco Pesenti Gritti <marco@gnome.org>
* embed/Makefile.am:
* embed/downloader-view.c: (destroy_details_cb),
(downloader_view_update_controls),
(downloader_view_update_details),
(downloader_view_set_download_info),
(downloader_view_add_download), (downloader_view_build_ui),
(download_dialog_pause_cb), (download_dialog_abort_cb),
(downloader_treeview_selection_changed_cb),
(download_dialog_delete_cb), (open_selection_foreach),
(download_dialog_open_cb):
* embed/downloader-view.h:
* embed/ephy-download.c: (ephy_download_get_type),
(ephy_download_class_init), (ephy_download_init),
(ephy_download_new), (ephy_download_cancel), (ephy_download_pause),
(ephy_download_resume):
* embed/ephy-download.h:
* embed/ephy-embed-shell.c: (impl_get_downloader_view):
* embed/mozilla/EphyDownload.cpp:
* embed/mozilla/EphyDownload.h:
* embed/mozilla/EphyHeaderSniffer.cpp:
* embed/mozilla/Makefile.am:
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/MozDownload.h:
* embed/mozilla/MozRegisterComponents.cpp:
* embed/mozilla/mozilla-download.cpp:
* embed/mozilla/mozilla-download.h:
* embed/mozilla/mozilla-embed-persist.cpp:
* lib/Makefile.am:
* lib/widgets/Makefile.am:
* src/Makefile.am:
* src/bookmarks/Makefile.am:
Big architectural changes. Now I think it make sense,
but we need to rewrite a lot of ui code.
2003-10-14 Xan Lopez <xan@masilla.org>
* embed/downloader-view.c: (downloader_view_class_init),
(download_dialog_pause_cb), (delete_pending_foreach):
* embed/mozilla/mozilla-downloader-view.cpp:
* embed/mozilla/mozilla-downloader-view.h:
Some cleanups.
2003-10-14 Xan Lopez <xan@masilla.org>
* embed/downloader-view.c: (download_dialog_abort_cb),
(downloader_cancel_download):
* embed/mozilla/mozilla-downloader-view.cpp:
Evil stuff.
2003-10-14 Xan Lopez <xan@masilla.org>
* embed/ephy-embed-shell.c: (impl_get_downloader_view):
* embed/mozilla/mozilla-downloader-view.cpp:
* embed/mozilla/mozilla-downloader-view.h:
And More.
2003-10-13 Xan Lopez <xan@masilla.org>
* embed/mozilla/EphyDownload.h:
Cleanup
* embed/mozilla/Makefile.am:
* embed/mozilla/mozilla-downloader-view.cpp:
* embed/mozilla/mozilla-downloader-view.h:
Yet More Work.
2003-10-13 Xan Lopez <xan@masilla.org>
* embed/downloader-view.c: (downloader_view_class_init),
(download_dialog_pause_cb), (download_dialog_abort_cb),
(delete_pending_foreach), (downloader_cancel_download),
(downloader_pause_download), (downloader_resume_download):
* embed/downloader-view.h:
More work.
2003-10-07 Marco Pesenti Gritti <marco@gnome.org>
* embed/mozilla/EphyHeaderSniffer.cpp:
Fix crash when download start
2003-10-07 Marco Pesenti Gritti <marco@gnome.org>
* embed/ephy-embed-persist.h:
* embed/ephy-embed-popup-control.c: (save_property_url),
(embed_popup_download_link_cmd), (embed_popup_save_image_as_cmd),
(save_url), (embed_popup_save_page_as_cmd),
(embed_popup_save_background_as_cmd):
* embed/ephy-embed-utils.c: (ephy_embed_utils_save):
* embed/ephy-embed-utils.h:
* embed/mozilla/EphyDownload.cpp:
* embed/mozilla/EphyDownload.h:
* embed/mozilla/EphyHeaderSniffer.cpp:
* embed/mozilla/EphyHeaderSniffer.h:
* embed/mozilla/mozilla-embed-persist.cpp:
* src/popup-commands.c: (save_property_url),
(popup_cmd_download_link), (popup_cmd_save_image_as),
(popup_cmd_save_background_as):
* src/window-commands.c: (window_cmd_file_save_as):
Make embed-persist use nsIDownload and cleanup api a bit.
2003-10-06 Xan Lopez <xan@masilla.org>
* embed/mozilla/ContentHandler.cpp:
* embed/mozilla/EphyWrapper.cpp:
* embed/mozilla/EphyWrapper.h:
* embed/mozilla/EventContext.cpp:
* embed/mozilla/GlobalHistory.h:
* embed/mozilla/ProgressListener.cpp:
* embed/mozilla/ProgressListener.h:
* embed/mozilla/mozilla-embed-persist.cpp:
Remove ProgressListener again, hopefully everything
compiles without it now.
2003-10-06 Xan Lopez <xan@masilla.org>
* embed/mozilla/EphyDownload.cpp:
* embed/mozilla/EphyDownload.h:
* embed/mozilla/EphyHeaderSniffer.cpp:
* embed/mozilla/EphyHeaderSniffer.h:
* embed/mozilla/MozRegisterComponents.cpp:
* embed/mozilla/ProgressListener.cpp:
* embed/mozilla/ProgressListener.h:
* embed/mozilla/mozilla-embed-persist.cpp:
Cleanups.
2003-10-06 Xan Lopez <xan@masilla.org>
* embed/mozilla/Makefile.am:
* embed/mozilla/MozRegisterComponents.cpp:
* embed/mozilla/mozilla-embed-persist.cpp:
Make it work, behold the all new EphyDownload.
2003-10-06 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-notebook.c: (find_notebook_at_pointer),
......
- Check that filtering is not done more than one time on bookmarks dialogs init
- change font size pref name or convert if possible
Downloader:
- Update rate (used for estimated time) only after some time, otherwise estimated
keep to chang in an annoying way
- Fixup column sizing. Ideally filename should get all available space, the
others column can get the minimum (for progress we can just fixup requisition
in the renderer to something sane)
- Fix hash table destruction. Free row refs and unref download objects.
- Cleanup downloader-view, there is prolly still crap here and there
- Add LOGs on all objects involved in download. Init/Finalize and in c++
constructor/destructor. Verify that references are correct == objects
are destroyed at right time.
- Probably use cur from total instead of just total in the size field
- Deal with the case where total size is unknown (we need special rendering
for progress too I guess)
- Initialize progress values when starting the download
- Need a way to do downloads without view, for favicons
- expand filename col in downloader
......@@ -400,310 +400,6 @@
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment8">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkToggleButton" id="details_togglebutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<signal name="toggled" handler="download_dialog_details_cb" last_modification_time="Sat, 01 Jun 2002 23:52:31 GMT"/>
<child>
<widget class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkHBox" id="hbox83">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label1220">
<property name="visible">True</property>
<property name="label" translatable="yes">Download _Details</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="details_frame">
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkTable" id="details_table">
<property name="visible">True</property>
<property name="n_rows">6</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<widget class="GtkHSeparator" id="details_separator">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label1142">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Address:&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_RIGHT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label1211">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Status:&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label1212">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Time Elapsed:&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label1213">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Time Remaining:&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="details_status">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="details_elapsed">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="details_remaining">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkProgressBar" id="details_progress">
<property name="visible">True</property>
<property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
<property name="fraction">0</property>
<property name="pulse_step">0.1</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
......
This diff is collapsed.
......@@ -20,6 +20,7 @@
#define DOWNLOADER_VIEW_H
#include "ephy-dialog.h"
#include "ephy-download.h"
#include <glib-object.h>
#include <glib.h>
......@@ -37,14 +38,6 @@ typedef struct DownloaderView DownloaderView;
typedef struct DownloaderViewClass DownloaderViewClass;
typedef struct DownloaderViewPrivate DownloaderViewPrivate;
typedef enum
{
DOWNLOAD_STATUS_DOWNLOADING,
DOWNLOAD_STATUS_PAUSED,
DOWNLOAD_STATUS_RESUMING,
DOWNLOAD_STATUS_COMPLETED
} DownloadStatus;
struct DownloaderView
{
EphyDialog parent;
......@@ -54,10 +47,6 @@ struct DownloaderView
struct DownloaderViewClass
{
EphyDialogClass parent_class;
void (*download_remove) (DownloaderView *dv, gpointer persist_object);
void (*download_pause) (DownloaderView *dv, gpointer persist_object);
void (*download_resume) (DownloaderView *dv, gpointer persist_object);
};
GType downloader_view_get_type (void);
......@@ -65,26 +54,10 @@ GType downloader_view_get_type (void);
DownloaderView *downloader_view_new (void);
void downloader_view_add_download (DownloaderView *dv,
gchar *filename,
gchar *source,
gchar *dest,
gpointer persist_object);
EphyDownload *download);
void downloader_view_remove_download (DownloaderView *dv,
gpointer persist_object);
void downloader_view_set_download_status (DownloaderView *dv,
DownloadStatus status,
gpointer persist_object);
void downloader_view_set_download_progress (DownloaderView *dv,
glong elapsed,
glong remaining,
gfloat speed,
gint size_total,
gint size_done,
gfloat progress,
gpointer persist_object);
EphyDownload *download);
G_END_DECLS
......
/*
* Copyright (C) 2000, 2001, 2002 Marco Pesenti Gritti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "ephy-download.h"
#include <libgnomevfs/gnome-vfs-uri.h>
static void
ephy_download_class_init (EphyDownloadClass *klass);
static void
ephy_download_init (EphyDownload *dv);
enum
{
CHANGED,
LAST_SIGNAL
};
static GObjectClass *parent_class = NULL;
static guint ephy_download_signals[LAST_SIGNAL] = { 0 };