| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
#if HAVE_CONFIG_H |
|---|
| 21 |
#include "config.h" |
|---|
| 22 |
#endif |
|---|
| 23 |
|
|---|
| 24 |
#include <gtk/gtk.h> |
|---|
| 25 |
#include <glib/gi18n-lib.h> |
|---|
| 26 |
|
|---|
| 27 |
#include <tny-account-store.h> |
|---|
| 28 |
#include <tny-account-store-view.h> |
|---|
| 29 |
|
|---|
| 30 |
#include "tmut-platform-factory.h" |
|---|
| 31 |
#include "tmut-menu-view.h" |
|---|
| 32 |
#include "tmut-shell-window.h" |
|---|
| 33 |
#include "tmut-shared.h" |
|---|
| 34 |
|
|---|
| 35 |
int |
|---|
| 36 |
main (int argc, char **argv) |
|---|
| 37 |
{ |
|---|
| 38 |
GtkWidget *window; |
|---|
| 39 |
TnyAccountStore *account_store; |
|---|
| 40 |
TnyAccountStoreView *view; |
|---|
| 41 |
|
|---|
| 42 |
if (!g_thread_supported ()) |
|---|
| 43 |
g_thread_init (NULL); |
|---|
| 44 |
|
|---|
| 45 |
gdk_threads_init (); |
|---|
| 46 |
|
|---|
| 47 |
gdk_threads_enter (); |
|---|
| 48 |
gtk_init (&argc, &argv); |
|---|
| 49 |
|
|---|
| 50 |
bindtextdomain(GETTEXT_PACKAGE, TMUT_LOCALE_DIR); |
|---|
| 51 |
|
|---|
| 52 |
window = GTK_WIDGET (tmut_shell_window_new ()); |
|---|
| 53 |
gtk_window_set_title (GTK_WINDOW (window), _("TMut")); |
|---|
| 54 |
|
|---|
| 55 |
platfact = tmut_platform_factory_get_instance (); |
|---|
| 56 |
account_store = tny_platform_factory_new_account_store (platfact); |
|---|
| 57 |
|
|---|
| 58 |
view = TNY_ACCOUNT_STORE_VIEW (tmut_menu_view_new ()); |
|---|
| 59 |
gtk_widget_show (GTK_WIDGET (view)); |
|---|
| 60 |
|
|---|
| 61 |
tmut_shell_window_set_child (TMUT_SHELL_WINDOW (window), |
|---|
| 62 |
TMUT_SHELL_CHILD (view), NULL); |
|---|
| 63 |
|
|---|
| 64 |
tny_account_store_view_set_account_store (view, account_store); |
|---|
| 65 |
|
|---|
| 66 |
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), 0); |
|---|
| 67 |
|
|---|
| 68 |
gtk_widget_show (window); |
|---|
| 69 |
|
|---|
| 70 |
gtk_main(); |
|---|
| 71 |
gdk_threads_leave (); |
|---|
| 72 |
|
|---|
| 73 |
return 0; |
|---|
| 74 |
} |
|---|
| 75 |
|
|---|