当前位置: 首页>>代码示例>>C++>>正文


C++ do_refresh函数代码示例

本文整理汇总了C++中do_refresh函数的典型用法代码示例。如果您正苦于以下问题:C++ do_refresh函数的具体用法?C++ do_refresh怎么用?C++ do_refresh使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了do_refresh函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: file_progress_real_query_replace

FileProgressStatus
file_progress_real_query_replace (FileOpContext * ctx,
                                  enum OperationMode mode, const char *destname,
                                  struct stat * _s_stat, struct stat * _d_stat)
{
    FileOpContextUI *ui;

    g_return_val_if_fail (ctx != NULL, FILE_CONT);
    g_return_val_if_fail (ctx->ui != NULL, FILE_CONT);

    ui = ctx->ui;

    if (ui->replace_result < REPLACE_ALWAYS)
    {
        ui->replace_filename = destname;
        ui->s_stat = _s_stat;
        ui->d_stat = _d_stat;
        ui->replace_result = overwrite_query_dialog (ctx, mode);
    }

    switch (ui->replace_result)
    {
    case REPLACE_UPDATE:
        do_refresh ();
        if (_s_stat->st_mtime > _d_stat->st_mtime)
            return FILE_CONT;
        else
            return FILE_SKIP;

    case REPLACE_SIZE:
        do_refresh ();
        if (_s_stat->st_size == _d_stat->st_size)
            return FILE_SKIP;
        else
            return FILE_CONT;

    case REPLACE_REGET:
        /* Careful: we fall through and set do_append */
        ctx->do_reget = _d_stat->st_size;

    case REPLACE_APPEND:
        ctx->do_append = TRUE;

    case REPLACE_YES:
    case REPLACE_ALWAYS:
        do_refresh ();
        return FILE_CONT;
    case REPLACE_NO:
    case REPLACE_NEVER:
        do_refresh ();
        return FILE_SKIP;
    case REPLACE_ABORT:
    default:
        return FILE_ABORT;
    }
}
开发者ID:artzub,项目名称:mc,代码行数:56,代码来源:filegui.c

示例2: file_progress_real_query_replace

FileProgressStatus
file_progress_real_query_replace (enum OperationMode mode, char *destname, struct stat *_s_stat,
				  struct stat *_d_stat)
{
    if (file_progress_replace_result < REPLACE_ALWAYS){
	file_progress_replace_filename = destname;
	s_stat = _s_stat;
	d_stat = _d_stat;
	init_replace (mode);
	run_dlg (replace_dlg);
	file_progress_replace_result = replace_dlg->ret_value;
	if (file_progress_replace_result == B_CANCEL)
	    file_progress_replace_result = REPLACE_ABORT;
	destroy_dlg (replace_dlg);
    }

    switch (file_progress_replace_result){
    case REPLACE_UPDATE:
	do_refresh ();
	if (_s_stat->st_mtime > _d_stat->st_mtime)
	    return FILE_CONT;
	else
	    return FILE_SKIP;

    case REPLACE_SIZE:
	do_refresh ();
	if (_s_stat->st_size == _d_stat->st_size)
	    return FILE_SKIP;
	else
	    return FILE_CONT;
	
    case REPLACE_REGET:
	/* Carefull: we fall through and set do_append */
	file_progress_do_reget = _d_stat->st_size;
	
    case REPLACE_APPEND:
        file_progress_do_append = 1;
	
    case REPLACE_YES:
    case REPLACE_ALWAYS:
	do_refresh ();
	return FILE_CONT;
    case REPLACE_NO:
    case REPLACE_NEVER:
	do_refresh ();
	return FILE_SKIP;
    case REPLACE_ABORT:
    default:
	return FILE_ABORT;
    }
}
开发者ID:OS2World,项目名称:UTIL-SHELL-Midnight_Commander,代码行数:51,代码来源:filegui.c

示例3: print_request

void print_request(uint8_t * public_key, uint8_t * data, uint16_t length)
{
    new_lines("[i] received friend request");
    do_refresh();
    if(memcmp(data , "Install Gentoo", sizeof("Install Gentoo")) == 0 )
    //if the request contained the message of peace the person is obviously a friend so we add him.
    {
        new_lines("[i] friend request accepted");
        do_refresh();
        int num = m_addfriend_norequest(public_key);
        char numchar[100];
        sprintf(numchar, "[i] added friendnumber %d", num);
        new_lines(numchar);
    }
}
开发者ID:SilentSand,项目名称:ProjectTox-Core,代码行数:15,代码来源:nTox.c

示例4: layout_box

