Changeset 2917
- Timestamp:
- 11/07/07 04:19:21
- Files:
-
- trunk/libtinymail-camel/tny-camel-folder.c (modified) (2 diffs)
- trunk/libtinymail-camel/tny-camel-store-account.c (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-folder-store-tree-model.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libtinymail-camel/tny-camel-folder.c
r2916 r2917 2927 2927 notify_folder_observers_about_copy (GList *adds, GList *rems, gboolean del, gboolean in_idle) 2928 2928 { 2929 if (rems)2930 {2931 rems = g_list_first (rems);2932 while (rems)2933 {2934 CpyEvent *evt = rems->data;2935 if (del) {2936 TnyFolderStoreChange *change = tny_folder_store_change_new (evt->str);2937 2938 tny_folder_store_change_add_removed_folder (change, evt->fol);2939 2940 if (TNY_IS_CAMEL_STORE_ACCOUNT (evt->str)) {2941 if (in_idle)2942 notify_folder_store_observers_about_for_store_acc_in_idle (evt->str, change);2943 else2944 notify_folder_store_observers_about_for_store_acc (evt->str, change);2945 } else {2946 if (in_idle)2947 notify_folder_store_observers_about_in_idle (evt->str, change);2948 else2949 notify_folder_store_observers_about (evt->str, change);2950 }2951 2952 g_object_unref (change);2953 2954 }2955 cpy_event_free (evt);2956 rems = g_list_next (rems);2957 }2958 g_list_free (rems);2959 }2960 2961 2929 if (adds) 2962 2930 { … … 2989 2957 } 2990 2958 g_list_free (adds); 2959 } 2960 2961 if (rems) 2962 { 2963 rems = g_list_first (rems); 2964 while (rems) 2965 { 2966 CpyEvent *evt = rems->data; 2967 if (del) { 2968 TnyFolderStoreChange *change = tny_folder_store_change_new (evt->str); 2969 2970 tny_folder_store_change_add_removed_folder (change, evt->fol); 2971 2972 if (TNY_IS_CAMEL_STORE_ACCOUNT (evt->str)) { 2973 if (in_idle) 2974 notify_folder_store_observers_about_for_store_acc_in_idle (evt->str, change); 2975 else 2976 notify_folder_store_observers_about_for_store_acc (evt->str, change); 2977 } else { 2978 if (in_idle) 2979 notify_folder_store_observers_about_in_idle (evt->str, change); 2980 else 2981 notify_folder_store_observers_about (evt->str, change); 2982 } 2983 2984 g_object_unref (change); 2985 2986 } 2987 cpy_event_free (evt); 2988 rems = g_list_next (rems); 2989 } 2990 g_list_free (rems); 2991 2991 } 2992 2992 trunk/libtinymail-camel/tny-camel-store-account.c
r2884 r2917 780 780 camel_store_unsubscribe_folder (store, cpriv->folder_name, &subex); 781 781 tny_folder_store_change_add_removed_folder (change, folder); 782 } 783 784 g_free (cpriv->folder_name); 785 cpriv->folder_name = NULL; 786 aspriv->managed_folders = 787 g_list_remove (aspriv->managed_folders, cfol); 782 783 /* g_free (cpriv->folder_name); 784 cpriv->folder_name = NULL; */ 785 786 aspriv->managed_folders = 787 g_list_remove (aspriv->managed_folders, cfol); 788 789 } 790 788 791 789 792 g_static_rec_mutex_unlock (aspriv->factory_lock); trunk/libtinymailui-gtk/tny-gtk-folder-store-tree-model.c
r2915 r2917 822 822 } 823 823 824 static gboolean 825 do_nothinger (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) 826 { 827 TnyFolderStoreChange *change = (TnyFolderStoreChange *) user_data; 828 TnyFolderStore *parent_store = tny_folder_store_change_get_folder_store (change); 829 TnyFolderStore *folder = NULL; 830 831 gtk_tree_model_get (model, iter, 832 TNY_GTK_FOLDER_STORE_TREE_MODEL_INSTANCE_COLUMN, 833 &folder, -1); 834 835 if (folder && folder == parent_store && TNY_IS_FOLDER (folder)) 836 { 837 838 gtk_tree_store_set (GTK_TREE_STORE (model), iter, 839 TNY_GTK_FOLDER_STORE_TREE_MODEL_NAME_COLUMN, 840 tny_folder_get_name (TNY_FOLDER (folder)), 841 TNY_GTK_FOLDER_STORE_TREE_MODEL_UNREAD_COLUMN, 842 tny_folder_get_unread_count (TNY_FOLDER (folder)), 843 TNY_GTK_FOLDER_STORE_TREE_MODEL_ALL_COLUMN, 844 tny_folder_get_all_count (TNY_FOLDER (folder)), 845 TNY_GTK_FOLDER_STORE_TREE_MODEL_TYPE_COLUMN, 846 tny_folder_get_folder_type (TNY_FOLDER (folder)), 847 TNY_GTK_FOLDER_STORE_TREE_MODEL_INSTANCE_COLUMN, 848 folder, -1); 849 } 850 851 if (parent_store) 852 g_object_unref (parent_store); 853 854 if (folder) 855 g_object_unref (folder); 856 857 return FALSE; 858 } 824 859 825 860 static gboolean … … 987 1022 } 988 1023 989 if (changed & TNY_FOLDER_STORE_CHANGE_CHANGED_CREATED_FOLDERS) 1024 if (changed & TNY_FOLDER_STORE_CHANGE_CHANGED_CREATED_FOLDERS) { 1025 gtk_tree_model_foreach (model, do_nothinger, change); 990 1026 gtk_tree_model_foreach (model, foreach_if_store_add_created, change); 1027 gtk_tree_model_foreach (model, do_nothinger, change); 1028 } 991 1029 992 1030 if (changed & TNY_FOLDER_STORE_CHANGE_CHANGED_REMOVED_FOLDERS)
