示例#1
0
/* save panels.ini */
static void
save_panel_types (void)
{
    panel_view_mode_t type;

    if (mc_run_mode != MC_RUN_FULL)
        return;

    type = get_display_type (0);
    panel_save_type ("New Left Panel", type);
    if (type == view_listing)
        panel_save_setup (left_panel, left_panel->panel_name);
    type = get_display_type (1);
    panel_save_type ("New Right Panel", type);
    if (type == view_listing)
        panel_save_setup (right_panel, right_panel->panel_name);

    mc_config_set_string (mc_panels_config, "Dirs", "other_dir", get_panel_dir_for (other_panel));

    if (current_panel != NULL)
        mc_config_set_string (mc_panels_config, "Dirs", "current_is_left",
                              get_current_index () == 0 ? "1" : "0");

    if (mc_panels_config->ini_path == NULL)
        mc_panels_config->ini_path = g_strdup (panels_profile_name);

    mc_config_del_group (mc_panels_config, "Temporal:New Left Panel");
    mc_config_del_group (mc_panels_config, "Temporal:New Right Panel");

    mc_config_save_file (mc_panels_config, NULL);
}
示例#2
0
/**
 * \brief Go forward in the animation.
 * \param t Go this dutation forward.
 * \pre t >= 0
 */
void bear::visual::animation::next( double t )
{
  CLAW_PRECOND( t >= 0 );

  if ( !is_finished() )
    {
      m_time += m_time_factor * t;

      while ( ( m_time >= get_scaled_duration(get_current_index()) )
              && !sprite_sequence::is_finished() )
        {
          m_time -= get_scaled_duration(get_current_index());
          sprite_sequence::next();
        }
    }
} // animation::next()
示例#3
0
void
toggle_listing_cmd (void)
{
    int current = get_current_index ();
    WPanel *p = (WPanel *) get_panel_widget (current);

    set_basic_panel_listing_to (current, (p->list_type + 1) % LIST_TYPES);
}
示例#4
0
/**
 * \brief Tell if we have reached the last frame and if it is completely played.
 */
bool bear::visual::animation::is_finished() const
{
  if ( m_duration.empty() )
    return true;
  else
    return sprite_sequence::is_finished()
      && ( m_time >= get_scaled_duration(get_current_index()) );
} // animation::is_finished()
void
gnome_listing_cmd (GtkWidget *widget, WPanel *panel)
{
	int   view_type, use_msformat;
	char  *user, *status;
	
	view_type = display_box (panel, &user, &status, &use_msformat, get_current_index ());
	
	if (view_type == -1)
		return;

	configure_panel_listing (panel, view_type, use_msformat, user, status);
}
示例#6
0
void
diff_view_cmd (void)
{
    /* both panels must be in the list mode */
    if (get_current_type () != view_listing || get_other_type () != view_listing)
        return;

    if (get_current_index () == 0)
        dview_diff_cmd (current_panel, other_panel);
    else
        dview_diff_cmd (other_panel, current_panel);

    if (mc_global.mc_run_mode == MC_RUN_FULL)
        update_panels (UP_OPTIMIZE, UP_KEEPSEL);

    dialog_switch_process_pending ();
}
示例#7
0
void
toggle_listing_cmd (void)
{
    int current = get_current_index ();
    WPanel *p = (WPanel *) get_panel_widget (current);
    int list_mode = p->list_type;
    int m;
    
    switch (list_mode){
    case list_full:
    case list_brief:
	m = list_long;
	break;
    case list_long:
	m = list_user;
	break;
    default:
	m = list_full;
    }
    if (set_basic_panel_listing_to (current, m))
	return;
    set_basic_panel_listing_to (current, list_full);
}
示例#8
0
文件: setup.c 项目: malikcjm/mc-nt
void save_setup (void)
{
    char *profile;
#ifdef USE_VFS
#ifdef USE_NETCODE
    extern char *ftpfs_anonymous_passwd;
    extern char *ftpfs_proxy_host;
#endif
#endif
    saving_setup = 1;
    profile = concat_dir_and_file (home_dir, PROFILE_NAME);

    save_layout ();
    save_configure ();
    save_string ("Dirs", "other_dir",
			       get_other_type () == view_listing
			       ? opanel->cwd : ".", profile);
    WritePrivateProfileString ("Dirs", "current_is_left",
			       get_current_index () == 0 ? "1" : "0", profile);
    save_hotlist ();
    save_panelize ();
    save_panel_types ();
/*     directory_history_save (); */
    
#ifdef USE_VFS
#ifdef USE_NETCODE
    WritePrivateProfileString ("Misc", "ftpfs_password",
			       ftpfs_anonymous_passwd, profile);
    if (ftpfs_proxy_host)
	WritePrivateProfileString ("Misc", "ftp_proxy_host",
				   ftpfs_proxy_host, profile);
#endif
#endif
    free (profile);
    saving_setup = 0;
}
示例#9
0
文件: layout.c 项目: malikcjm/mc-nt
int get_other_index (void)
{
    return !get_current_index ();
}