Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the open Preference issue on MacOS #595

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions chrome/content/zotfile/zotfile.js
Original file line number Diff line number Diff line change
@@ -213,9 +213,11 @@ Zotero.ZotFile = new function() {
*/
this.openPreferenceWindow = function(paneID, action) {
var io = {pane: paneID, action: action};
window.openDialog('chrome://zotfile/content/options.xul',
// get the main window to adapt MacOS redraw the ZoteroPane
var existingWin = Services.wm.getMostRecentWindow("navigator:browser");
existingWin.openDialog('chrome://zotfile/content/options.xul',
'zotfile-options',
'chrome,titlebar,toolbar,centerscreen' + Zotero.Prefs.get('browser.preferences.instantApply', true) ? 'dialog=no' : 'modal', io
'chrome,titlebar,toolbar,centerscreen,' + Zotero.Prefs.get('browser.preferences.instantApply', true) ? 'dialog=no' : 'modal', io
);
};

@@ -224,9 +226,11 @@ Zotero.ZotFile = new function() {
*/
this.openSubfolderWindow = function(paneID, action) {
var io = {pane: paneID, action: action};
var prefWindow = window.openDialog('chrome://zotfile/content/options-projects.xul',
// get the main window to adapt MacOS redraw the ZoteroPane
var existingWin = Services.wm.getMostRecentWindow("navigator:browser");
var prefWindow = existingWin.openDialog('chrome://zotfile/content/options-projects.xul',
'zotfile-tablet-subfolders',
'chrome,titlebar,toolbar,centerscreen' + Zotero.Prefs.get('browser.preferences.instantApply', true) ? 'dialog=no' : 'modal', io
'chrome,titlebar,toolbar,centerscreen,' + Zotero.Prefs.get('browser.preferences.instantApply', true) ? 'dialog=no' : 'modal', io
);
};

@@ -684,7 +688,9 @@ Zotero.ZotFile = new function() {
// file path, so the user can open it, Control-c, Control-w, Alt-Tab, and
// Control-v the path into another app
var io = {alertText: folderFile.path};
window.openDialog('chrome://zotero/content/selectableAlert.xul', "zotero-reveal-window", "chrome", io);
// get the main window to adapt MacOS redraw the ZoteroPane
var existingWin = Services.wm.getMostRecentWindow("navigator:browser");
existingWin.openDialog('chrome://zotero/content/selectableAlert.xul', "zotero-reveal-window", "chrome", io);
}
};