Fix a couple of warnings relating to parents of dialogs
Fixes these kind of warnings: ``` (dino:<PID>): Gtk-CRITICAL **: gtk_window_set_transient_for: assertion 'parent == NULL || GTK_IS_WINDOW (parent)' failed Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. (dino:<PID>): GLib-GObject-WARNING **: invalid cast from 'GtkPaned' to 'GtkWindow' ``` Also centers these dialogs (settings, add chat, join conversation) on top of their parent windows.
This commit is contained in:
parent
9728e832b1
commit
e876f4b316
|
@ -4,7 +4,6 @@
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="visible">True</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSearchBar" id="search_bar">
|
<object class="GtkSearchBar" id="search_bar">
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
<template class="DinoUiManageAccountsDialog">
|
<template class="DinoUiManageAccountsDialog">
|
||||||
<property name="width-request">700</property>
|
<property name="width-request">700</property>
|
||||||
<property name="height-request">400</property>
|
<property name="height-request">400</property>
|
||||||
<property name="visible">True</property>
|
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar">
|
<object class="GtkHeaderBar">
|
||||||
<property name="title" translatable="yes">Accounts</property>
|
<property name="title" translatable="yes">Accounts</property>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<interface>
|
<interface>
|
||||||
<template class="DinoUiSettingsDialog">
|
<template class="DinoUiSettingsDialog">
|
||||||
<property name="modal">True</property>
|
<property name="modal">True</property>
|
||||||
<property name="visible">True</property>
|
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar">
|
<object class="GtkHeaderBar">
|
||||||
<property name="title" translatable="yes">Preferences</property>
|
<property name="title" translatable="yes">Preferences</property>
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class ConversationListTitlebar : Gtk.HeaderBar {
|
||||||
SimpleAction contacts_action = new SimpleAction("add_chat", null);
|
SimpleAction contacts_action = new SimpleAction("add_chat", null);
|
||||||
contacts_action.activate.connect(() => {
|
contacts_action.activate.connect(() => {
|
||||||
AddConversation.Chat.Dialog add_chat_dialog = new AddConversation.Chat.Dialog(stream_interactor);
|
AddConversation.Chat.Dialog add_chat_dialog = new AddConversation.Chat.Dialog(stream_interactor);
|
||||||
add_chat_dialog.set_transient_for((Window) get_toplevel());
|
add_chat_dialog.set_transient_for(window);
|
||||||
add_chat_dialog.conversation_opened.connect((conversation) => conversation_opened(conversation));
|
add_chat_dialog.conversation_opened.connect((conversation) => conversation_opened(conversation));
|
||||||
add_chat_dialog.show();
|
add_chat_dialog.show();
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,7 @@ public class ConversationListTitlebar : Gtk.HeaderBar {
|
||||||
SimpleAction conference_action = new SimpleAction("add_conference", null);
|
SimpleAction conference_action = new SimpleAction("add_conference", null);
|
||||||
conference_action.activate.connect(() => {
|
conference_action.activate.connect(() => {
|
||||||
AddConversation.Conference.Dialog add_conference_dialog = new AddConversation.Conference.Dialog(stream_interactor);
|
AddConversation.Conference.Dialog add_conference_dialog = new AddConversation.Conference.Dialog(stream_interactor);
|
||||||
add_conference_dialog.set_transient_for((Window) get_toplevel());
|
add_conference_dialog.set_transient_for(window);
|
||||||
add_conference_dialog.conversation_opened.connect((conversation) => conversation_opened(conversation));
|
add_conference_dialog.conversation_opened.connect((conversation) => conversation_opened(conversation));
|
||||||
add_conference_dialog.show();
|
add_conference_dialog.show();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue