File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 2222#include " mozilla/Components.h"
2323#include " mozilla/Preferences.h"
2424#include " mozilla/dom/Promise.h"
25+ #include " mozilla/dom/Document.h"
2526
2627#include " nsArrayEnumerator.h"
2728#include " nsEnumeratorUtils.h"
@@ -228,6 +229,16 @@ void nsFilePicker::ReadValuesFromNonPortalFileChooser(
228229void nsFilePicker::InitNative (nsIWidget* aParent, const nsAString& aTitle) {
229230 mParentWidget = aParent;
230231 mTitle .Assign (aTitle);
232+
233+ if (mParentWidget ) {
234+ auto window = static_cast <nsWindow*>(mParentWidget .get ());
235+ if (GtkWidget* widget = window->GetGtkWidget ()) {
236+ if (auto * title = gtk_window_get_title (GTK_WINDOW (widget))) {
237+ mTitle .AppendLiteral (" - " );
238+ mTitle .Append (NS_ConvertUTF8toUTF16(title));
239+ }
240+ }
241+ }
231242}
232243
233244NS_IMETHODIMP
You can’t perform that action at this time.
0 commit comments