1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-03 02:49:25 +00:00

main-window: Replace the stack switcher by a header bar

Drop the in-window content stack witcher and replace it by a header bar
containing both a CallsHistoryHeaderBar and a CallsNewCallHeaderBar.
This commit is contained in:
Adrien Plazas 2018-08-02 13:05:57 +02:00
parent 68cc256018
commit e0a1329218
2 changed files with 27 additions and 26 deletions

View file

@ -30,9 +30,11 @@
#include "calls-call-window.h"
#include "calls-encryption-indicator.h"
#include "calls-history-box.h"
#include "calls-history-header-bar.h"
#include "calls-main-window.h"
#include "calls-mm-provider.h"
#include "calls-new-call-box.h"
#include "calls-new-call-header-bar.h"
#include "config.h"
static void
@ -46,7 +48,9 @@ show_window (GtkApplication *app)
CALLS_TYPE_ENCRYPTION_INDICATOR;
CALLS_TYPE_HISTORY_BOX;
CALLS_TYPE_HISTORY_HEADER_BAR;
CALLS_TYPE_NEW_CALL_BOX;
CALLS_TYPE_NEW_CALL_HEADER_BAR;
HDY_TYPE_DIALER;
connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);

View file

@ -21,31 +21,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkStackSwitcher">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="icon_size">0</property>
<property name="stack">main_stack</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkInfoBar" id="info">
<property name="can_focus">False</property>
@ -135,7 +110,29 @@
</object>
</child>
<child type="titlebar">
<placeholder/>
<object class="GtkStack" id="header_bar_stack">
<property name="can_focus">False</property>
<property name="visible">True</property>
<property name="visible_child_name" bind-source="main_stack" bind-property="visible_child_name" bind-flags="bidirectional|sync-create"/>
<child>
<object class="CallsHistoryHeaderBar" id="history_header_bar">
<property name="can_focus">False</property>
<property name="visible">True</property>
</object>
<packing>
<property name="name">history</property>
</packing>
</child>
<child>
<object class="CallsNewCallHeaderBar" id="new_call_header_bar">
<property name="can_focus">False</property>
<property name="visible">True</property>
</object>
<packing>
<property name="name">new-call</property>
</packing>
</child>
</object>
</child>
</template>
</interface>