mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-08 04:45:31 +00:00
parent
4714aea068
commit
f102fb3fcd
3 changed files with 20 additions and 27 deletions
|
@ -63,7 +63,6 @@ struct _CallsAccountRow {
|
||||||
/* UI elements */
|
/* UI elements */
|
||||||
HdyAvatar *avatar;
|
HdyAvatar *avatar;
|
||||||
GtkSwitch *online_switch;
|
GtkSwitch *online_switch;
|
||||||
GtkButton *edit_btn;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (CallsAccountRow, calls_account_row, HDY_TYPE_ACTION_ROW)
|
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);
|
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
|
static gboolean
|
||||||
on_online_switched (GtkSwitch *widget,
|
on_online_switched (GtkSwitch *widget,
|
||||||
gboolean online,
|
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_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, avatar);
|
||||||
gtk_widget_class_bind_template_child (widget_class, CallsAccountRow, online_switch);
|
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);
|
gtk_widget_class_bind_template_callback (widget_class, on_online_switched);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,15 @@
|
||||||
<object class="GtkListBox" id="overview">
|
<object class="GtkListBox" id="overview">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="selection-mode">none</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 -->
|
<!-- placeholder -->
|
||||||
<child type="placeholder"/>
|
<child type="placeholder"/>
|
||||||
|
<style>
|
||||||
|
<class name="content"/>
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="name">overview-page</property>
|
<property name="name">overview-page</property>
|
||||||
|
@ -90,14 +97,20 @@
|
||||||
</child>
|
</child>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<object class="HdyActionRow" id="add_row">
|
<object class="GtkListBoxRow" id="add_row">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="use-underline">True</property>
|
<child>
|
||||||
<property name="activatable">True</property>
|
<object class="GtkLabel">
|
||||||
<property name="title" translatable="yes">_Add Account</property>
|
<property name="visible">True</property>
|
||||||
<signal name="activated" handler="on_add_account_clicked" swapped="yes"/>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
<object class="HdyWindow" id="account_window">
|
<object class="HdyWindow" id="account_window">
|
||||||
<property name="visible">False</property>
|
<property name="visible">False</property>
|
||||||
<property name="default-width">380</property>
|
<property name="default-width">380</property>
|
||||||
|
|
|
@ -26,15 +26,9 @@
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="edit_btn">
|
<object class="GtkImage">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<child>
|
<property name="icon_name">go-next-symbolic</property>
|
||||||
<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"/>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in a new issue