void
layout_box (void)
{
    WDialog *layout_dlg;

    old_layout = panels_layout;
    old_output_lines = output_lines;
    layout_dlg = init_layout ();

    if (dlg_run (layout_dlg) == B_ENTER)
    {
        size_t i;

        for (i = 0; i < (size_t) LAYOUT_OPTIONS_COUNT; i++)
            if (check_options[i].widget != NULL)
                *check_options[i].variable = check_options[i].widget->state & C_BOOL;
    }
    else
    {
        /* restore layout */
        panels_layout = old_layout;
        output_lines = old_output_lines;
        update_split (layout_dlg);
    }

    dlg_destroy (layout_dlg);
    layout_change ();
    do_refresh ();
}
开发者ID:m32,项目名称:mc,代码行数:29,代码来源:layout.c

示例5: configure_panel_listing

static void
configure_panel_listing (WPanel * p, int list_type, int brief_cols, int use_msformat, char **user,
                         char **status)
{
    p->user_mini_status = use_msformat;
    p->list_type = list_type;

    if (list_type == list_brief)
        p->brief_cols = brief_cols;
    else if (list_type == list_user || use_msformat)
    {
        g_free (p->user_format);
        p->user_format = *user;
        *user = NULL;

        g_free (p->user_status_format[list_type]);
        p->user_status_format[list_type] = *status;
        *status = NULL;

        set_panel_formats (p);
    }

    set_panel_formats (p);
    do_refresh ();
}
开发者ID:BpArCuCTeMbI,项目名称:mc,代码行数:25,代码来源:cmd.c

示例6: configure_panel_listing

static void
configure_panel_listing (WPanel * p, int list_type, int use_msformat, char *user, char *status)
{
    p->user_mini_status = use_msformat;
    p->list_type = list_type;

    if (list_type == list_user || use_msformat)
    {
        g_free (p->user_format);
        p->user_format = user;

        g_free (p->user_status_format[list_type]);
        p->user_status_format[list_type] = status;

        set_panel_formats (p);
    }
    else
    {
        g_free (user);
        g_free (status);
    }

    set_panel_formats (p);
    do_refresh ();
}
开发者ID:NoSeungHwan,项目名称:mc_kor_dev,代码行数:25,代码来源:cmd.c

示例7: render_set_prog_bar

VOID
render_set_prog_bar (BOOL on)
{
    m_prog_on = on;
    time(&m_time_start);
    do_refresh(NULL);
}
开发者ID:dre-hh,项目名称:streamripper,代码行数:7,代码来源:render.c

示例8: b_left_right_cback

static int
b_left_right_cback (WButton * button, int action)
{
    (void) action;

    if (button == bright_widget)
    {
        if (panels_layout.horizontal_split)
            panels_layout.top_panel_size++;
        else
            panels_layout.left_panel_size++;
    }
    else
    {
        if (panels_layout.horizontal_split)
            panels_layout.top_panel_size--;
        else
            panels_layout.left_panel_size--;
    }

    update_split (WIDGET (button)->owner);
    layout_change ();
    do_refresh ();
    return 0;
}
开发者ID:m32,项目名称:mc,代码行数:25,代码来源:layout.c

示例9: init_chown_advanced

static void
init_chown_advanced (void)
{
    int i;
    enum { dlg_h = 13, dlg_w = 74, n_elem = 4 };
#ifdef ENABLE_NLS
    static int i18n_len = 0;

    if (i18n_len == 0) {
	int dx, cx;
	for (i = 0 ; i < n_elem ; i++) {
	    chown_advanced_but[i].text = _(chown_advanced_but[i].text);
	    i18n_len += str_term_width1 (chown_advanced_but[i].text) + 3;
	    if (DEFPUSH_BUTTON == chown_advanced_but[i].flags)
		i18n_len += 2; /* "<>" */ 
	}
	cx = dx = (dlg_w - i18n_len - 2) / (n_elem + 1);

	/* Reversed order */
	for (i = n_elem - 1; i >= 0; i--) {
	    chown_advanced_but[i].x = cx;
	    cx += str_term_width1 (chown_advanced_but[i].text) + 3 + dx;
	}
    }
#endif /* ENABLE_NLS */

    sf_stat = g_new (struct stat, 1);
    do_refresh ();
    end_chown = need_update = current_file = 0;
    single_set = (current_panel->marked < 2) ? 2 : 0;
    memset (ch_flags, '=', 11);
    flag_pos = 0;
    x_toggle = 070;

    ch_dlg =
	create_dlg (0, 0, dlg_h, dlg_w, dialog_colors, advanced_chown_callback,
		    "[Advanced Chown]", _(" Chown advanced command "),
		    DLG_CENTER | DLG_REVERSE);

#define XTRACT(i) BY+chown_advanced_but[i].y, BX+chown_advanced_but[i].x, \
	chown_advanced_but[i].ret_cmd, chown_advanced_but[i].flags, \
	(chown_advanced_but[i].text), 0

    for (i = 0; i < BUTTONS - 5; i++)
	if (!single_set || i < 2)
	    add_widget (ch_dlg, button_new (XTRACT (i)));

    b_att[0] = button_new (XTRACT (8));
    b_att[1] = button_new (XTRACT (7));
    b_att[2] = button_new (XTRACT (6));
    b_user = button_new (XTRACT (5));
    b_group = button_new (XTRACT (4));

    add_widget (ch_dlg, b_group);
    add_widget (ch_dlg, b_user);
    add_widget (ch_dlg, b_att[2]);
    add_widget (ch_dlg, b_att[1]);
    add_widget (ch_dlg, b_att[0]);
}
开发者ID:sfionov,项目名称:mc-dev,代码行数:59,代码来源:achown.c

