mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 03:25:31 +00:00
Merge branch 'wip/sadiq/history' into 'master'
history-box: Add empty view See merge request Librem5/calls!23
This commit is contained in:
commit
8a96c79eff
3 changed files with 44 additions and 9 deletions
|
@ -37,12 +37,12 @@
|
|||
|
||||
struct _CallsHistoryBox
|
||||
{
|
||||
GtkTreeView parent_instance;
|
||||
GtkStack parent_instance;
|
||||
|
||||
GtkListStore *history_store;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (CallsHistoryBox, calls_history_box, GTK_TYPE_TREE_VIEW);
|
||||
G_DEFINE_TYPE (CallsHistoryBox, calls_history_box, GTK_TYPE_STACK)
|
||||
|
||||
|
||||
static void
|
||||
|
|
|
@ -34,7 +34,7 @@ G_BEGIN_DECLS
|
|||
|
||||
#define CALLS_TYPE_HISTORY_BOX (calls_history_box_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (CallsHistoryBox, calls_history_box, CALLS, HISTORY_BOX, GtkTreeView);
|
||||
G_DECLARE_FINAL_TYPE (CallsHistoryBox, calls_history_box, CALLS, HISTORY_BOX, GtkStack)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -4,12 +4,47 @@
|
|||
<requires lib="gtk+" version="3.22"/>
|
||||
<requires lib="libhandy" version="0.0"/>
|
||||
<object class="GtkListStore" id="history_store"/>
|
||||
<template class="CallsHistoryBox" parent="GtkTreeView">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="model">history_store</property>
|
||||
<property name="visible">True</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection"/>
|
||||
<template class="CallsHistoryBox" parent="GtkStack">
|
||||
<child>
|
||||
<object class="GtkBox" id="empty_view">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">call-start-symbolic</property>
|
||||
<property name="pixel-size">96</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="primary_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Call list empty</property>
|
||||
<property name="halign">start</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="1.2"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkTreeView" id="history_view">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="model">history_store</property>
|
||||
<property name="visible">True</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
|
|
Loading…
Reference in a new issue