Commit dc4ed6b7 authored by Mohammed Sadiq's avatar Mohammed Sadiq
Browse files

window: Show an error message if creating SMS with modem missing

Currently if the user tries to create an SMS with no supported
modem, chatty silently fails.  Let’s show an error dialog so that
the user knows why SMS conversation wasn’t created.

Fixes Librem5/chatty#313
parent 75fac042
Pipeline #55387 passed with stages
in 11 minutes and 54 seconds
......@@ -1151,8 +1151,22 @@ chatty_window_set_uri (ChattyWindow *self,
account = purple_accounts_find ("SMS", "prpl-mm-sms");
if (!purple_account_is_connected (account))
if (!purple_account_is_connected (account)) {
GtkWidget *dialog;
dialog = gtk_message_dialog_new (GTK_WINDOW (self),
_("Modem not available for SMS"));
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
who = chatty_utils_check_phonenumber (uri);
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