After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 715076 - Connections dialog not unique in multiple invocations
Connections dialog not unique in multiple invocations
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-23 18:16 UTC by Carlos Soriano
Modified: 2013-11-24 21:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
connection dialog and about dialog : don't open if already open (1.68 KB, patch)
2013-11-23 22:45 UTC, sébastien lafargue
reviewed Details | Review
application: don't open dialogs if already opened (2.23 KB, patch)
2013-11-24 20:21 UTC, sébastien lafargue
committed Details | Review

Description Carlos Soriano 2013-11-23 18:16:00 UTC
The connections dialog in the app menu is shown more than once if called more than once sequencially.

The correct behaviour would be to just let the current open one.
Comment 1 sébastien lafargue 2013-11-23 22:45:59 UTC
Created attachment 261320 [details] [review]
connection dialog and about dialog : don't open if already open

When connection dialog or about dialog are open, we still can go to app menu
and open them again. We do'nt want this.
Comment 2 Carlos Soriano 2013-11-24 17:17:08 UTC
Review of attachment 261320 [details] [review]:

lgtm, thanks!
Comment 3 Carlos Soriano 2013-11-24 17:46:06 UTC
Review of attachment 261320 [details] [review]:

just a nitpick before committing. Add in the commit message the file modified like:
application: don't open dialogs if already opened

Also, commit messages has to be 80 chars width.
Comment 4 Florian Müllner 2013-11-24 18:24:11 UTC
Review of attachment 261320 [details] [review]:

::: src/application.js
@@ +388,2 @@
     _onListConnections: function() {
+        if (this._connectionsDialogOpened)

If you used the dialog itself for the test, you could present() it if it already exists:

if (this._connectionsDialog) {
    this._connectionsDialog.dialog.present();
    return;
}

Currently it doesn't matter much, as the only non-obscure way to get to the dialog is via the app menu, which means Polari is already focused. But if we add support for .desktop actions at one point, it may be possible to trigger the action from elsewhere.
Comment 5 sébastien lafargue 2013-11-24 20:21:55 UTC
Created attachment 261369 [details] [review]
application: don't open dialogs if already opened

When connection dialog or about dialog are open, we still can go to app
menu and open them again. We don't want this.
Comment 6 Florian Müllner 2013-11-24 20:46:06 UTC
Review of attachment 261369 [details] [review]:

LGTM
Comment 7 Carlos Soriano 2013-11-24 21:30:08 UTC
Attachment 261369 [details] pushed as 10d310f - application: don't open dialogs if already opened