예제 #1
0
void enkf_tui_analysis_menu(void * arg) {
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );
  menu_type       * menu = menu_alloc( "Analysis menu" , "Back" , "bB");

  arg_pack_type * arg_pack = arg_pack_alloc();
  arg_pack_append_ptr( arg_pack , enkf_main );
  arg_pack_append_ptr( arg_pack , menu );

  {
    enkf_tui_analysis_update_title(enkf_main, menu);

    if (enkf_main_have_obs(enkf_main)) {
      menu_add_item(menu, "Global scaling of uncertainty", "gG", enkf_tui_analysis_scale_observation_std__, enkf_main, NULL);
      menu_add_separator(menu);
    }

    menu_add_item(menu, "Select analysis module", "sS", enkf_tui_analysis_select_module__, arg_pack, NULL);
    menu_add_item(menu, "List available modules", "lL", enkf_tui_analysis_list_modules__, enkf_main, NULL);
    menu_add_item(menu, "Modify analysis module parameters", "mM", enkf_tui_analysis_update_module__, enkf_main, NULL);
    menu_add_item(menu, "Reload current module (external only)", "rR", enkf_tui_analysis_reload_module__, enkf_main, NULL);
  }
  menu_run(menu);
  menu_free(menu);
  arg_pack_free(arg_pack);
}
예제 #2
0
static void browser_action(unsigned short userChoice)
{
	current_file = browser_entries[userChoice].full_name;
	if(strncmp(current_file, ".", strlen(current_file)) == 0 ||
			strncmp(current_file, "..", strlen(current_file)) == 0)
		return;

	browser_menu = menu_init(browser_wid, browser_entries[userChoice].name,
			0, 0, screen_info.cols, screen_info.rows -
			(HEADER_TOPLINE + 1), browser_menu, NULL, ASCII);

	switch (browser_entries[userChoice].type) {
	case FILE_TYPE_DIRECTORY:
		break;
	case FILE_TYPE_PROGRAM:
		menu_add_item(browser_menu, _("Pipe output to textviewer"),
				browser_pipe_exec, 0, ACTION_MENU |
				SUB_MENU_PREV);
	case FILE_TYPE_OTHER:
		if(access("/bin/viP", X_OK) == 0)
			menu_add_item(browser_menu, _("Open with viP"),
					browser_vip_open_file, 0, ACTION_MENU |
					SUB_MENU_PREV);
			menu_add_item(browser_menu, _("Open with PodWrite"),
					browser_podwrite_open_file, 0, ACTION_MENU |
					SUB_MENU_PREV);
		break;
	}
	menu_add_item(browser_menu, _("Delete"),  browser_delete_confirm, 0,
			ACTION_MENU | ARROW_MENU);
	menu_add_item(browser_menu, _("Rename"),  browser_rename, 0,
			ACTION_MENU);
}
예제 #3
0
파일: Practice1_m10.cpp 프로젝트: CAHbl4/C
int main() {
	phonebook_item_t* phonebook = NULL;
	size_t count = 0;

	//Создаем меню
	menu_t* main_menu = menu_create(Rus("Главное меню"));

	if (!main_menu) {
		return 1;
	}

	//Добавляем пункты в меню
	menu_add_item(main_menu, Rus("Добавить запись"), &add_record, &phonebook, &count);
	menu_add_item(main_menu, Rus("Добавить тестовые записи"), &add_test_records, &phonebook, &count);
	menu_add_item(main_menu, Rus("Вывести записи"), &print_records, &phonebook, &count);
	menu_add_item(main_menu, Rus("Выполнить задание"), &do_work, &phonebook, &count);
	menu_add_item(main_menu, "Exit", &exit_program, NULL, NULL);

	//Выполняем меню
	menu_execute(main_menu, NULL);

	menu_free(main_menu);

	return 0;
}
예제 #4
0
파일: recovery.c 프로젝트: iamgrim/gronda
int crash_file_check (char *fname)
{
	struct stat st_buf;
	FILE        *f;
	menu_t      *m;

	if (crash_file_name[0] != '\0')
		return 0;

	sprintf (crash_file_name, "%s.CRA", fname);

	stat (crash_file_name, &st_buf);
	if (S_ISDIR (st_buf.st_mode))
		return 0;

	f = fopen (crash_file_name, "r");
	if (!f)
		return 0;

	fclose (f);

	m = menu_alloc ("A crash file exists for file:\n%s", fname);
	menu_add_item (m, "Use crash file",    'u', crash_file_handler);
	menu_add_item (m, "Ignore crash file", 'i', crash_file_handler);

	display_do_menu (m);

	menu_free (m);

	return 1;
}
예제 #5
0
/* creates plugin's tool's menu */
static GtkWidget *
create_tools_menu_item (void)
{
  GtkWidget  *menu;
  GtkWidget  *item;
  
  /* build submenu */
  menu = gtk_menu_new ();
  /* build "document current symbol" item */
  item = menu_add_item (GTK_MENU_SHELL (menu),
                        _("_Document Current Symbol"),
                        _("Generate documentation for the current symbol"),
                        NULL,
                        G_CALLBACK (document_current_symbol_handler), NULL);
  ui_add_document_sensitive (item);
  /* build "document all" item */
  item = menu_add_item (GTK_MENU_SHELL (menu),
                        _("Document _All Symbols"),
                        _("Generate documentation for all symbols in the "
                          "current document"),
                        NULL,
                        G_CALLBACK (document_all_symbols_handler), NULL);
  ui_add_document_sensitive (item);
  /* separator */
  item = gtk_separator_menu_item_new ();
  gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
  /* build "reload" item */
  item = menu_add_item (GTK_MENU_SHELL (menu),
                        _("_Reload Configuration Files"),
                        _("Force reloading of the configuration files"),
                        GTK_STOCK_REFRESH,
                        G_CALLBACK (reload_configuration_hanlder), NULL);
  /* language filetypes opener */
  item = menu_add_item (GTK_MENU_SHELL (menu),
                        _("_Edit Current Language Configuration"),
                        _("Open the current language configuration file for "
                          "editing"),
                        GTK_STOCK_EDIT,
                        G_CALLBACK (open_current_filetype_conf_handler), NULL);
  ui_add_document_sensitive (item);
  /* separator */
  item = gtk_separator_menu_item_new ();
  gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
  /* help/manual opening */
  item = menu_add_item (GTK_MENU_SHELL (menu),
                        _("Open _Manual"),
                        _("Open the manual in a browser"),
                        GTK_STOCK_HELP,
                        G_CALLBACK (open_manual_handler), NULL);
  /* build tools menu item */
  item = gtk_menu_item_new_with_mnemonic (_("_Documentation Generator"));
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu);
  gtk_widget_show_all (item);
  
  return item;
}
예제 #6
0
void enkf_tui_workflow_menu(void * arg) {
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );
  menu_type       * menu  = menu_alloc("Workflows" , "Back" , "bB");
  
  menu_add_item(menu , "Run workflow"  , "rR" , enkf_tui_workflow_run , enkf_main , NULL );
  menu_add_item(menu , "Load workflow" , "lL" , enkf_tui_workflow_load , enkf_main , NULL );
  menu_add_item(menu , "List available workflows" , "iI" , enkf_tui_workflow_list , enkf_main , NULL );
  
  menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_run   , enkf_main , NULL); 
  menu_run(menu);
  menu_free(menu);

}
예제 #7
0
static void itunes_draw(struct menulist *ml)
{
	int counter=0;

	if (!currentml->user)
		return;
	
	if (!ml->init)
	{
		//add to courtc's menu from the original list.
		while (currentml->get_prev(currentml))counter--;
		do 
		{
			menu_add_item(currentml->itunes_menu, currentml->get_text(currentml), NULL, 0, 0);
			counter++;
		}while (currentml->get_next(currentml));
			while (counter != 0)
			{
				if (counter> 0) {
					counter--;
					currentml->get_prev(currentml);
				}
				if (counter < 0) {
					counter++;
					currentml->get_next(currentml);
				}
			}

		ml->init=1;

	}

	menu_draw(currentml->itunes_menu);
}
예제 #8
0
파일: menu.c 프로젝트: arinity/gchat2
static void
menu_add_cb (GtkWidget *menu, menu_entry *me, char *target)
{
	GtkWidget *item;
	GtkAccelGroup *accel_group;

	if (me->group)	/* have a group name? Must be a radio item */
		item = menu_add_radio (menu, me);
	else if (me->ucmd)	/* have unselect-cmd? Must be a toggle item */
		item = menu_add_toggle (menu, me);
	else if (me->cmd || !me->label)	/* label=NULL for separators */
		item = menu_add_item (menu, me, target);
	else
		item = menu_add_sub (menu, me);

	if (item)
	{
		gtk_widget_set_sensitive (item, me->enable);
		if (me->key)
		{
			accel_group = g_object_get_data (G_OBJECT (menu), "accel");
			if (accel_group)	/* popup menus don't have them */
				gtk_widget_add_accelerator (item, "activate", accel_group, me->key,
													 me->modifier, GTK_ACCEL_VISIBLE);
		}
	}
}
예제 #9
0
파일: menu.c 프로젝트: suzp1984/donkey
int main(int argc,  char* argv[])
{
	Menu* menu = menu_create(5);

	menu_add_title(menu, "Topwise company");
	menu_add_title(menu, "Hello");

	menu_add_item(menu, "hello", hello_print, (void*)HELLO_MSG, NULL);
	menu_add_item(menu, "weather", hello_print, (void*)WEATHER_MSG, NULL);
	
	menu_select(menu, 0);
	menu_select(menu, 1);

	menu_destroy(menu);

	return 0;
}
예제 #10
0
파일: enkf_tui_help.c 프로젝트: akva2/ert
void enkf_tui_help_menu_cases(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Manage cases" , "Back" , "bB");
  menu_add_helptext(menu , "Use this menu to navgate between cases and to initialize cases. A case has to be initialized before it can be used.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_cases , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
예제 #11
0
파일: enkf_tui_help.c 프로젝트: akva2/ert
void enkf_tui_help_menu_simple(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Simple menu" , "Back" , "bB");
  menu_add_helptext(menu , "The top four options in the simple menu will run eclipse simulations. Option s: Sensitivity run: No data conditioning, will initialize all parameters and run one eclipse simulation for each set of different parameters. e: Assimilation run: EnKF updates, will initialize all parameters and run one eclipse simulation for each set of different parameters. The eclipse simulations will run until the first data time step is encountered and condition on data before continuing. a: Assimilation run: Smoother update, will do one pass of the sensitivity run, then condition the parameters to all the data and rerun all experiments. i: Assimilation run: Iterated smoother [RML-EnKF] will iterate the smoother run several times.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_main , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
}
예제 #12
0
파일: enkf_tui_help.c 프로젝트: akva2/ert
void enkf_tui_help_menu_misc(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Miscellanous" , "Back" , "bB");
  menu_add_helptext(menu , "This option contains miscellaneous options.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_misc , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
예제 #13
0
파일: enkf_tui_help.c 프로젝트: akva2/ert
void enkf_tui_help_menu_table(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Table of results" , "Back" , "bB");
  menu_add_helptext(menu , "This option can generate a table of results after the case has been run.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_table , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
예제 #14
0
파일: enkf_tui_help.c 프로젝트: akva2/ert
void enkf_tui_help_menu_export(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Export results" , "Back" , "bB");
  menu_add_helptext(menu , "Use this option to export results after the case has been run.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_export , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
예제 #15
0
파일: enkf_tui_help.c 프로젝트: akva2/ert
void enkf_tui_help_menu_run(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Run menu" , "Back" , "bB");
  menu_add_helptext(menu , "This menu is used to do the main work in ERT. The first option, x: Ensemble run: history, will just run the case without any data conditioning. Options r and s will initiate classical enkf runs. The two options i and t invokes the ensemble kalman smoother.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_run , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
예제 #16
0
파일: enkf_tui_simple.c 프로젝트: akva2/ert
void enkf_tui_simple_menu(void * arg) {
  enkf_main_type * enkf_main = enkf_main_safe_cast(arg);
  menu_type * menu = menu_alloc("Simple menu" , "Quit" , "qQ");
  menu_add_item(menu , "Sensitivity run: No data conditioning"                , "sS" , enkf_tui_run_exp         , enkf_main , NULL);
  const model_config_type * model_config = enkf_main_get_model_config( enkf_main );
  menu_item_type * ES_item           = menu_add_item(menu , "Assimilation run: Smoother update"               , "aA" , enkf_tui_run_smoother      , enkf_main , NULL);
  menu_item_type * it_ES_item        = menu_add_item(menu , "Assimilation run: Iterated smoother [RML-EnKF]"  , "iI" , enkf_tui_run_iterated_ES   , enkf_main , NULL);

  if (!model_config_has_history( model_config )) {
    menu_item_disable( it_ES_item );
    menu_item_disable( ES_item );
  }
  menu_add_separator( menu );
  menu_add_item(menu , "Help"                                  , "hH" , enkf_tui_help_menu_simple   , enkf_main , NULL);
  menu_add_item(menu , "Advanced menu"                         , "dD" , enkf_tui_main_menu        , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);

}
예제 #17
0
파일: enkf_tui_help.c 프로젝트: akva2/ert
void enkf_tui_help_menu_main(void * arg) {
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );
  {
    menu_type * menu = menu_alloc("Help: Main menu" , "Back" , "bB");
    menu_add_helptext(menu , "Choose the different options from the main menu to read more about the different options.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_main , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}
예제 #18
0
파일: recovery.c 프로젝트: iamgrim/gronda
void handle_interrupt (int dummy)
{
	menu_t  *m;

	if (*executing_action)
	{
		m = menu_alloc ("Software Interrupt received\nin command \'%s\'",
						executing_action);

		menu_add_item (m, "(A)bort execution of command", 'a',
					   handle_interrupt_action);
		menu_add_item (m, "(Q)uit", 'q', handle_interrupt_action);

		display_do_menu (m);

		menu_free (m);
	}
	else
		sig_cleanexit ("ctrl-c - %s (v%s)\n", EDITOR_NAME, EDITOR_VERSION);
}
예제 #19
0
파일: cmd_window.c 프로젝트: iamgrim/gronda
void cmd_wc (int argc, char *argv[])
{
	menu_t *m;

	if (e->cpad->flags & MODIFIED)
	{
		/* TODO: use a pre-allocated menu */
		m = menu_alloc ("File modified; okay to quit?");

		menu_add_item (m, "Save and quit",        's', wc_menu_handler);
		menu_add_item (m, "Quit without saving",  'q', wc_menu_handler);
		menu_add_item (m, "Return to the editor", 'r', wc_menu_handler);

		display_do_menu (m);

		menu_free (m);
	}
	else
		sig_cleanexit ("%s %s\n", EDITOR_NAME, EDITOR_VERSION);
}
예제 #20
0
파일: s_misc.c 프로젝트: dafyddcrosby/meka
void    Sound_Rate_Menu_Init (int menu_id)
{
    int		i;
	char	buffer[256];

	for (i = 0; Sound_Rate_Default_Table[i] != -1; i++)
    {
        sprintf(buffer, Msg_Get(MSG_Menu_Sound_Rate_Hz), Sound_Rate_Default_Table [i]);
        menu_add_item(menus_ID.rate, buffer, AM_Active, Sound_Rate_Menu_Handler, (void *)Sound_Rate_Default_Table[i]);
    }
    Sound_Rate_Set(Sound.SampleRate, FALSE);
}
예제 #21
0
파일: blitintf.c 프로젝트: mnstrmnch/meka
void    Blitters_Menu_Init (int menu_id)
{
    for (t_list* blitters = Blitters.list; blitters != NULL; blitters = blitters->next)
    {
        t_blitter* blitter = (t_blitter*)blitters->elem;
        menu_add_item(menu_id,
            blitter->name,
			NULL,
            MENU_ITEM_FLAG_ACTIVE | ((blitter == Blitters.current) ? MENU_ITEM_FLAG_CHECKED : 0),
            (t_menu_callback)Blitters_Switch_Handler, blitter);
    }
}
예제 #22
0
void enkf_tui_ranking_menu(void * arg) {
    
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  {
    menu_type * menu = menu_alloc("Ranking of results" , "Back" , "bB");
    menu_item_type * obs_item;
    {
      arg_pack_type * arg_pack = arg_pack_alloc();
      arg_pack_append_ptr( arg_pack , enkf_main );
      menu_add_item(menu , "Create/update misfit table" , "cC"  , enkf_tui_ranking_make_misfit_ensemble   , arg_pack , arg_pack_free__);
      menu_add_separator( menu );
      obs_item = menu_add_item(menu , "New observation based ranking" , "nN" , enkf_tui_ranking_create_obs  , enkf_main , NULL);
      arg_pack_append_ptr( arg_pack , obs_item );
    }
    menu_add_item(menu , "New data based ranking (Sort: increasing)" , "iI" , enkf_tui_ranking_create_data_increasing , enkf_main , NULL);
    menu_add_item(menu , "New data based ranking (Sort: decreasing)" , "dD" , enkf_tui_ranking_create_data_decreasing , enkf_main , NULL);
    menu_add_item(menu , "Show ranking" , "sS" , enkf_tui_ranking_display , enkf_main , NULL);
    {
      enkf_fs_type * fs = enkf_main_get_fs( enkf_main );
      misfit_ensemble_type * misfit_ensemble = enkf_fs_get_misfit_ensemble( fs );
      if (!misfit_ensemble_initialized( misfit_ensemble ))
        menu_item_disable( obs_item );
    }
    menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_rank , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
  
}
예제 #23
0
파일: Exam.cpp 프로젝트: CAHbl4/C
int main() {
	//Сохраняем текущие параметры консоли
	hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
	SetConsoleTextAttribute(hConsole, DEFAULT_COLOR);

	//Создаем меню
	menu_t* main_menu = menu_create("Главное меню");

	//Добавляем пункты в меню
	menu_add_item(main_menu, Rus("Задание 1"), &task1, NULL, NULL);
	menu_add_item(main_menu, Rus("Задание 2"), &task2, NULL, NULL);


	menu_add_item(main_menu, "Exit", &exit_program, NULL, NULL);

	//Выполняем меню
	menu_execute(main_menu, NULL);

	menu_free(main_menu);

	return 0;
}
예제 #24
0
파일: message.c 프로젝트: mnstrmnch/meka
void            Langs_Menu_Add (int menu_id)
{
    const int s = list_size(Messages.Langs);
    if (s > 1)
    {
        menus_ID.languages = menu_add_menu (menu_id, Msg_Get(MSG_Menu_Main_Language), MENU_ITEM_FLAG_ACTIVE);
        for (t_list* langs = Messages.Langs; langs; langs = langs->next)
        {
            t_lang* lang = (t_lang*)langs->elem;
            menu_add_item(menus_ID.languages, lang->Name, NULL, MENU_ITEM_FLAG_ACTIVE | Is_Checked (lang == Messages.Lang_Cur), (t_menu_callback)Lang_Set, lang);
        }
    }
}
예제 #25
0
파일: menu.c 프로젝트: luaman/qforge-1
static void
bi_Menu_Begin (progs_t *pr)
{
	int         x = P_INT (pr, 0);
	int         y = P_INT (pr, 1);
	const char *text = P_GSTRING (pr, 2);
	menu_item_t *m = calloc (sizeof (menu_item_t), 1);

	m->x = x;
	m->y = y;
	m->text = text && text[0] ? strdup (text) : 0;
	if (menu)
		menu_add_item (menu, m);
	menu = m;
	if (m->text)
		Hash_Add (menu_hash, m);
}
예제 #26
0
void enkf_tui_help_menu_cases(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
  {
    const char * plot_path  =  plot_config_get_path( plot_config );
    util_make_path( plot_path );
  }
  
  {
    menu_type * menu = menu_alloc("Help: Manage cases" , "Back" , "bB");
    menu_add_helptext(menu , "Use this menu to navgate between cases and to initialize cases. A case has to be initialized before it can be used.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_cases , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}
예제 #27
0
void enkf_tui_help_menu_main(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
  {
    const char * plot_path  =  plot_config_get_path( plot_config );
    util_make_path( plot_path );
  }
  
  {
    menu_type * menu = menu_alloc("Help: Main menu" , "Back" , "bB");
    menu_add_helptext(menu , "Choose the different options from the main menu to read more about the different options.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_main , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}
예제 #28
0
void enkf_tui_help_menu_misc(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
  {
    const char * plot_path  =  plot_config_get_path( plot_config );
    util_make_path( plot_path );
  }
  
  {
    menu_type * menu = menu_alloc("Help: Miscellanous" , "Back" , "bB");
    menu_add_helptext(menu , "This option contains miscellaneous options.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_misc , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}
예제 #29
0
void enkf_tui_help_menu_table(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
  {
    const char * plot_path  =  plot_config_get_path( plot_config );
    util_make_path( plot_path );
  }
  
  {
    menu_type * menu = menu_alloc("Help: Table of results" , "Back" , "bB");
    menu_add_helptext(menu , "This option can generate a table of results after the case has been run.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_table , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}
예제 #30
0
파일: s_misc.c 프로젝트: dafyddcrosby/meka
void    Sound_Volume_Menu_Init (int menu_id)
{
    int    i;
    int    master_volume_100;
	char   buffer[256];

    master_volume_100 = (float)Sound.MasterVolume * ((float)100 / 128);
    for (i = 0; i <= 100; i += 20)
    {
        if (i == 0)
            snprintf(buffer, countof(buffer), Msg_Get(MSG_Menu_Sound_Volume_Mute));
        else
            snprintf(buffer, countof(buffer), Msg_Get(MSG_Menu_Sound_Volume_Value), i);
        menu_add_item(menu_id, buffer, AM_Nothing | Is_Checked (i - 9 < master_volume_100 && i + 9 > master_volume_100), 
			Sound_Volume_Menu_Handler, (void *)(int)((float)i * ((float)128 / 100)));
    }
}