Exemple #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);
}
Exemple #2
0
void save_panel_types ()
{
    int type;

    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);
}