]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-new-message-dialog.c
Updated Spanish translation
[empathy.git] / libempathy-gtk / empathy-new-message-dialog.c
index 6cc5e3819e2032fcd8306a50faf9e7a010296a75..3661472591a8ffd665affefba407c14a4ae79e8c 100644 (file)
  * Authors: Xavier Claessens <xclaesse@gmail.com>
  */
 
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
+#include "config.h"
+#include "empathy-new-message-dialog.h"
 
-#include <gtk/gtk.h>
 #include <glib/gi18n-lib.h>
 
-#include <telepathy-glib/interfaces.h>
-
-#include <libempathy/empathy-tp-contact-factory.h>
-#include <libempathy/empathy-contact-manager.h>
-#include <libempathy/empathy-request-util.h>
-#include <libempathy/empathy-utils.h>
+#include "empathy-request-util.h"
+#include "empathy-contact-chooser.h"
+#include "empathy-ui-utils.h"
+#include "empathy-images.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
-#include <libempathy/empathy-debug.h>
-
-#include <libempathy-gtk/empathy-contact-chooser.h>
-#include <libempathy-gtk/empathy-ui-utils.h>
-#include <libempathy-gtk/empathy-images.h>
-
-#include "empathy-new-message-dialog.h"
-#include "empathy-account-chooser.h"
+#include "empathy-debug.h"
 
 static EmpathyNewMessageDialog *dialog_singleton = NULL;
 
@@ -152,7 +140,7 @@ empathy_new_message_dialog_response (GtkDialog *dialog,
 {
   EmpathyNewMessageDialog *self = (EmpathyNewMessageDialog *) dialog;
   FolksIndividual *individual = NULL;
-  EmpathyContact *contact;
+  EmpathyContact *contact = NULL;
 
   if (response_id < EMP_NEW_MESSAGE_TEXT)
     goto out;
@@ -307,7 +295,8 @@ empathy_new_message_dialog_init (EmpathyNewMessageDialog *self)
       G_CALLBACK (selection_activate_cb), self);
 
   /* close button */
-  gtk_dialog_add_buttons (GTK_DIALOG (self), GTK_STOCK_CLOSE, NULL);
+  gtk_dialog_add_button (GTK_DIALOG (self),
+      GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
 
   /* add SMS button */
   self->priv->button_sms = gtk_button_new_with_mnemonic (_("_SMS"));
@@ -321,14 +310,14 @@ empathy_new_message_dialog_init (EmpathyNewMessageDialog *self)
       GTK_ICON_SIZE_BUTTON);
   gtk_button_set_image (GTK_BUTTON (self->priv->button_chat), image);
 
-  gtk_dialog_add_action_widget (GTK_DIALOG (self), self->priv->button_chat,
-      EMP_NEW_MESSAGE_TEXT);
-  gtk_widget_show (self->priv->button_chat);
-
   gtk_dialog_add_action_widget (GTK_DIALOG (self), self->priv->button_sms,
       EMP_NEW_MESSAGE_SMS);
   gtk_widget_show (self->priv->button_sms);
 
+  gtk_dialog_add_action_widget (GTK_DIALOG (self), self->priv->button_chat,
+      EMP_NEW_MESSAGE_TEXT);
+  gtk_widget_show (self->priv->button_chat);
+
   /* Tweak the dialog */
   gtk_window_set_title (GTK_WINDOW (self), _("New Conversation"));
   gtk_window_set_role (GTK_WINDOW (self), "new_message");