#include "modest-text-utils.h"
#include "modest-signal-mgr.h"
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
-#include <hildon-widgets/hildon-program.h>
-#else
-#include <hildon/hildon-program.h>
-#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
-
#define MODEST_MAIN_WINDOW_ACTION_GROUP_ADDITIONS "ModestMainWindowActionAdditions"
#define XALIGN 0.5
static gboolean on_zoom_minus_plus_not_implemented (ModestWindow *window);
-static void
-on_account_inserted (TnyAccountStore *accoust_store,
- TnyAccount *account,
- gpointer user_data);
+static void on_account_inserted (TnyAccountStore *accoust_store,
+ TnyAccount *account,
+ gpointer user_data);
-static void
-on_account_removed (TnyAccountStore *accoust_store,
- TnyAccount *account,
- gpointer user_data);
+static void on_account_removed (TnyAccountStore *accoust_store,
+ TnyAccount *account,
+ gpointer user_data);
+
+static void on_account_changed (TnyAccountStore *account_store,
+ TnyAccount *account,
+ gpointer user_data);
static void on_default_account_changed (ModestAccountMgr* mgr,
gpointer user_data);
static void on_refresh_account_action_activated (GtkAction *action,
gpointer user_data);
-static void on_account_updated (ModestAccountMgr* mgr, gchar* account_name,
- gpointer user_data);
-
static void on_send_receive_csm_activated (GtkMenuItem *item,
gpointer user_data);
/* Sanity check: shouldn't be needed, the window mgr should
call this function before */
- modest_main_window_disconnect_signals (MODEST_WINDOW (obj));
-
+ modest_main_window_disconnect_signals (MODEST_WINDOW (obj));
modest_main_window_cleanup_queue_error_signals ((ModestMainWindow *) obj);
-
+
g_slist_free (priv->progress_widgets);
g_byte_array_free (priv->merge_ids, TRUE);
g_source_remove (priv->restore_paned_timeout);
priv->restore_paned_timeout = 0;
}
-
+
G_OBJECT_CLASS(parent_class)->finalize (obj);
}
G_CALLBACK (on_default_account_changed),
self);
- priv->sighandlers =
- modest_signal_mgr_connect (priv->sighandlers,
- G_OBJECT (modest_runtime_get_account_mgr ()),
- "account_updated",
- G_CALLBACK (on_account_updated),
- self);
/* Account store */
priv->sighandlers =
modest_signal_mgr_connect (priv->sighandlers,
+ G_OBJECT (modest_runtime_get_account_store ()),
+ "account_changed",
+ G_CALLBACK (on_account_changed),
+ self);
+
+ priv->sighandlers =
+ modest_signal_mgr_connect (priv->sighandlers,
G_OBJECT (modest_runtime_get_account_store()),
"password_requested",
G_CALLBACK (modest_ui_actions_on_password_requested),
ModestDimmingRulesGroup *toolbar_rules_group = NULL;
GtkActionGroup *action_group = NULL;
GError *error = NULL;
+ HildonProgram *app;
ModestConf *conf = NULL;
GtkAction *action = NULL;
GdkPixbuf *window_icon;
gtk_ui_manager_get_accel_group (parent_priv->ui_manager));
/* Menubar. Update the state of some toggles */
- parent_priv->menubar = gtk_ui_manager_get_widget (parent_priv->ui_manager, "/MenuBar");
+ parent_priv->menubar = modest_maemo_utils_get_manager_menubar_as_menu (parent_priv->ui_manager, "/MenuBar");
conf = modest_runtime_get_conf ();
action = gtk_ui_manager_get_action (parent_priv->ui_manager,
"/MenuBar/ViewMenu/ViewShowToolbarMainMenu/ViewShowToolbarNormalScreenMenu");
gtk_container_add (GTK_CONTAINER(self), priv->main_vbox);
- HildonProgram *app = hildon_program_get_instance ();
+ app = hildon_program_get_instance ();
hildon_program_add_window (app, HILDON_WINDOW (self));
g_signal_connect (G_OBJECT(app), "notify::is-topmost",
G_CALLBACK (modest_main_window_on_show), folder_win);
/* Set window icon */
- window_icon = modest_platform_get_icon (MODEST_APP_ICON);
+ window_icon = modest_platform_get_icon (MODEST_APP_ICON, MODEST_ICON_SIZE_BIG);
if (window_icon) {
gtk_window_set_icon (GTK_WINDOW (self), window_icon);
g_object_unref (window_icon);
}
static void
-on_account_updated (ModestAccountMgr* mgr,
- gchar* account_name,
+on_account_changed (TnyAccountStore *account_store,
+ TnyAccount *account,
gpointer user_data)
{
ModestMainWindow *win = MODEST_MAIN_WINDOW (user_data);
+ /* We need to refresh the details widget because it could have changed */
if (modest_main_window_get_contents_style(win) == MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS) {
modest_main_window_set_contents_style (win, MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS);
}
+
+ /* Update the menus as well, the account name could be changed */
+ update_menus (MODEST_MAIN_WINDOW (user_data));
}
/*
(const gchar *) gray_color_markup);
label_w = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label_w), label);
+ gtk_label_set_ellipsize (GTK_LABEL (label_w), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (vbox), label_w, FALSE, FALSE, 0);
g_free (device_name);
g_free (label);
label_w = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label_w), label);
+ gtk_label_set_ellipsize (GTK_LABEL (label_w), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (vbox), label_w, FALSE, FALSE, 0);
g_string_free (proto, TRUE);
g_free (label);
modest_tny_folder_store_get_message_count (folder_store));
label_w = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label_w), label);
+ gtk_label_set_ellipsize (GTK_LABEL (label_w), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (vbox), label_w, FALSE, FALSE, 0);
g_free (label);
modest_tny_folder_store_get_folder_count (folder_store));
label_w = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label_w), label);
+ gtk_label_set_ellipsize (GTK_LABEL (label_w), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (vbox), label_w, FALSE, FALSE, 0);
g_free (label);
label_w = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label_w), label);
+ gtk_label_set_ellipsize (GTK_LABEL (label_w), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (vbox), label_w, FALSE, FALSE, 0);
g_free (label);
} else if (TNY_IS_ACCOUNT(folder_store)) {
gray_color_markup, _("mcen_ti_lastupdated"), last_updated_string);
label_w = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label_w), label);
+ gtk_label_set_ellipsize (GTK_LABEL (label_w), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (vbox), label_w, FALSE, FALSE, 0);
g_free (label);
}