Exemple #1
0
int			init_readline(t_rl *info)
{
  static unsigned char	start = 0;
  char			*term;

  if (CHCK(info->flags, 0x04))
    {
      info->info.buffer = NULL;
      info->info.tmp = NULL;
      info->prompt = NULL;
      info->tmp.buffer = NULL;
      info->info.i = 0;
      info->info.nb = 0;
      info->info.insert_m = 1;
      if (!(info->bind))
	default_database(info);
      if ((info->flags |= raw_mode(&info->terminal)) && !start)
	{
	  if (!(term = getenv("TERM")))
	    get_termcap("dumb", info);
	  else if (!(get_termcap(term, info)))
	    get_termcap("dumb", info);
	  start++;
	}
    }
  return (MTRUE);
}
Exemple #2
0
		if (l.locale == XCA_application::language())
			a->setChecked(true);
	}
	file = menuBar()->addMenu(tr("&File"));
	file->addAction(tr("&New DataBase"), this, SLOT(new_database()),
			QKeySequence::New)
			->setEnabled(OpenDb::hasSqLite());
	file->addAction(tr("&Open DataBase"), this, SLOT(load_database()),
			QKeySequence::Open)
			->setEnabled(OpenDb::hasSqLite());
	file->addAction(tr("Open Remote DataBase"),
			this, SLOT(openRemoteSqlDB()))
			->setEnabled(OpenDb::hasRemoteDrivers());
	file->addMenu(historyMenu);
	file->addAction(tr("Set as default DataBase"), this,
				SLOT(default_database()));
	acList += file->addAction(tr("&Close DataBase"), this,
		SLOT(close_database()), QKeySequence(QKeySequence::Close));

	a = new QAction(tr("Options"), this);
	connect(a, SIGNAL(triggered()), this, SLOT(setOptions()));
	a->setMenuRole(QAction::PreferencesRole);
	file->addAction(a);
	acList += a;

	file->addMenu(languageMenu);
	file->addSeparator();
	a = new QAction(tr("Exit"), this);
	connect(a, SIGNAL(triggered()), qApp, SLOT(quit()));
	a->setMenuRole(QAction::QuitRole);
	file->addAction(a);