Example #1
0
double fileops_get_trash_count()
{
    GFile* _trash_can = fileops_get_trash_entry ();
    GFileInfo* info = g_file_query_info(_trash_can, G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT, G_FILE_QUERY_INFO_NONE, NULL, NULL);
    double count = g_file_info_get_attribute_uint32(info, G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT);
    g_object_unref(info);
    g_object_unref(_trash_can);
    return count;
}
Example #2
0
double fileops_get_trash_count()
{
    GFile* _trash_can = fileops_get_trash_entry ();
    GFileInfo* info = g_file_query_info(_trash_can, G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT, G_FILE_QUERY_INFO_NONE, NULL, NULL);
    double count = 0;
    if (info != NULL) { // info maybe equal NULL when use xinit run desktop
        count = g_file_info_get_attribute_uint32(info, G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT);
        g_object_unref(info);
    }
    g_object_unref(_trash_can);
    return count;
}
Example #3
0
{
#if 0
	extern void fileops_confirm_trash ();
	Test({
		fileops_confirm_trash();
	},"fileops_confirm_trash");
#endif

	extern void fileops_empty_trash ();
	Test({
		fileops_empty_trash();
	},"fileops_empty_trash");

    extern char* dentry_get_name(Entry* e);
	extern GFile* fileops_get_trash_entry();
	Test({
		GFile* f = fileops_get_trash_entry();
		// char* c = dentry_get_name(f);
		// g_message("%s",c);
		// g_object_unref(c);
        func_test_entry_char(dentry_get_name,f,"/");
		g_object_unref(f);
	},"fileops_get_trash_entry");

	extern double fileops_get_trash_count();
	Test({
		double d = fileops_get_trash_count();
		g_message("%f",d);
	},"fileops_get_trash_count");

}