included some patches from Michal Politowski (thanks!);
- pressing "!" now jumps to search mode even if the entire line is selected (e.g. when gmrun starts and displays the last history item selected) - .gmrunrc configuration is now merged with /etc/gmrunrc, instead of overidding it completely. So you can have defaults in /etc/gmrunrc and overide them from ~/.gmrunrc
This commit is contained in:
parent
c88bdc7686
commit
64ffabcd7e
|
@ -11,7 +11,7 @@ dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
#
|
||||
# $Id: aclocal.m4,v 1.2 2002/06/05 19:39:18 sonofkojak Exp $
|
||||
# $Id: aclocal.m4,v 1.3 2002/08/15 10:00:24 mishoo Exp $
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -263,14 +263,7 @@ for am_file in <<$1>>; do
|
|||
done<<>>dnl>>)
|
||||
changequote([,]))])
|
||||
|
||||
# isc-posix.m4 serial 1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
#serial 1
|
||||
# This test replaces the one in autoconf.
|
||||
# Currently this macro should have the same name as the autoconf macro
|
||||
# because gettext's gettext.m4 (distributed in the automake package)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*****************************************************************************
|
||||
* $Id: gtkcompletionline.cc,v 1.27 2002/06/05 19:39:18 sonofkojak Exp $
|
||||
* $Id: gtkcompletionline.cc,v 1.28 2002/08/15 10:00:25 mishoo Exp $
|
||||
* Copyright (C) 2000, Mishoo
|
||||
* Author: Mihai Bazon Email: mishoo@fenrir.infoiasi.ro
|
||||
*
|
||||
|
@ -943,6 +943,9 @@ on_key_press(GtkCompletionLine *cl, GdkEventKey *event, gpointer data)
|
|||
|
||||
case GDK_exclam:
|
||||
if (!MODE_BEG) {
|
||||
if (!MODE_SRC) {
|
||||
gtk_editable_delete_selection(GTK_EDITABLE(cl));
|
||||
}
|
||||
const char *tmp = gtk_entry_get_text(GTK_ENTRY(cl));
|
||||
if (!(*tmp == '\0' || cl->first_key)) {
|
||||
goto ordinary;
|
||||
|
|
23
src/prefs.cc
23
src/prefs.cc
|
@ -1,5 +1,5 @@
|
|||
/*****************************************************************************
|
||||
* $Id: prefs.cc,v 1.6 2001/10/19 08:59:40 mishoo Exp $
|
||||
* $Id: prefs.cc,v 1.7 2002/08/15 10:00:25 mishoo Exp $
|
||||
* Copyright (C) 2000, Mishoo
|
||||
* Author: Mihai Bazon Email: mishoo@fenrir.infoiasi.ro
|
||||
*
|
||||
|
@ -30,20 +30,17 @@ Prefs configuration;
|
|||
|
||||
Prefs::Prefs()
|
||||
{
|
||||
string file_name = getenv("HOME");
|
||||
string file_name = "/etc/";
|
||||
file_name += GMRUNRC;
|
||||
init(file_name);
|
||||
|
||||
file_name = getenv("HOME");
|
||||
if (!file_name.empty()) {
|
||||
string::iterator i = file_name.end() - 1;
|
||||
if (*i == '/') file_name.erase(i);
|
||||
file_name += "/.";
|
||||
file_name += GMRUNRC;
|
||||
if (!init(file_name)) {
|
||||
file_name = PACKAGE_DATA_DIR;
|
||||
i = file_name.end() - 1;
|
||||
if (*i == '/') file_name.erase(i);
|
||||
file_name += '/';
|
||||
file_name += GMRUNRC;
|
||||
init(file_name);
|
||||
}
|
||||
init(file_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +52,7 @@ bool Prefs::get_string(const string& key, string& val) const
|
|||
CONFIG::const_iterator i;
|
||||
i = vals_.find(ci_string(key.c_str()));
|
||||
if (i != vals_.end()) {
|
||||
val = i->second;
|
||||
val = process(i->second);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -97,7 +94,7 @@ bool Prefs::init(const string& file_name)
|
|||
|
||||
sscanf(line.c_str(), "%255[a-zA-Z_0-9] = %255[^\n]",
|
||||
key, val);
|
||||
vals_[key] = process(val);
|
||||
vals_[key] = val;
|
||||
|
||||
#ifdef DEBUG
|
||||
std::cerr << "Key: " << key << ", val: " << vals_[key] << std::endl;
|
||||
|
@ -107,7 +104,7 @@ bool Prefs::init(const string& file_name)
|
|||
return true;
|
||||
}
|
||||
|
||||
string Prefs::process(const std::string& cmd)
|
||||
string Prefs::process(const std::string& cmd) const
|
||||
{
|
||||
string::size_type i = cmd.find("${");
|
||||
string::size_type j = cmd.find("}", i);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*****************************************************************************
|
||||
* $Id: prefs.h,v 1.4 2001/10/19 08:59:40 mishoo Exp $
|
||||
* $Id: prefs.h,v 1.5 2002/08/15 10:00:25 mishoo Exp $
|
||||
* Copyright (C) 2000, Mishoo
|
||||
* Author: Mihai Bazon Email: mishoo@fenrir.infoiasi.ro
|
||||
*
|
||||
|
@ -27,7 +27,7 @@ class Prefs
|
|||
CONFIG vals_;
|
||||
|
||||
bool init(const std::string& file_name);
|
||||
string process(const std::string& cmd);
|
||||
string process(const std::string& cmd) const;
|
||||
|
||||
public:
|
||||
Prefs();
|
||||
|
|
Loading…
Reference in New Issue