Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mohammed Sadiq
chatty
Commits
b39eb5c2
Commit
b39eb5c2
authored
Nov 25, 2021
by
Mohammed Sadiq
Browse files
settings-dialog: Hide purple settings if feature is disabled
parent
b569a4ed
Pipeline
#73292
passed with stages
in 10 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/dialogs/chatty-settings-dialog.c
View file @
b39eb5c2
...
...
@@ -100,6 +100,8 @@ struct _ChattySettingsDialog
GtkWidget
*
convert_smileys_switch
;
GtkWidget
*
return_sends_switch
;
GtkWidget
*
purple_settings_row
;
GtkWidget
*
matrix_homeserver_dialog
;
GtkWidget
*
matrix_homeserver_entry
;
GtkWidget
*
matrix_accept_button
;
...
...
@@ -1106,6 +1108,8 @@ chatty_settings_dialog_class_init (ChattySettingsDialogClass *klass)
gtk_widget_class_bind_template_child
(
widget_class
,
ChattySettingsDialog
,
convert_smileys_switch
);
gtk_widget_class_bind_template_child
(
widget_class
,
ChattySettingsDialog
,
return_sends_switch
);
gtk_widget_class_bind_template_child
(
widget_class
,
ChattySettingsDialog
,
purple_settings_row
);
gtk_widget_class_bind_template_child
(
widget_class
,
ChattySettingsDialog
,
matrix_homeserver_dialog
);
gtk_widget_class_bind_template_child
(
widget_class
,
ChattySettingsDialog
,
matrix_homeserver_entry
);
gtk_widget_class_bind_template_child
(
widget_class
,
ChattySettingsDialog
,
matrix_homeserver_spinner
);
...
...
@@ -1165,6 +1169,7 @@ chatty_settings_dialog_init (ChattySettingsDialog *self)
ChattyPurple
*
purple
;
purple
=
chatty_purple_get_default
();
gtk_widget_show
(
self
->
purple_settings_row
);
gtk_widget_set_visible
(
self
->
message_carbons_row
,
chatty_purple_has_carbon_plugin
(
purple
));
g_object_bind_property
(
purple
,
"enabled"
,
...
...
@@ -1178,9 +1183,6 @@ chatty_settings_dialog_init (ChattySettingsDialog *self)
}
#else
gtk_widget_hide
(
self
->
xmpp_radio_button
);
gtk_widget_hide
(
self
->
enable_purple_row
);
gtk_widget_hide
(
self
->
message_archive_switch
);
gtk_widget_hide
(
self
->
message_carbons_switch
);
#endif
if
(
chatty_settings_get_experimental_features
(
chatty_settings_get_default
()))
...
...
src/ui/chatty-settings-dialog.ui
View file @
b39eb5c2
...
...
@@ -270,8 +270,8 @@
</object>
</child>
<child>
<object
class=
"HdyActionRow"
>
<property
name=
"visible"
>
True
</property>
<object
class=
"HdyActionRow"
id=
"purple_settings_row"
>
<property
name=
"visible"
>
0
</property>
<property
name=
"activatable"
>
True
</property>
<property
name=
"selectable"
>
False
</property>
<property
name=
"title"
translatable=
"yes"
>
Purple Settings
</property>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment