aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/FilePicker.cpp48
-rw-r--r--embed/mozilla/FilePicker.h7
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp7
3 files changed, 3 insertions, 59 deletions
diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp
index 537a66d7b..42c17be06 100644
--- a/embed/mozilla/FilePicker.cpp
+++ b/embed/mozilla/FilePicker.cpp
@@ -79,8 +79,7 @@
/* Implementation file */
NS_IMPL_ISUPPORTS1(GFilePicker, nsIFilePicker)
-GFilePicker::GFilePicker(FileFormat *aFileFormats) :
- mFileFormats(aFileFormats)
+GFilePicker::GFilePicker()
{
NS_INIT_ISUPPORTS();
@@ -247,33 +246,6 @@ NS_IMETHODIMP GFilePicker::Show(PRInt16 *_retval)
gtk_window_set_transient_for(GTK_WINDOW(mFileSelector),
GTK_WINDOW(mParentWidget));
- if (mFileFormats)
- {
- mFormatChooser = gtk_option_menu_new();
- GtkMenu *options = GTK_MENU(gtk_menu_new());
-
- FileFormat *current = mFileFormats;
- while (current->description != NULL)
- {
- /* FIXME: the label should include the extensions too */
- gchar *label = current->description;
- GtkWidget *item = gtk_menu_item_new_with_label(label);
- gtk_widget_show(item);
- gtk_menu_shell_append(GTK_MENU_SHELL(options), item);
- current++;
- }
- gtk_option_menu_set_menu(GTK_OPTION_MENU(mFormatChooser),
- GTK_WIDGET(options));
- gtk_widget_show(mFormatChooser);
- gtk_box_pack_start(GTK_BOX(GTK_FILE_SELECTION (mFileSelector)->action_area),
- mFormatChooser,
- FALSE, TRUE, 0);
- }
- else
- {
- mFormatChooser = NULL;
- }
-
if (mMode == nsIFilePicker::modeGetFolder)
{
gtk_widget_set_sensitive(GTK_FILE_SELECTION(mFileSelector)
@@ -432,24 +404,6 @@ NS_METHOD GFilePicker::HandleFilePickerResult()
mFile->GetNativeLeafName(mDefaultString);
}
- if (mFormatChooser)
- {
- GtkWidget *menu = gtk_option_menu_get_menu
- (GTK_OPTION_MENU(mFormatChooser));
- GtkWidget *selected = gtk_menu_get_active (GTK_MENU(menu));
-
- gint i(0);
- for (GList *iterator = GTK_MENU_SHELL(menu)->children ;
- iterator ; iterator = iterator->next, i++)
- {
- if (iterator->data == selected)
- {
- mSelectedFileFormat = i;
- break;
- }
- }
- }
-
return NS_OK;
}
diff --git a/embed/mozilla/FilePicker.h b/embed/mozilla/FilePicker.h
index 0b4c98af1..430e8d854 100644
--- a/embed/mozilla/FilePicker.h
+++ b/embed/mozilla/FilePicker.h
@@ -54,7 +54,7 @@ class GFilePicker : public nsIFilePicker
returnCancel = nsIFilePicker::returnCancel,
returnReplace = nsIFilePicker::returnReplace };
- GFilePicker(FileFormat *aFileFormats = nsnull);
+ GFilePicker();
virtual ~GFilePicker();
/* additional members */
@@ -62,8 +62,6 @@ class GFilePicker : public nsIFilePicker
const char *aTitle, PRInt16 aMode);
NS_METHOD SanityCheck(PRBool *retIsSane);
- PRInt16 mSelectedFileFormat;
-
private:
NS_METHOD HandleFilePickerResult();
NS_METHOD ValidateFilePickerResult(PRInt16 *retval);
@@ -81,9 +79,6 @@ class GFilePicker : public nsIFilePicker
GtkWidget *mParentWidget;
GtkWidget *mFileSelector;
- GtkWidget *mFormatChooser;
-
- FileFormat *mFileFormats;
};
#endif
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 7e90f4065..6491ce33d 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -1016,7 +1016,7 @@ impl_show_file_picker (EphyEmbedSingle *shell,
char *expanded_directory = NULL;
gresult result;
- GFilePicker *filePicker = new GFilePicker (file_formats);
+ GFilePicker *filePicker = new GFilePicker ();
if (directory != NULL)
{
@@ -1047,11 +1047,6 @@ impl_show_file_picker (EphyEmbedSingle *shell,
PRInt16 retval;
filePicker->Show (&retval);
- if (ret_file_format != NULL)
- {
- *ret_file_format = filePicker->mSelectedFileFormat;
- }
-
nsCOMPtr<nsILocalFile> local_file;
filePicker->GetFile (getter_AddRefs(local_file));
nsCAutoString tempFullPathStr;