Package list lightdm-gtk-greeter-settings / a69da54
GtkPlug focus (?) issues - multihead label link Andrew P. 7 years ago
2 changed file(s) with 18 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
7171 content = 'content_box'
7272 infobar = 'infobar'
7373 infobar_label = 'infobar_label'
74 multihead_label = 'multihead_label'
7475
7576 def __new__(cls, mode=WindowMode.Default):
7677 builder = Gtk.Builder()
151152 message_type=Gtk.MessageType.WARNING)
152153
153154 if self.mode == WindowMode.Embedded:
155 self.on_entry_changed = self.on_entry_changed_embedded
154156 self._widgets.buttons.hide()
155 self.on_entry_changed = self.on_entry_changed_embedded
156157 self._widgets.content.reorder_child(self._widgets.infobar, 0)
158 # Socket/Plug focus issues workaround
159 self._widgets.multihead_label.connect('button-press-event', self.on_multihead_click)
157160 elif self.mode == WindowMode.GtkHeader:
158161 for button in (self._widgets.apply, self._widgets.reload):
159162 self._widgets.buttons.remove(button)
471474 # [greeter] reader
472475 on_entry_changed_greeter_reader = on_entry_changed_greeter_keyboard
473476
477 def on_multihead_click(self, label, event):
478 if event.button == 1:
479 label.emit('activate-link', '')
480 return True
481 return False
482
474483 def on_destroy(self, *unused):
475484 Gtk.main_quit()
476485
3131 parser.add_argument('-s', '--socket-id', action='store', help='Settings manager socket')
3232 parser.add_argument('--use-gtk-header', action='store_const', const=True,
3333 help='Use GtkHeaderBar')
34 parser.add_argument('--test-socket', action='store_const', const=True)
3435 args = parser.parse_args()
36
37 if args.test_socket:
38 w = Gtk.Window()
39 socket = Gtk.Socket.new()
40 w.add(socket)
41 w.show_all()
42 args.socket_id = socket.get_id()
3543
3644 try:
3745 socket_id = int(args.socket_id or '')