]> git.0d.be Git - empathy.git/commitdiff
Move back the account assistant to src/
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 1 Aug 2009 17:11:33 +0000 (19:11 +0200)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Sat, 22 Aug 2009 13:13:12 +0000 (14:13 +0100)
libempathy-gtk/Makefile.am
libempathy-gtk/empathy-account-assistant.c [deleted file]
libempathy-gtk/empathy-account-assistant.h [deleted file]
src/Makefile.am
src/empathy-account-assistant.c [new file with mode: 0644]
src/empathy-account-assistant.h [new file with mode: 0644]
tests/Makefile.am
tests/test-empathy-account-assistant.c

index aeada220b658f20482df6863667fccb951648bc9..70e11e4128384a1e949cf6713ebe6182e9dc1814 100644 (file)
@@ -24,7 +24,6 @@ BUILT_SOURCES =                                       \
 lib_LTLIBRARIES = libempathy-gtk.la
 
 libempathy_gtk_handwritten_source =                    \
-       empathy-account-assistant.c             \
        empathy-account-chooser.c               \
        empathy-account-widget.c                \
        empathy-account-widget-irc.c            \
@@ -87,7 +86,6 @@ libempathy_gtk_la_LDFLAGS =                \
        -export-symbols-regex ^empathy_
 
 libempathy_gtk_headers =                       \
-       empathy-account-assistant.h             \
        empathy-account-chooser.h               \
        empathy-account-widget.h                \
        empathy-account-widget-irc.h            \
