diff --git a/debian/control b/debian/control index 8b2da4b..9eb6cb4 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: libhandy-0.0-dev (>= 0.0.10), libgtk-3-dev, modemmanager-dev, - libmm-glib-dev, + libmm-glib-dev (>= 1.12.0), libgsound-dev, libpeas-dev, libgom-1.0-dev, diff --git a/plugins/mm/calls-mm-call.c b/plugins/mm/calls-mm-call.c index b8f1b7a..eef4df9 100644 --- a/plugins/mm/calls-mm-call.c +++ b/plugins/mm/calls-mm-call.c @@ -119,13 +119,16 @@ static const struct CallsMMCallStateReasonMap STATE_REASON_MAP[] = { #define row(ENUMVALUE,DESCRIPTION) \ { MM_CALL_STATE_REASON_##ENUMVALUE, DESCRIPTION } \ - row (UNKNOWN, "Outgoing call created"), - row (OUTGOING_STARTED, "Outgoing call started"), - row (INCOMING_NEW, "Incoming call"), - row (ACCEPTED, "Call accepted"), - row (TERMINATED, "Call terminated"), - row (REFUSED_OR_BUSY, "Busy or call refused"), - row (ERROR, "Wrong number or network problem"), + row (UNKNOWN, N_("Call disconnected (unknown reason)")), + row (OUTGOING_STARTED, N_("Outgoing call started")), + row (INCOMING_NEW, N_("New incoming call")), + row (ACCEPTED, N_("Call accepted")), + row (TERMINATED, N_("Call ended")), + row (REFUSED_OR_BUSY, N_("Call disconnected (busy or call refused)")), + row (ERROR, N_("Call disconnected (wrong number or network problem)")), + row (AUDIO_SETUP_FAILED, N_("Call disconnected (error setting up audio channel)")), + row (TRANSFERRED, N_("Call transferred")), + row (DEFLECTED, N_("Call deflected")), #undef row @@ -137,25 +140,27 @@ set_disconnect_reason (CallsMMCall *self, MMCallStateReason reason) { const struct CallsMMCallStateReasonMap *map_row; - GString *reason_str; + + if (self->disconnect_reason) + { + g_free (self->disconnect_reason); + } for (map_row = STATE_REASON_MAP; map_row->desc; ++map_row) { if (map_row->value == reason) { - self->disconnect_reason = g_strdup(map_row->desc); + self->disconnect_reason = + g_strdup (gettext (map_row->desc)); return; } } - reason_str = g_string_new ("Unknown disconnect reason "); - g_string_append_printf (reason_str, "(%i)", (int)reason); + self->disconnect_reason = + g_strdup_printf (_("Call disconnected (unknown reason code %i)"), + (int)reason); - g_warning ("%s", reason_str->str); - CALLS_SET_PTR_PROPERTY (self->disconnect_reason, - reason_str->str); - - g_string_free (reason_str, FALSE); + g_warning ("%s", self->disconnect_reason); } diff --git a/plugins/mm/meson.build b/plugins/mm/meson.build index 37d588c..1758536 100644 --- a/plugins/mm/meson.build +++ b/plugins/mm/meson.build @@ -34,7 +34,7 @@ mm_deps = [ dependency('gobject-2.0'), dependency('gtk+-3.0'), dependency('ModemManager'), - dependency('mm-glib'), + dependency('mm-glib', version: '>= 1.12.0'), dependency('libpeas-1.0'), ]