forked from pool/MozillaThunderbird
- fix KDE integration for file dialogs
OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=201
This commit is contained in:
parent
fb13ba9d3a
commit
1b7efd7222
@ -1,11 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 23 10:33:11 UTC 2012 - wr@rosenauer.org
|
||||
Mon Nov 26 11:10:11 UTC 2012 - wr@rosenauer.org
|
||||
|
||||
- fix KDE integration for file dialogs
|
||||
- fix some rpmlint warnings (mkdir.done files)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 22 09:09:52 UTC 2012 - wr@rosenauer.org
|
||||
|
||||
- build on SLE11
|
||||
* mozilla-gcc43-enums.patch
|
||||
* mozilla-gcc43-template_hacks.patch
|
||||
|
@ -3106,27 +3106,40 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
|
||||
|
||||
mFilters.AppendElement(filter);
|
||||
mFilterNames.AppendElement(name);
|
||||
@@ -369,16 +373,19 @@ nsFilePicker::GetFiles(nsISimpleEnumerat
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@@ -388,16 +392,32 @@ nsFilePicker::Show(int16_t *aReturn)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFilePicker::Show(int16_t *aReturn)
|
||||
nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aReturn);
|
||||
// Can't show two dialogs concurrently with the same filepicker
|
||||
if (mRunning)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
+ if( nsKDEUtils::kdeSupport())
|
||||
+ return kdeFileDialog(aReturn);
|
||||
+ // KDE file picker is not handled via callback
|
||||
+ if( nsKDEUtils::kdeSupport()) {
|
||||
+ int16_t result;
|
||||
+ mCallback = aCallback;
|
||||
+ mRunning = true;
|
||||
+ kdeFileDialog(&result);
|
||||
+ if (mCallback) {
|
||||
+ mCallback->Done(result);
|
||||
+ mCallback = nullptr;
|
||||
+ } else {
|
||||
+ mResult = result;
|
||||
+ }
|
||||
+ mRunning = false;
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
nsresult rv = Open(nullptr);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
nsXPIDLCString title;
|
||||
title.Adopt(ToNewUTF8String(mTitle));
|
||||
|
||||
while (mRunning) {
|
||||
g_main_context_iteration(nullptr, TRUE);
|
||||
}
|
||||
GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget);
|
||||
|
||||
@@ -587,8 +594,235 @@ nsFilePicker::Done(GtkWidget* file_choos
|
||||
GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
|
||||
const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
|
||||
? GTK_STOCK_SAVE : GTK_STOCK_OPEN;
|
||||
@@ -587,8 +607,235 @@ nsFilePicker::Done(GtkWidget* file_choos
|
||||
if (mCallback) {
|
||||
mCallback->Done(result);
|
||||
mCallback = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user