mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 04:15:32 +00:00
parent
4714aea068
commit
f102fb3fcd
3 changed files with 20 additions and 27 deletions
|
@ -63,7 +63,6 @@ struct _CallsAccountRow {
|
|||
/* UI elements */
|
||||
HdyAvatar *avatar;
|
||||
GtkSwitch *online_switch;
|
||||
GtkButton *edit_btn;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (CallsAccountRow, calls_account_row, HDY_TYPE_ACTION_ROW)
|
||||
|
@ -82,17 +81,6 @@ on_account_state_changed (CallsAccountRow *self)
|
|||
gtk_switch_set_state (self->online_switch, state == CALLS_ACCOUNT_STATE_ONLINE);
|
||||
}
|
||||
|
||||
static void
|
||||
on_edit_clicked (CallsAccountRow *self)
|
||||
{
|
||||
/** CallsAccountOverview connects to this signal to show
|
||||
* the window containing the account providers widget.
|
||||
* See calls_account_provider_get_account_widget()
|
||||
*/
|
||||
g_signal_emit (self, signals[EDIT_CLICKED], 0, self->provider, self->account);
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
on_online_switched (GtkSwitch *widget,
|
||||
gboolean online,
|
||||
|
@ -225,9 +213,7 @@ calls_account_row_class_init (CallsAccountRowClass *klass)
|
|||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Calls/ui/account-row.ui");
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsAccountRow, avatar);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsAccountRow, online_switch);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsAccountRow, edit_btn);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_edit_clicked);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_online_switched);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,8 +73,15 @@
|
|||
<object class="GtkListBox" id="overview">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="margin-top">18</property>
|
||||
<property name="margin-bottom">18</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
<!-- placeholder -->
|
||||
<child type="placeholder"/>
|
||||
<style>
|
||||
<class name="content"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">overview-page</property>
|
||||
|
@ -90,14 +97,20 @@
|
|||
</child>
|
||||
</template>
|
||||
|
||||
<object class="HdyActionRow" id="add_row">
|
||||
<object class="GtkListBoxRow" id="add_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<property name="title" translatable="yes">_Add Account</property>
|
||||
<signal name="activated" handler="on_add_account_clicked" swapped="yes"/>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Add Account</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="margin-top">9</property>
|
||||
<property name="margin-bottom">9</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
|
||||
<object class="HdyWindow" id="account_window">
|
||||
<property name="visible">False</property>
|
||||
<property name="default-width">380</property>
|
||||
|
|
|
@ -26,15 +26,9 @@
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkButton" id="edit_btn">
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">go-next-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<signal name="clicked" handler="on_edit_clicked" swapped="yes"/>
|
||||
<property name="icon_name">go-next-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue