aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test/utils/constants.ts
blob: f38728b77f442dca2deb578e3205478961590913 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { BigNumber } from '@0xproject/utils';

export const constants = {
    NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
    ROPSTEN_NETWORK_ID: 3,
    KOVAN_NETWORK_ID: 42,
    TESTRPC_NETWORK_ID: 50,
    AWAIT_TRANSACTION_MINED_MS: 0,
    KOVAN_RPC_URL: 'https://kovan.infura.io/',
    ROPSTEN_RPC_URL: 'https://ropsten.infura.io/',
    ZRX_DECIMALS: 18,
    DUMMY_TOKEN_NAME: '',
    DUMMY_TOKEN_SYMBOL: '',
    DUMMY_TOKEN_DECIMALS: 18,
    DUMMY_TOKEN_TOTAL_SUPPLY: new BigNumber(10 ** 27), // tslint:disable-line:custom-no-magic-numbers
    NUM_DUMMY_ERC20_TO_DEPLOY: 3,
    NUM_DUMMY_ERC721_TO_DEPLOY: 1,
    ZERO_AMOUNT: new BigNumber(0),
};
43'>143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
/*
 * e-mail-folder-pane.c
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) version 3.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with the program; if not, see <http://www.gnu.org/licenses/>
 *
 *
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
 *
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "e-mail-folder-pane.h"

#include <string.h>
#include <glib/gi18n.h>

#include "shell/e-shell.h"
#include "shell/e-shell-utils.h"

#include "libemail-engine/e-mail-utils.h"
#include "libemail-engine/mail-tools.h"

#include "e-mail-reader.h"
#include "e-mail-reader-utils.h"
#include "em-folder-tree-model.h"
#include "em-composer-utils.h"
#include "em-utils.h"
#include "message-list.h"

#define E_MAIL_FOLDER_PANE_GET_PRIVATE(obj) \
    (G_TYPE_INSTANCE_GET_PRIVATE \
    ((obj), E_TYPE_MAIL_FOLDER_PANE, EMailFolderPanePrivate))

struct _EMailFolderPanePrivate {
    gint placeholder;
};

G_DEFINE_TYPE (EMailFolderPane, e_mail_folder_pane, E_TYPE_MAIL_PANED_VIEW)

static gboolean
folder_pane_get_preview_visible (EMailView *view)
{
    return FALSE;
}

static void
folder_pane_set_preview_visible (EMailView *view,
                                 gboolean preview_visible)
{
    /* Ignore the request. */
}

static guint
mail_paned_view_open_selected_mail (EMailPanedView *view)
{
    EShell *shell;
    EMailReader *reader;
    EMailBackend *backend;
    ESourceRegistry *registry;
    GPtrArray *uids;
    gint i;
    GtkWindow *window;
    CamelFolder *folder;
    GPtrArray *views;
    guint ii, n_views = 0;

    reader = E_MAIL_READER (view);
    folder = e_mail_reader_ref_folder (reader);
    window = e_mail_reader_get_window (reader);
    uids = e_mail_reader_get_selected_uids (reader);
    g_return_val_if_fail (uids != NULL, 0);

    backend = e_mail_reader_get_backend (reader);
    shell = e_shell_backend_get_shell (E_SHELL_BACKEND (backend));
    registry = e_shell_get_registry (shell);

    /* XXX Either e_mail_reader_get_selected_uids()
     *     or MessageList should do this itself. */
    g_ptr_array_set_free_func (uids, (GDestroyNotify) g_free);

    if (!em_utils_ask_open_many (window, uids->len))
        goto exit;

    if (em_utils_folder_is_drafts (registry, folder)) {
        e_mail_reader_edit_messages (reader, folder, uids, TRUE, TRUE);
        goto exit;
    }

    if (em_utils_folder_is_outbox (registry, folder)) {
        e_mail_reader_edit_messages (reader, folder, uids, TRUE, TRUE);
        goto exit;
    }

    if (em_utils_folder_is_templates (registry, folder)) {
        e_mail_reader_edit_messages (reader, folder, uids, TRUE, TRUE);
        goto exit;
    }