-
Notifications
You must be signed in to change notification settings - Fork 257
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
Set appropriate window application and titles instead of defaulting to gsconnect #1875
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not at all sold on most of these. They appear to be solutions in search of a problem, and many are redundant with the UI template definitions. (Redundancy is bad.) -1 from me without better justification for why it's necessary.
src/service/ui/legacyMessaging.js
Outdated
@@ -40,6 +40,7 @@ const Dialog = GObject.registerClass({ | |||
_init(params) { | |||
super._init({ | |||
application: Gio.Application.get_default(), | |||
title: _('Send SMS'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already set in the template, setting it here is redundant and makes maintenance harder:
<property name="title" translatable="yes">Send SMS</property> |
src/service/ui/messaging.js
Outdated
super._init(params); | ||
super._init(Object.assign({ | ||
application: Gio.Application.get_default(), | ||
title: _('Messaging'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already set in the template, setting it here is redundant and makes maintenance harder:
<property name="title" translatable="yes">Messaging</property> |
src/service/ui/mousepad.js
Outdated
@@ -100,6 +100,8 @@ export const InputDialog = GObject.registerClass({ | |||
|
|||
_init(params) { | |||
super._init(Object.assign({ | |||
application: Gio.Application.get_default(), | |||
title: _('Remote Input'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/service/ui/notification.js
Outdated
@@ -45,6 +45,7 @@ const ReplyDialog = GObject.registerClass({ | |||
_init(params) { | |||
super._init({ | |||
application: Gio.Application.get_default(), | |||
title: _('Reply'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, headerbar.title
is set to params.notification.appName
, which will be the title of the dialog in every way that matters. What's the purpose of also setting it generically, here?
src/service/ui/service.js
Outdated
@@ -53,6 +53,7 @@ export const DeviceChooser = GObject.registerClass({ | |||
super._init({ | |||
use_header_bar: true, | |||
application: Gio.Application.get_default(), | |||
title: params.title, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title
is already set in the template, as Select a Device
, which is why params.title
is set as the headerbar subtitle:
<property name="title" translatable="yes">Select a Device</property> |
src/service/plugins/findmyphone.js
Outdated
@@ -144,6 +144,8 @@ const Dialog = GObject.registerClass({ | |||
}, class Dialog extends Gtk.MessageDialog { | |||
_init(params) { | |||
super._init({ | |||
application: Gio.Application.get_default(), | |||
title: _('Ringing'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dialog is a mess, and doesn't appear to have a title at all. So I'll probably give you this one. But really it should probably be redone with a UI template definition, like basically every other window in the code.
(Actually now that notifications can have persistent action buttons (FINALLY!), it might make way more sense to replace the entire dialog with an urgent notification that has a "Silence" or "Acknowledge" action button embedded.)
The tests are failing in the CI because you added |
Sorry for the messy changes, I was trying to solve the issue of generic gsconnect icon and name in the dash, |
No description provided.