Show proper size string for 0kb (fixes NB#92465).
[modest] / src / hildon2 / modest-accounts-window.c
index 0b4b1ee..8fd6026 100644 (file)
@@ -70,8 +70,6 @@ struct _ModestAccountsWindowPrivate {
        /* signals */
        GSList *sighandlers;
 
-       /* Display state */
-       osso_display_state_t display_state;
 };
 #define MODEST_ACCOUNTS_WINDOW_GET_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE((o), \
                                                                            MODEST_TYPE_ACCOUNTS_WINDOW, \
@@ -129,7 +127,6 @@ modest_accounts_window_instance_init (ModestAccountsWindow *obj)
        priv = MODEST_ACCOUNTS_WINDOW_GET_PRIVATE(obj);
 
        priv->sighandlers = NULL;
-       priv->display_state = OSSO_DISPLAY_ON;
        
        priv->account_view = NULL;
        
@@ -182,19 +179,6 @@ connect_signals (ModestAccountsWindow *self)
        
 }
 
-static void 
-osso_display_event_cb (osso_display_state_t state, 
-                      gpointer data)
-{
-       ModestAccountsWindowPrivate *priv = MODEST_ACCOUNTS_WINDOW_GET_PRIVATE (data);
-
-       priv->display_state = state;
-
-       /* Stop blinking if the screen becomes on */
-       if (priv->display_state == OSSO_DISPLAY_ON)
-               modest_platform_remove_new_mail_notifications (TRUE);
-}
-
 ModestWindow *
 modest_accounts_window_new (void)
 {
@@ -237,12 +221,6 @@ modest_accounts_window_new (void)
                g_object_unref (window_icon);
        }
 
-       /* Listen for changes in the screen, we don't want to show a
-          led pattern when the display is on for example */
-       osso_hw_set_display_event_cb (modest_maemo_utils_get_osso_context (),
-                                     osso_display_event_cb,
-                                     self); 
-
        /* Dont't restore settings here, 
         * because it requires a gtk_widget_show(), 
         * and we don't want to do that until later,
@@ -252,18 +230,6 @@ modest_accounts_window_new (void)
        return MODEST_WINDOW(self);
 }
 
-gboolean
-modest_accounts_window_screen_is_on (ModestAccountsWindow *self)
-{
-       ModestAccountsWindowPrivate *priv = NULL;
-
-       g_return_val_if_fail (MODEST_IS_ACCOUNTS_WINDOW(self), FALSE);
-
-       priv = MODEST_ACCOUNTS_WINDOW_GET_PRIVATE (self);
-       
-       return (priv->display_state == OSSO_DISPLAY_ON) ? TRUE : FALSE;
-}
-
 ModestAccountView *
 modest_accounts_window_get_account_view (ModestAccountsWindow *self)
 {
@@ -282,25 +248,25 @@ setup_menu (ModestAccountsWindow *self)
        g_return_if_fail (MODEST_IS_ACCOUNTS_WINDOW(self));
 
        /* Settings menu buttons */
-       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("TODO: new account"),
+       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_new_account"), NULL, 
                                           APP_MENU_CALLBACK (modest_ui_actions_on_new_account), 
                                           NULL);
-       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("TODO: edit accounts"),
+       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_edit_accounts"), NULL,
                                           APP_MENU_CALLBACK (modest_ui_actions_on_accounts), 
                                           NULL);
-       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_options"),
+       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_options"), NULL,
                                           APP_MENU_CALLBACK (modest_ui_actions_on_settings), 
                                           NULL);
-       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_globalsmtpservers"),
+       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_globalsmtpservers"), NULL,
                                           APP_MENU_CALLBACK (modest_ui_actions_on_smtp_servers),
                                           MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_tools_smtp_servers));
-       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_viewer_newemail"),
+       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_new_message"), "<Control>n",
                                           APP_MENU_CALLBACK (modest_ui_actions_on_new_msg),
                                           MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_new_msg));
-       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_sendandreceive"),
+       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_sendandreceive"), NULL,
                                           APP_MENU_CALLBACK (modest_ui_actions_on_send_receive),
                                           MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_send_receive_all));
-       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_outbox_cancelsend"),
+       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_outbox_cancelsend"), NULL,
                                           APP_MENU_CALLBACK (modest_ui_actions_cancel_send),
                                           MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_cancel_sending_all));
 }