* Commented some devive_force_online methods
authorSergio Villar Senin <svillar@igalia.com>
Mon, 19 Mar 2007 09:58:47 +0000 (09:58 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 19 Mar 2007 09:58:47 +0000 (09:58 +0000)
* Added tap-and-hold activated context menus to Maemo UI
* Fixed the drag and drop issue in the Maemo UI

pmo-trunk-r912

src/maemo/modest-main-window.c
src/modest-mail-operation.c
src/modest-main.c
src/modest-ui-actions.c
src/widgets/modest-folder-view.c

index cdebd41..c6da458 100644 (file)
@@ -227,8 +227,6 @@ restore_sizes (ModestMainWindow *self)
 
        conf = modest_runtime_get_conf ();
        
-       modest_widget_memory_restore (conf,G_OBJECT(self),
-                                     "modest-main-window");
        modest_widget_memory_restore (conf, G_OBJECT(priv->main_paned),
                                      "modest-main-paned");
        modest_widget_memory_restore (conf, G_OBJECT(priv->header_view),
@@ -328,6 +326,7 @@ connect_signals (ModestMainWindow *self)
 {      
        ModestWindowPrivate *parent_priv;
        ModestMainWindowPrivate *priv;
+       GtkWidget *menu;
        
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
        parent_priv = MODEST_WINDOW_GET_PRIVATE(self);
@@ -336,6 +335,9 @@ connect_signals (ModestMainWindow *self)
        g_signal_connect (G_OBJECT(priv->folder_view), "folder_selection_changed",
                          G_CALLBACK(modest_ui_actions_on_folder_selection_changed), self);
 
+       menu = gtk_ui_manager_get_widget (parent_priv->ui_manager, "/FolderViewContextMenu");
+       gtk_widget_tap_and_hold_setup (GTK_WIDGET (priv->folder_view), menu, NULL, 0);
+
        /* header view */
        g_signal_connect (G_OBJECT(priv->header_view), "status_update",
                          G_CALLBACK(modest_ui_actions_on_header_status_update), self);
@@ -370,7 +372,6 @@ sync_accounts_cb (ModestMainWindow *win)
 }
 
 
-       
 ModestWindow*
 modest_main_window_new (void)
 {
@@ -451,7 +452,7 @@ modest_main_window_new (void)
        gtk_box_pack_start (GTK_BOX(main_vbox), priv->main_paned, TRUE, TRUE,0);
 
        gtk_container_add (GTK_CONTAINER(self), main_vbox);
-       restore_sizes (MODEST_MAIN_WINDOW(self));       
+       restore_sizes (MODEST_MAIN_WINDOW(self));
        
        gtk_window_set_title (GTK_WINDOW(self), _("Modest"));
        gtk_window_set_icon_from_file (GTK_WINDOW(self), MODEST_APP_ICON, NULL);
@@ -475,9 +476,3 @@ modest_main_window_new (void)
 
        return MODEST_WINDOW(self);
 }
-
-
-
-
-
-
index 49a6875..1c5e43f 100644 (file)
@@ -534,7 +534,7 @@ modest_mail_operation_update_account (ModestMailOperation *self,
        query = NULL; //tny_folder_store_query_new ();
 
        /* FIXME: is this needed? */
-       tny_device_force_online (TNY_DEVICE(modest_runtime_get_device()));
+//     tny_device_force_online (TNY_DEVICE(modest_runtime_get_device()));
        
        /* FIXME: let query be NULL: do it for all */ 
        //tny_folder_store_query_add_item (query, NULL, TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED);
index 8127e9c..6dd6a61 100644 (file)
@@ -125,9 +125,9 @@ main (int argc, char *argv[])
        account_or_default = check_account (account);
        g_free (account);
 
-       if (modest_conf_get_bool (modest_runtime_get_conf(), MODEST_CONF_CONNECT_AT_STARTUP, NULL))
+/*     if (modest_conf_get_bool (modest_runtime_get_conf(), MODEST_CONF_CONNECT_AT_STARTUP, NULL))
                tny_device_force_online (modest_runtime_get_device());
-                       
+*/                     
        if (!batch) {
                if (!modest_runtime_init_ui (argc, argv)) {
                        g_printerr ("modest: cannot start ui\n");
index 83f60ff..c705470 100644 (file)
@@ -905,7 +905,7 @@ modest_ui_actions_on_item_not_found (ModestHeaderView *header_view,ModestItemTyp
 
                gtk_window_set_default_size (GTK_WINDOW(dialog), 300, 300);
                if (gtk_dialog_run (GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
-                       tny_device_force_online (modest_runtime_get_device());
+//                     tny_device_force_online (modest_runtime_get_device());
                }
        }
        gtk_widget_destroy (dialog);
index dd8d356..5f68032 100644 (file)
@@ -352,7 +352,6 @@ modest_folder_view_init (ModestFolderView *obj)
        priv->query          = NULL;
 
        column = gtk_tree_view_column_new ();   
-       gtk_tree_view_append_column (GTK_TREE_VIEW(obj),column);
        
        renderer = gtk_cell_renderer_pixbuf_new();
        gtk_tree_view_column_pack_start (column, renderer, FALSE);
@@ -373,6 +372,8 @@ modest_folder_view_init (ModestFolderView *obj)
        gtk_tree_view_set_headers_clickable (GTK_TREE_VIEW(obj), FALSE);
        gtk_tree_view_set_enable_search     (GTK_TREE_VIEW(obj), FALSE);
 
+       gtk_tree_view_append_column (GTK_TREE_VIEW(obj),column);
+
        setup_drag_and_drop (GTK_TREE_VIEW(obj));
 }