Commit 9fee974b authored by Andrea Schaefer's avatar Andrea Schaefer Committed by Ruslan Marchenko
Browse files

Add pref-switch for mam

parent 7e38decd
......@@ -77,6 +77,7 @@ struct _ChattySettingsDialog
GtkWidget *fingerprint_device_list;
GtkWidget *send_receipts_switch;
GtkWidget *message_archive_switch;
GtkWidget *message_carbons_row;
GtkWidget *message_carbons_switch;
GtkWidget *typing_notification_switch;
......@@ -680,6 +681,9 @@ chatty_settings_dialog_constructed (GObject *object)
g_object_bind_property (settings, "send-receipts",
self->send_receipts_switch, "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
g_object_bind_property (settings, "mam-enabled",
self->message_archive_switch, "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
g_object_bind_property (settings, "message-carbons",
self->message_carbons_switch, "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
......@@ -764,6 +768,7 @@ chatty_settings_dialog_class_init (ChattySettingsDialogClass *klass)
gtk_widget_class_bind_template_child (widget_class, ChattySettingsDialog, fingerprint_device_list);
gtk_widget_class_bind_template_child (widget_class, ChattySettingsDialog, send_receipts_switch);
gtk_widget_class_bind_template_child (widget_class, ChattySettingsDialog, message_archive_switch);
gtk_widget_class_bind_template_child (widget_class, ChattySettingsDialog, message_carbons_row);
gtk_widget_class_bind_template_child (widget_class, ChattySettingsDialog, message_carbons_switch);
gtk_widget_class_bind_template_child (widget_class, ChattySettingsDialog, typing_notification_switch);
......
......@@ -249,12 +249,12 @@ chatty_settings_class_init (ChattySettingsClass *klass)
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
properties[PROP_MESSAGE_CARBONS] =
g_param_spec_boolean ("message-carbons",
"Message Carbons",
"Share chat history among devices",
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
properties[PROP_MESSAGE_CARBONS] =
g_param_spec_boolean ("message-carbons",
"Message Carbons",
"Share chat history among devices",
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
properties[PROP_MAM_ENABLED] =
g_param_spec_boolean ("mam-enabled",
......
......@@ -126,6 +126,20 @@
</child>
</object>
</child>
<child>
<object class="HdyActionRow">
<property name="visible">True</property>
<property name="selectable">False</property>
<property name="title" translatable="yes">Message Archive Management</property>
<property name="subtitle" translatable="yes">Sync conversations with chat server</property>
<child type="action">
<object class="GtkSwitch" id="message_archive_switch">
<property name="visible">True</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="HdyActionRow" id="message_carbons_row">
<property name="visible">True</property>
......
Markdown is supported
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