diff --git a/libempathy-gtk/empathy-account-assistant.c b/libempathy-gtk/empathy-account-assistant.c
deleted file mode 100644 (file)
index 2efe0f0..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2009 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Authors: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
- */
-
-/* empathy-account-assistant.c */
-
-#include <glib/gi18n.h>
-
-#include "empathy-account-assistant.h"
-#include "empathy-ui-utils.h"
-
-G_DEFINE_TYPE (EmpathyAccountAssistant, empathy_account_assistant,
-    GTK_TYPE_ASSISTANT)
-
-static GtkWidget *
-account_assistant_build_introduction_page (void)
-{
-  GtkWidget *main_vbox, *hbox_1, *w, *radio, *vbox_1;
-  GdkPixbuf *pix;
-
-  main_vbox = gtk_vbox_new (FALSE, 12);
-  gtk_widget_show (main_vbox);
-  gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
-
-  hbox_1 = gtk_hbox_new (FALSE, 12);
-  gtk_box_pack_start (GTK_BOX (main_vbox), hbox_1, TRUE, TRUE, 0);
-  gtk_widget_show (hbox_1);
-
-  w = gtk_label_new (_("With Empathy you can chat with people \nonline nearby "
-          "and with friends and colleagues \nwho use Google Talk, AIM, "
-          "Windows Live \nand many other chat programs. With a microphone \n"
-          "or a webcam you can also have audio or video calls."));
-  gtk_misc_set_alignment (GTK_MISC (w), 0, 0.5);
-  gtk_box_pack_start (GTK_BOX (hbox_1), w, TRUE, TRUE, 0);
-  gtk_widget_show (w);
-
-  pix = empathy_pixbuf_from_icon_name_sized ("empathy", 96);
-  w = gtk_image_new_from_pixbuf (pix);
-  gtk_box_pack_start (GTK_BOX (hbox_1), w, TRUE, TRUE, 6);
-  gtk_widget_show (w);
-
-  g_object_unref (pix);
-
-  w = gtk_label_new (_("Do you have an account you've been using with another "
-          "chat program?"));
-  gtk_misc_set_alignment (GTK_MISC (w), 0, 0);
-  gtk_box_pack_start (GTK_BOX (main_vbox), w, FALSE, FALSE, 0);
-  gtk_widget_show (w);
-
-  w = gtk_alignment_new (0, 0, 0, 0);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (w), 0, 0, 12, 0);
-  gtk_box_pack_start (GTK_BOX (main_vbox), w, TRUE, TRUE, 0);
-  gtk_widget_show (w);
-
-  vbox_1 = gtk_vbox_new (FALSE, 6);
-  gtk_container_add (GTK_CONTAINER (w), vbox_1);
-  gtk_widget_show (vbox_1);
-
-  radio = gtk_radio_button_new_with_label (NULL, _("Yes, import my account details from "));
-  gtk_box_pack_start (GTK_BOX (vbox_1), radio, TRUE, TRUE, 0);
-  gtk_widget_show (radio);
-
-  w = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio), _("Yes, I'll enter my account details now"));
-  gtk_box_pack_start (GTK_BOX (vbox_1), w, TRUE, TRUE, 0);
-  gtk_widget_show (w);
-
-  w = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio), _("No, I want a new account"));
-  gtk_box_pack_start (GTK_BOX (vbox_1), w, TRUE, TRUE, 0);
-  gtk_widget_show (w);
-
-  w = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio), _("No, I just want to see people online nearby for now"));
-  gtk_box_pack_start (GTK_BOX (vbox_1), w, TRUE, TRUE, 0);
-  gtk_widget_show (w);
-
-  return main_vbox;
-}
-
-static void
-empathy_account_assistant_class_init (EmpathyAccountAssistantClass *klass)
-{
-
-}
-
-static void
-empathy_account_assistant_init (EmpathyAccountAssistant *self)
-{
-  GtkWidget *page;
-
-  page = account_assistant_build_introduction_page ();
-  gtk_assistant_append_page (GTK_ASSISTANT (self), page);
-  gtk_assistant_set_page_title (GTK_ASSISTANT (self), page, _("Welcome to Empathy"));
-  gtk_assistant_set_page_type (GTK_ASSISTANT (self), page, GTK_ASSISTANT_PAGE_INTRO);
-  gtk_assistant_set_page_complete (GTK_ASSISTANT (self), page, TRUE);
-}
-
-GtkWidget *
-empathy_account_assistant_new (void)
-{
-  return g_object_new (EMPATHY_TYPE_ACCOUNT_ASSISTANT, NULL);
-}
diff --git a/libempathy-gtk/empathy-account-assistant.h b/libempathy-gtk/empathy-account-assistant.h
deleted file mode 100644 (file)
index 38a96f8..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2009 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Authors: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
- */
-
-/* empathy-account-assistant.h */
-
-#ifndef __EMPATHY_ACCOUNT_ASSISTANT_H__
-#define __EMPATHY_ACCOUNT_ASSISTANT_H__
-
-#include <glib-object.h>
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-#define EMPATHY_TYPE_ACCOUNT_ASSISTANT empathy_account_assistant_get_type()
-#define EMPATHY_ACCOUNT_ASSISTANT(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_ACCOUNT_ASSISTANT, EmpathyAccountAssistant))
-#define EMPATHY_ACCOUNT_ASSISTANT_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_ACCOUNT_ASSISTANT, EmpathyAccountAssistantClass))
-#define EMPATHY_IS_ACCOUNT_ASSISTANT(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_ACCOUNT_ASSISTANT))
-#define EMPATHY_IS_ACCOUNT_ASSISTANT_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_ACCOUNT_ASSISTANT))
-#define EMPATHY_ACCOUNT_ASSISTANT_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_ACCOUNT_ASSISTANT, EmpathyAccountAssistantClass))
-
-typedef struct {
-  GtkAssistant parent;
-
-  /* private */
-  gpointer priv;
-} EmpathyAccountAssistant;
-
-typedef struct {
-  GtkAssistantClass parent_class;
-} EmpathyAccountAssistantClass;
-
-GType empathy_account_assistant_get_type (void);
-
-GtkWidget *empathy_account_assistant_new (void);
-
-G_END_DECLS
-
-#endif /* __EMPATHY_ACCOUNT_ASSISTANT_H__ */
index d0b86edfcc19b8ae66d6594bc537dd90a27b129b..9ac6b9bb3d9790c3578b0bb53edb93b4eaee43f6 100644 (file)
@@ -31,6 +31,7 @@ BUILT_SOURCES= \
 empathy_handwritten_source = \
        empathy.c                                                       \
        empathy-about-dialog.c empathy-about-dialog.h                   \