示例10: suspend_cmd

void
suspend_cmd (void)
{
    save_cwds_stat ();
    do_suspend_cmd ();
    update_panels (UP_OPTIMIZE, UP_KEEPSEL);
    do_refresh ();
}
开发者ID:GalaxyTab4,项目名称:workbench,代码行数:8,代码来源:execute.c

示例11: init_chown

static Dlg_head *
init_chown (void)
{
    int i;
    struct passwd *l_pass;
    struct group *l_grp;
    Dlg_head *ch_dlg;

    do_refresh ();
    end_chown = need_update = current_file = 0;
    single_set = (current_panel->marked < 2) ? 3 : 0;

    ch_dlg =
	create_dlg (0, 0, 18, 74, dialog_colors, chown_callback, "[Chown]",
		    _(" Chown command "), DLG_CENTER | DLG_REVERSE);

    for (i = 0; i < BUTTONS - single_set; i++)
	add_widget (ch_dlg,
		    button_new (BY + chown_but[i].y, BX + chown_but[i].x,
				chown_but[i].ret_cmd, chown_but[i].flags,
				_(chown_but[i].text), 0));

    /* Add the widgets for the file information */
    for (i = 0; i < LABELS; i++) {
	chown_label[i].l =
	    label_new (chown_label[i].y, chown_label[i].x, "");
	add_widget (ch_dlg, chown_label[i].l);
    }

    /* get new listboxes */
    l_user = listbox_new (UY + 1, UX + 1, 19, 10, NULL);
    l_group = listbox_new (GY + 1, GX + 1, 19, 10, NULL);

    /* add fields for unknown names (numbers) */
    listbox_add_item (l_user, 0, 0, _("<Unknown user>"), NULL);
    listbox_add_item (l_group, 0, 0, _("<Unknown group>"), NULL);

    /* get and put user names in the listbox */
    setpwent ();
    while ((l_pass = getpwent ())) {
	listbox_add_item (l_user, LISTBOX_APPEND_SORTED, 0, l_pass->pw_name, NULL);
    }
    endpwent ();

    /* get and put group names in the listbox */
    setgrent ();
    while ((l_grp = getgrent ())) {
	listbox_add_item (l_group, LISTBOX_APPEND_SORTED, 0, l_grp->gr_name, NULL);
    }
    endgrent ();

    /* add listboxes to the dialogs */
    add_widget (ch_dlg, l_group);
    add_widget (ch_dlg, l_user);

    return ch_dlg;
}
开发者ID:ebichu,项目名称:dd-wrt,代码行数:57,代码来源:chown.c

示例12: new_lines

void new_lines(char *line)
{
    int i;
    for (i = HISTORY-1; i > 0; i--) {
        strcpy(lines[i],lines[i-1]);
    }
    strcpy(lines[0],line);
    do_refresh();
}
开发者ID:SilentSand,项目名称:ProjectTox-Core,代码行数:9,代码来源:nTox.c

示例13: new_lines

void new_lines(char *line)
{
    int i = 0;
    for (i = HISTORY-1; i > 0; i--)
        strncpy(lines[i], lines[i-1], STRING_LENGTH - 1);

    strncpy(lines[0], line, STRING_LENGTH - 1);
    do_refresh();
}
开发者ID:1h6,项目名称:ProjectTox-Core,代码行数:9,代码来源:nTox.c

示例14: gnome_full_view_cmd

void
gnome_full_view_cmd (GtkWidget *widget, WPanel *panel)
{
	if (panel->list_type == list_full)
		return;
	panel->list_type = list_full;
	set_panel_formats (panel);
	paint_panel (panel);
	do_refresh ();
}
开发者ID:OS2World,项目名称:UTIL-SHELL-Midnight_Commander,代码行数:10,代码来源:gcmd.c

示例15: set_subscribe_inform_info

static int set_subscribe_inform_info(const char *val, struct kernel_param *kp)
{
	int ret;

	ret = param_set_bool(val, kp);
	if (ret)
		return ret;

	return do_refresh(val, kp);
}
开发者ID:edgar-pek,项目名称:PerspicuOS,代码行数:10,代码来源:local_sa.c


注:本文中的do_refresh函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。