X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fgnome%2Fmodest-platform.c;h=afe8f66f59036e663e52279c1b28e1d2da609185;hb=92bef44ea70f8b4e16c78591bc12f58fac9a7c53;hp=3fc46b4e2f8abf4a9de79e94cc4275d2ce230c1c;hpb=99b831c709432c1dbf5331b9ab18690426244bb8;p=modest diff --git a/src/gnome/modest-platform.c b/src/gnome/modest-platform.c index 3fc46b4..afe8f66 100644 --- a/src/gnome/modest-platform.c +++ b/src/gnome/modest-platform.c @@ -34,9 +34,10 @@ #include "modest-platform.h" #include "modest-mail-operation-queue.h" #include "modest-runtime.h" +#include "gnome/modest-gnome-global-settings-dialog.h" gboolean -modest_platform_init (void) +modest_platform_init (int argc, char *argv[]) { return TRUE; /* nothing to do */ } @@ -89,6 +90,13 @@ modest_platform_activate_uri (const gchar *uri) } gboolean +modest_platform_activate_file (const gchar *path, const gchar *mime_type) +{ + modest_runtime_not_implemented (NULL); + return FALSE; +} + +gboolean modest_platform_show_uri_popup (const gchar *uri) { modest_runtime_not_implemented (NULL); @@ -128,10 +136,7 @@ modest_platform_run_new_folder_dialog (GtkWindow *parent_window, gchar **folder_name) { GtkWidget *dialog, *entry; - gboolean finished = FALSE; gint result; - TnyFolder *new_folder; - ModestMailOperation *mail_op; /* Ask the user for the folder name */ dialog = gtk_dialog_new_with_buttons (_("New Folder Name"), @@ -162,38 +167,84 @@ modest_platform_run_new_folder_dialog (GtkWindow *parent_window, return result; } + gint modest_platform_run_confirmation_dialog (GtkWindow *parent_window, - ModestConfirmationDialogType type, - gpointer user_data) + const gchar *msg) { - switch (type) { - case MODEST_CONFIRMATION_DELETE_FOLDER: - break; - }; - /* TODO implement confirmation dialog */ return GTK_RESPONSE_CANCEL; } void modest_platform_run_information_dialog (GtkWindow *parent_window, - ModestInformationDialogType type) + const gchar *message) { - switch (type) { - case MODEST_INFORMATION_CREATE_FOLDER: - break; - case MODEST_INFORMATION_DELETE_FOLDER: - break; - }; - /* TODO: implement a information dialog */ } -gboolean modest_platform_connect_and_wait (GtkWindow *parent_window) +gboolean modest_platform_connect_and_wait (GtkWindow *parent_window, TnyAccount *account) +{ + /* TODO: Do something with network-manager? + Otherwise, maybe it is safe to assume that we would already be online if we could be. */ + return TRUE; +} + +gboolean modest_platform_connect_and_wait_if_network_account (GtkWindow *parent_window, TnyAccount *account) { /* TODO: Do something with network-manager? Otherwise, maybe it is safe to assume that we would already be online if we could be. */ return TRUE; } +gboolean modest_platform_set_update_interval (guint minutes) +{ + /* TODO. */ + return FALSE; +} + +void +modest_platform_run_sort_dialog (GtkWindow *parent_window, + ModestSortDialogType type) +{ + /* TODO */ +} + +GtkWidget * +modest_platform_get_global_settings_dialog () +{ + return modest_gnome_global_settings_dialog_new (); +} + +void +modest_platform_on_new_msg (void) +{ + /* TODO: implement this */ + g_print ("--------------- NEW MESSAGE ARRIVED ---------------\n"); +} + + + +gboolean +modest_platform_show_help (GtkWidget *widget, const gchar *help_id) +{ + return TRUE; /* TODO */ +} + +void +modest_platform_show_search_messages (GtkWindow *parent_window) +{ + modest_runtime_not_implemented (NULL); +} + +GtkWidget * +modest_platform_create_folder_view (TnyFolderStoreQuery *query) +{ + GtkWidget *widget = modest_folder_view_new (query); + + /* Show all accounts by default */ + modest_folder_view_set_style (MODEST_FOLDER_VIEW (widget), + MODEST_FOLDER_VIEW_STYLE_SHOW_ALL); + + return widget; +}