aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--embed/mozilla/EphyWrapper.cpp4
-rw-r--r--embed/mozilla/Makefile.am2
-rw-r--r--embed/mozilla/PrintProgressListener.cpp116
-rw-r--r--embed/mozilla/PrintProgressListener.h38
5 files changed, 11 insertions, 159 deletions
diff --git a/ChangeLog b/ChangeLog
index 012e20b52..035f15f09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2003-08-13 Marco Pesenti Gritti <marco@.gnome.org>
+ * embed/mozilla/EphyWrapper.cpp:
+ * embed/mozilla/Makefile.am:
+ * embed/mozilla/PrintProgressListener.cpp:
+ * embed/mozilla/PrintProgressListener.h:
+
+ Remove an unused progress listener. Looks like
+ galeon 1 code ?!
+
+2003-08-13 Marco Pesenti Gritti <marco@.gnome.org>
+
* src/ephy-window.c: (show_embed_popup):
Do not show popups on print preview.
diff --git a/embed/mozilla/EphyWrapper.cpp b/embed/mozilla/EphyWrapper.cpp
index fc306898b..3b9856716 100644
--- a/embed/mozilla/EphyWrapper.cpp
+++ b/embed/mozilla/EphyWrapper.cpp
@@ -19,7 +19,6 @@
#include "EphyWrapper.h"
#include "GlobalHistory.h"
#include "ProgressListener.h"
-#include "PrintProgressListener.h"
#include "ephy-embed.h"
#include "ephy-string.h"
@@ -193,8 +192,7 @@ nsresult EphyWrapper::Print (nsIPrintSettings *options, PRBool preview)
if (!preview)
{
- GPrintListener *listener = new GPrintListener();
- result = print->Print (options, listener);
+ result = print->Print (options, nsnull);
}
else
{
diff --git a/embed/mozilla/Makefile.am b/embed/mozilla/Makefile.am
index a17e2d6b8..7e8d2bee9 100644
--- a/embed/mozilla/Makefile.am
+++ b/embed/mozilla/Makefile.am
@@ -73,8 +73,6 @@ libephymozillaembed_la_SOURCES = \
MozRegisterComponents.h \
PrintingPromptService.cpp \
PrintingPromptService.h \
- PrintProgressListener.cpp \
- PrintProgressListener.h \
ProgressListener.cpp \
ProgressListener.h \
mozilla-embed.cpp \
diff --git a/embed/mozilla/PrintProgressListener.cpp b/embed/mozilla/PrintProgressListener.cpp
deleted file mode 100644
index b4cf7b701..000000000
--- a/embed/mozilla/PrintProgressListener.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2002 Philip Langdale
- *
- * 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.
- */
-
-#include "libgnomevfs/gnome-vfs-mime-handlers.h"
-
-/* see the FIXME below */
-#include <locale.h>
-
-#include <libgnome/gnome-exec.h>
-
-#include "PrintProgressListener.h"
-
-
-NS_IMPL_ISUPPORTS1(GPrintListener, nsIWebProgressListener)
-
-GPrintListener::GPrintListener()
-{
- NS_INIT_ISUPPORTS();
- mFilename = NULL;
-}
-
-GPrintListener::GPrintListener(char *filename)
-{
- GPrintListener ();
- mFilename = filename ? g_strdup (filename) : NULL;
-}
-
-GPrintListener::~GPrintListener()
-{
- g_free (mFilename);
-}
-
-/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aStateFlags, in unsigned long aStatus); */
-NS_IMETHODIMP GPrintListener::OnStateChange(nsIWebProgress *aWebProgress,
- nsIRequest *aRequest,
- PRUint32 aStateFlags,
- PRUint32 aStatus)
-{
- if (aStateFlags & nsIWebProgressListener::STATE_STOP)
- {
- GnomeVFSMimeApplication *app;
- gchar *command;
-
- /* FIXME(MOZILLA) ugly workaround for a mozilla problem with
- * reseting the LC_* environment when printing */
- setlocale(LC_ALL,"");
- if (!mFilename) return NS_OK;
-
- /* get the postscript handler */
- app = gnome_vfs_mime_get_default_application
- ("application/postscript");
- if (app)
- {
- command = g_strconcat (app->command, " ",
- mFilename, NULL);
- gnome_execute_shell (g_get_home_dir(), command);
- gnome_vfs_mime_application_free (app);
- g_free (command);
- }
- else return NS_ERROR_FAILURE;
- }
- return NS_OK;
-}
-
-/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
-NS_IMETHODIMP GPrintListener::OnProgressChange(nsIWebProgress *aWebProgress,
- nsIRequest *aRequest,
- PRInt32 aCurSelfProgress,
- PRInt32 aMaxSelfProgress,
- PRInt32 aCurTotalProgress,
- PRInt32 aMaxTotalProgress)
-{
- return NS_OK;
-}
-
-/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location); */
-NS_IMETHODIMP GPrintListener::OnLocationChange(nsIWebProgress *aWebProgress,
- nsIRequest *aRequest,
- nsIURI *location)
-{
- return NS_OK;
-}
-
-/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
-NS_IMETHODIMP GPrintListener::OnStatusChange(nsIWebProgress *aWebProgress,
- nsIRequest *aRequest,
- nsresult aStatus,
- const PRUnichar *aMessage)
-{
- return NS_OK;
-}
-
-/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long state); */
-NS_IMETHODIMP GPrintListener::OnSecurityChange(nsIWebProgress *aWebProgress,
- nsIRequest *aRequest,
- PRUint32 state)
-{
- return NS_OK;
-}
-
-
diff --git a/embed/mozilla/PrintProgressListener.h b/embed/mozilla/PrintProgressListener.h
deleted file mode 100644
index 82577d8ea..000000000
--- a/embed/mozilla/PrintProgressListener.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2002 Philip Langdale
- *
- * 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.
- */
-
-#ifndef __PrintProgressListener_h_
-#define __PrintProgressListener_h_
-
-#include "nsIWebProgressListener.h"
-
-class GPrintListener : public nsIWebProgressListener
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIWEBPROGRESSLISTENER
-
- GPrintListener();
- GPrintListener(char *filename);
- virtual ~GPrintListener();
-
-private:
- char *mFilename;
-};
-
-#endif //__PrintProgressListener_h_