]> git.0d.be Git - empathy.git/commitdiff
Merge remote-tracking branch 'pochu/misc-fixes'
authorDanielle Madeley <danielle.madeley@collabora.co.uk>
Fri, 14 Oct 2011 04:27:12 +0000 (15:27 +1100)
committerDanielle Madeley <danielle.madeley@collabora.co.uk>
Fri, 14 Oct 2011 04:28:58 +0000 (15:28 +1100)
libempathy-gtk/empathy-call-utils.c
libempathy-gtk/empathy-ui-utils.c
src/empathy-call-window.c

index 399647a623a8b56fd74db6c75b36b88f7ee452e7..adf4987bad0e6b8197c38a97b0eadaf7b5e5b6b1 100644 (file)
@@ -55,6 +55,8 @@ get_error_display_message (GError *error)
         return _("The specified contact is not valid");
       case TP_ERROR_EMERGENCY_CALLS_NOT_SUPPORTED:
         return _("Emergency calls are not supported on this protocol");
+      case TP_ERROR_INSUFFICIENT_BALANCE:
+        return _("You don't have enough credit in order to place this call");
     }
 
   return _("There was an error starting the call");
index 3fde9e3e15d48407987470199c74da24b5680816..32ad451a12115918492780ae78e8ec7854580036 100644 (file)
@@ -947,6 +947,9 @@ empathy_filename_from_icon_name (const gchar *icon_name,
        }
 
        icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon_name, size, 0);
+       if (icon_info == NULL)
+               return NULL;
+
        ret = g_strdup (gtk_icon_info_get_filename (icon_info));
        gtk_icon_info_free (icon_info);
 
index 0a130c4f85f146ec0ad9c9e27e6f9bfc970d79fe..2a92e947168b3d395cd17c253ed1de264d8d5039 100644 (file)
@@ -2260,13 +2260,14 @@ empathy_call_window_constructed (GObject *object)
   EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (object);
   EmpathyCallWindowPriv *priv = GET_PRIV (self);
   TpyCallChannel *call;
+  TpyCallState state;
 
   g_assert (priv->handler != NULL);
 
   g_object_get (priv->handler, "call-channel", &call, NULL);
-  priv->outgoing = (call == NULL);
-  if (call != NULL)
-    g_object_unref (call);
+  state = tpy_call_channel_get_state (call, NULL, NULL);
+  priv->outgoing = (state == TPY_CALL_STATE_PENDING_INITIATOR);
+  tp_clear_object (&call);
 
   g_object_get (priv->handler, "target-contact", &priv->contact, NULL);
   g_assert (priv->contact != NULL);