+       empathy-account-assistant.c empathy-account-assistant.h         \
        empathy-accounts-dialog.c empathy-accounts-dialog.h             \
        empathy-call-window.c empathy-call-window.h                     \
        empathy-call-window-fullscreen.c empathy-call-window-fullscreen.h                       \
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
new file mode 100644 (file)
index 0000000..6d3c27a
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2009 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Authors: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
+ */
+
+/* empathy-account-assistant.c */
+
+#include <glib/gi18n.h>
+
+#include "empathy-account-assistant.h"
+#include <libempathy-gtk/empathy-ui-utils.h>
+
+G_DEFINE_TYPE (EmpathyAccountAssistant, empathy_account_assistant,
+    GTK_TYPE_ASSISTANT)
+
+static GtkWidget *
+account_assistant_build_introduction_page (void)
+{
+  GtkWidget *main_vbox, *hbox_1, *w, *radio, *vbox_1;
+  GdkPixbuf *pix;
+
+  main_vbox = gtk_vbox_new (FALSE, 12);
+  gtk_widget_show (main_vbox);
+  gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
+
+  hbox_1 = gtk_hbox_new (FALSE, 12);
+  gtk_box_pack_start (GTK_BOX (main_vbox), hbox_1, TRUE, TRUE, 0);
+  gtk_widget_show (hbox_1);
+
+  w = gtk_label_new (_("With Empathy you can chat with people \nonline nearby "
+          "and with friends and colleagues \nwho use Google Talk, AIM, "
+          "Windows Live \nand many other chat programs. With a microphone \n"
+          "or a webcam you can also have audio or video calls."));
+  gtk_misc_set_alignment (GTK_MISC (w), 0, 0.5);
+  gtk_box_pack_start (GTK_BOX (hbox_1), w, TRUE, TRUE, 0);
+  gtk_widget_show (w);
+
+  pix = empathy_pixbuf_from_icon_name_sized ("empathy", 96);
+  w = gtk_image_new_from_pixbuf (pix);
+  gtk_box_pack_start (GTK_BOX (hbox_1), w, TRUE, TRUE, 6);
+  gtk_widget_show (w);
+
+  g_object_unref (pix);
+
+  w = gtk_label_new (_("Do you have an account you've been using with another "
+          "chat program?"));
+  gtk_misc_set_alignment (GTK_MISC (w), 0, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), w, FALSE, FALSE, 0);
+  gtk_widget_show (w);
+
+  w = gtk_alignment_new (0, 0, 0, 0);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (w), 0, 0, 12, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), w, TRUE, TRUE, 0);
+  gtk_widget_show (w);
+
+  vbox_1 = gtk_vbox_new (FALSE, 6);
+  gtk_container_add (GTK_CONTAINER (w), vbox_1);
+  gtk_widget_show (vbox_1);
+
+  radio = gtk_radio_button_new_with_label (NULL, _("Yes, import my account details from "));
+  gtk_box_pack_start (GTK_BOX (vbox_1), radio, TRUE, TRUE, 0);
+  gtk_widget_show (radio);
+
+  w = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio), _("Yes, I'll enter my account details now"));
+  gtk_box_pack_start (GTK_BOX (vbox_1), w, TRUE, TRUE, 0);
+  gtk_widget_show (w);
+
+  w = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio), _("No, I want a new account"));
+  gtk_box_pack_start (GTK_BOX (vbox_1), w, TRUE, TRUE, 0);
+  gtk_widget_show (w);
+
+  w = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio), _("No, I just want to see people online nearby for now"));
+  gtk_box_pack_start (GTK_BOX (vbox_1), w, TRUE, TRUE, 0);
+  gtk_widget_show (w);
+
+  return main_vbox;
+}
+
+static void
+empathy_account_assistant_class_init (EmpathyAccountAssistantClass *klass)
+{
+
+}
+
+static void
+empathy_account_assistant_init (EmpathyAccountAssistant *self)
+{
+  GtkWidget *page;
+
+  page = account_assistant_build_introduction_page ();
+  gtk_assistant_append_page (GTK_ASSISTANT (self), page);
+  gtk_assistant_set_page_title (GTK_ASSISTANT (self), page, _("Welcome to Empathy"));
+  gtk_assistant_set_page_type (GTK_ASSISTANT (self), page, GTK_ASSISTANT_PAGE_INTRO);
+  gtk_assistant_set_page_complete (GTK_ASSISTANT (self), page, TRUE);
+}
+
+GtkWidget *
+empathy_account_assistant_new (void)
+{
+  return g_object_new (EMPATHY_TYPE_ACCOUNT_ASSISTANT, NULL);
+}
diff --git a/src/empathy-account-assistant.h b/src/empathy-account-assistant.h
new file mode 100644 (file)
index 0000000..38a96f8
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Authors: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
+ */
+
+/* empathy-account-assistant.h */
+
+#ifndef __EMPATHY_ACCOUNT_ASSISTANT_H__
+#define __EMPATHY_ACCOUNT_ASSISTANT_H__
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_ACCOUNT_ASSISTANT empathy_account_assistant_get_type()
+#define EMPATHY_ACCOUNT_ASSISTANT(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_ACCOUNT_ASSISTANT, EmpathyAccountAssistant))
+#define EMPATHY_ACCOUNT_ASSISTANT_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_ACCOUNT_ASSISTANT, EmpathyAccountAssistantClass))
+#define EMPATHY_IS_ACCOUNT_ASSISTANT(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_ACCOUNT_ASSISTANT))
+#define EMPATHY_IS_ACCOUNT_ASSISTANT_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_ACCOUNT_ASSISTANT))
+#define EMPATHY_ACCOUNT_ASSISTANT_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_ACCOUNT_ASSISTANT, EmpathyAccountAssistantClass))
+
+typedef struct {
+  GtkAssistant parent;
+
+  /* private */
+  gpointer priv;
+} EmpathyAccountAssistant;
+
+typedef struct {
+  GtkAssistantClass parent_class;
+} EmpathyAccountAssistantClass;
+
+GType empathy_account_assistant_get_type (void);
+
+GtkWidget *empathy_account_assistant_new (void);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_ACCOUNT_ASSISTANT_H__ */
index eb5dba52910c9361cddc6c441a2dbfd30b9750c7..8ffdae72358ff15a86bae015884b6cd298bd1d71 100644 (file)
@@ -37,6 +37,11 @@ test_empathy_status_preset_dialog_SOURCES = test-empathy-status-preset-dialog.c
 test_empathy_protocol_chooser_SOURCES = test-empathy-protocol-chooser.c
 test_empathy_account_assistant_SOURCES = test-empathy-account-assistant.c
 
+test_empathy_account_assistant_CFLAGS = -I$(top_srcdir)/src
+test_empathy_account_assistant_LDADD =                         \
+       $(top_builddir)/src/empathy-account-assistant.o \
+       $(LDADD)
+
 check_PROGRAMS = check-main
 TESTS = check-main
 check_main_SOURCES =                             \
index 5add95881f9fd77e44d1d5ec959f303c3296b6ff..f1f519d7752322340b00c99b713149629cf3e981 100644 (file)
@@ -3,7 +3,7 @@
 #include <gtk/gtk.h>
 
 #include <libempathy-gtk/empathy-ui-utils.h>
-#include <libempathy-gtk/empathy-account-assistant.h>
+#include "empathy-account-assistant.h"
 
 int main (int argc, char **argv)
 {