summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-07-13 16:00:53 -0300
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-07-13 16:04:31 -0300
commitf0060b769970b65bf6ca956a95e91025e32e5124 (patch)
treea413724b72b04aa2a8a1ece5dd9b29d4e4d3d439 /data
parentff0644ad76bf9134f47e61d7971b5b67b8f035fd (diff)
downloadgnome-calendar-f0060b769970b65bf6ca956a95e91025e32e5124.tar.gz
new-calendar-page: Use the new discoverer
The new discoverer is a vast improvement over the code that use used to have here. Right now, we fail to use Soup to detect the URL, and that's been reported multiple times already. Use the new web discoverer code, and adjust the UI to match the new code. Namely, use a GtkPopover to show the credentials widget. Fixes #380
Diffstat (limited to 'data')
-rw-r--r--data/ui/new-calendar-page.ui75
1 files changed, 37 insertions, 38 deletions
diff --git a/data/ui/new-calendar-page.ui b/data/ui/new-calendar-page.ui
index d7d2d5e6..fae3a5d5 100644
--- a/data/ui/new-calendar-page.ui
+++ b/data/ui/new-calendar-page.ui
@@ -218,41 +218,15 @@
</child>
</template>
- <!-- Credentials dialog -->
- <object class="GtkDialog" id="credentials_dialog">
- <property name="modal">True</property>
- <property name="type_hint">dialog</property>
- <child type="titlebar">
- <object class="GtkHeaderBar" id="credentials_headerbar">
+ <!-- Credentials popover -->
+ <object class="GtkPopover" id="credentials_popover">
+ <property name="relative-to">calendar_address_entry</property>
+ <property name="position">top</property>
+ <child>
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="title" translatable="yes">Enter your credentials</property>
- <child>
- <object class="GtkButton" id="credentials_cancel_button">
- <property name="label" translatable="yes">Cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <signal name="clicked" handler="on_credential_button_clicked_cb" object="GcalNewCalendarPage" swapped="no" />
- </object>
- </child>
- <child>
- <object class="GtkButton" id="credentials_connect_button">
- <property name="label" translatable="yes">Connect</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <signal name="clicked" handler="on_credential_button_clicked_cb" object="GcalNewCalendarPage" swapped="no" />
- <style>
- <class name="suggested-action" />
- </style>
- </object>
- <packing>
- <property name="pack_type">end</property>
- </packing>
- </child>
- </object>
- </child>
- <child internal-child="vbox">
- <object class="GtkBox" id="credentials-dialog-vbox1">
<property name="orientation">vertical</property>
+ <property name="margin">12</property>
<child>
<object class="GtkGrid" id="credentials_grid">
<property name="visible">True</property>
@@ -293,7 +267,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
- <signal name="activate" handler="on_credential_entry_activate_cb" object="credentials_dialog" swapped="no" />
+ <signal name="activate" handler="on_credential_entry_activate_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
<packing>
<property name="left_attach">1</property>
@@ -306,7 +280,7 @@
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="visibility">False</property>
- <signal name="activate" handler="on_credential_entry_activate_cb" object="credentials_dialog" swapped="no" />
+ <signal name="activate" handler="on_credential_entry_activate_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
<packing>
<property name="left_attach">1</property>
@@ -314,9 +288,34 @@
</packing>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
+ </child>
+
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkButton" id="credentials_cancel_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="label" translatable="yes">Cancel</property>
+ <signal name="clicked" handler="on_credential_button_clicked_cb" object="GcalNewCalendarPage" swapped="no" />
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="credentials_connect_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="label" translatable="yes">Connect</property>
+ <signal name="clicked" handler="on_credential_button_clicked_cb" object="GcalNewCalendarPage" swapped="no" />
+ <style>
+ <class name="suggested-action" />
+ </style>
+ </object>
+ </child>
+ </object>
</child>
</object>
</child>