Commit f49c1847 authored by Julian Sparber's avatar Julian Sparber Committed by Adrien Plazas
Browse files

HdyDialer: Remove it from the demo

Remove the dialer from the demo since it's deprecated.
parent f7d861a7
......@@ -16,12 +16,9 @@ struct _HdyDemoWindow
GtkStackSidebar *sidebar;
GtkStack *stack;
HdyComboRow *leaflet_transition_row;
GtkWidget *box_dialer;
HdyDialer *dialer;
GtkWidget *box_keypad;
GtkListBox *keypad_listbox;
HdyKeypad *keypad;
GtkLabel *display;
HdySearchBar *search_bar;
GtkEntry *search_entry;
GtkListBox *column_listbox;
......@@ -157,54 +154,6 @@ notify_leaflet_transition_cb (GObject *sender,
hdy_leaflet_set_transition_type (HDY_LEAFLET (self->content_box), hdy_combo_row_get_selected_index (row));
}
static void
hdy_demo_window_submitted_cb (GtkWidget *widget,
gchar *number)
{
g_print ("Submit %s\n", number);
}
static void
deleted_cb (HdyDialer *dialer,
HdyDemoWindow *self)
{
g_assert (HDY_IS_DIALER (dialer));
g_assert (HDY_IS_DEMO_WINDOW (self));
g_print ("Delete btn\n");
}
static void
number_notify_cb (HdyDemoWindow *self,
gpointer unused)
{
gtk_label_set_label (self->display, hdy_dialer_get_number (self->dialer));
g_print ("wuff: %s\n", hdy_dialer_get_number (self->dialer));
}
static void
symbol_clicked_cb (HdyDialer *dialer,
gchar symbol,
HdyDemoWindow *self)
{
g_assert (HDY_IS_DIALER (dialer));
g_assert (HDY_IS_DEMO_WINDOW (self));
g_print ("clicked: %c\n", symbol);
}
static void
stack_visible_child_notify_cb (HdyDemoWindow *self,
gpointer unused)
{
if (gtk_stack_get_visible_child (GTK_STACK (self->stack)) == GTK_WIDGET (self->box_dialer)) {
gtk_widget_grab_focus (GTK_WIDGET (self->dialer));
}
}
static void
dialog_close_cb (GtkDialog *self)
{
......@@ -399,16 +348,6 @@ hdy_demo_window_constructed (GObject *object)
G_OBJECT_CLASS (hdy_demo_window_parent_class)->constructed (object);
g_signal_connect_swapped (self->dialer,
"notify::number",
G_CALLBACK (number_notify_cb),
self);
g_signal_connect_swapped (self->stack,
"notify::visible-child",
G_CALLBACK (stack_visible_child_notify_cb),
self);
hdy_search_bar_connect_entry (self->search_bar, self->search_entry);
}
......@@ -429,12 +368,9 @@ hdy_demo_window_class_init (HdyDemoWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, sidebar);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, stack);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, leaflet_transition_row);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, box_dialer);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, dialer);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, box_keypad);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, keypad_listbox);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, keypad);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, display);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, search_bar);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, search_entry);
gtk_widget_class_bind_template_child (widget_class, HdyDemoWindow, column_listbox);
......@@ -452,9 +388,6 @@ hdy_demo_window_class_init (HdyDemoWindowClass *klass)
gtk_widget_class_bind_template_callback_full (widget_class, "notify_visible_child_cb", G_CALLBACK(hdy_demo_window_notify_visible_child_cb));
gtk_widget_class_bind_template_callback_full (widget_class, "back_clicked_cb", G_CALLBACK(hdy_demo_window_back_clicked_cb));
gtk_widget_class_bind_template_callback_full (widget_class, "notify_leaflet_transition_cb", G_CALLBACK(notify_leaflet_transition_cb));
gtk_widget_class_bind_template_callback_full (widget_class, "submitted_cb", G_CALLBACK(hdy_demo_window_submitted_cb));
gtk_widget_class_bind_template_callback_full (widget_class, "symbol_clicked_cb", G_CALLBACK(symbol_clicked_cb));
gtk_widget_class_bind_template_callback_full (widget_class, "deleted_cb", G_CALLBACK(deleted_cb));
gtk_widget_class_bind_template_callback_full (widget_class, "dialog_clicked_cb", G_CALLBACK(dialog_clicked_cb));
gtk_widget_class_bind_template_callback_full (widget_class, "dialog_action_clicked_cb", G_CALLBACK(dialog_action_clicked_cb));
gtk_widget_class_bind_template_callback_full (widget_class, "dialog_complex_clicked_cb", G_CALLBACK(dialog_complex_clicked_cb));
......
......@@ -587,158 +587,6 @@
<property name="title">Keypad</property>
</packing>
</child>
<child>
<object class="HdyColumn">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">fill</property>
<property name="valign">fill</property>
<property name="margin-bottom">32</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">32</property>
<property name="expand">True</property>
<property name="maximum-width">400</property>
<property name="linear-growth-width">300</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="expand">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-bottom">32</property>
<property name="expand">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="pixel_size">128</property>
<property name="icon_name">input-dialpad-symbolic</property>
<property name="icon-size">0</property>
<property name="margin-bottom">18</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="opacity">0.5</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Dialer</property>
<property name="halign">center</property>
<property name="xalign">0</property>
<property name="margin-bottom">12</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="2"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="opacity">0.5</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">A number dialer.</property>
<property name="justify">center</property>
<property name="use_markup">true</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
</child>
<child>
<object class="HdyColumn">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="maximum-width">300</property>
<property name="linear-growth-width">300</property>
<child>
<object class="GtkBox" id="box_dialer">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="display">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="single_line_mode">True</property>
<attributes>
<attribute name="scale" value="1.6"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HdyDialer" id="dialer">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="column_spacing">10</property>
<property name="hexpand">True</property>
<property name="row_spacing">8</property>
<property name="valign">center</property>
<signal name="deleted" handler="deleted_cb" after="yes" swapped="no"/>
<signal name="submitted" handler="submitted_cb" after="yes" swapped="no"/>
<signal name="symbol-clicked" handler="symbol_clicked_cb" after="yes" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="name">dialer</property>
<property name="title">Dialer</property>
</packing>
</child>
<child>
<object class="HdyColumn">
<property name="visible">True</property>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment