Added copyright headers, modified binding defaults.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@285 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: binding.c,v 1.1 2001/02/24 02:35:20 mdb Exp $
|
* $Id: binding.c,v 1.2 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
@@ -7,7 +24,6 @@
|
|||||||
|
|
||||||
static gchar* DEFAULT_BINDING_KEYS[] =
|
static gchar* DEFAULT_BINDING_KEYS[] =
|
||||||
{
|
{
|
||||||
"Control-m",
|
|
||||||
"Control-g",
|
"Control-g",
|
||||||
"Control-d",
|
"Control-d",
|
||||||
"Control-Shift-d",
|
"Control-Shift-d",
|
||||||
@@ -16,29 +32,29 @@ static gchar* DEFAULT_BINDING_KEYS[] =
|
|||||||
|
|
||||||
static LkBindingType DEFAULT_BINDING_TYPES[] =
|
static LkBindingType DEFAULT_BINDING_TYPES[] =
|
||||||
{
|
{
|
||||||
URL,
|
|
||||||
URL,
|
URL,
|
||||||
EXEC,
|
EXEC,
|
||||||
URL,
|
URL,
|
||||||
URL,
|
URL,
|
||||||
|
URL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static gchar* DEFAULT_BINDING_NAMES[] =
|
static gchar* DEFAULT_BINDING_NAMES[] =
|
||||||
{
|
{
|
||||||
"MetaCrawler search",
|
|
||||||
"Google search",
|
"Google search",
|
||||||
"Dictionary lookup",
|
"Dictionary lookup",
|
||||||
"Debian package search",
|
"Debian package search",
|
||||||
"Freshmeat search",
|
"Freshmeat search",
|
||||||
|
"IMDB Title search",
|
||||||
};
|
};
|
||||||
|
|
||||||
static gchar* DEFAULT_BINDING_ARGUMENTS[] =
|
static gchar* DEFAULT_BINDING_ARGUMENTS[] =
|
||||||
{
|
{
|
||||||
"http://search.metacrawler.com/crawler?general=%U",
|
|
||||||
"http://www.google.com/search?client=googlet&q=%U",
|
"http://www.google.com/search?client=googlet&q=%U",
|
||||||
"gdict -a %T",
|
"gdict -a %T",
|
||||||
"http://cgi.debian.org/cgi-bin/search_contents.pl?word=%U&case=insensitive&version=unstable&arch=i386&directories=yes",
|
"http://cgi.debian.org/cgi-bin/search_contents.pl?word=%U&case=insensitive&version=unstable&arch=i386&directories=yes",
|
||||||
"http://freshmeat.net/search/?q=%U",
|
"http://freshmeat.net/search/?q=%U",
|
||||||
|
"http://www.imdb.com/Tsearch?title=%U&restrict=Movies+only"
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEFAULT_BINDING_COUNT \
|
#define DEFAULT_BINDING_COUNT \
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: binding.h,v 1.1 2001/02/24 02:35:20 mdb Exp $
|
* $Id: binding.h,v 1.2 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _BINDING_H_
|
#ifndef _BINDING_H_
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: keysym-util.c,v 1.1 2001/02/24 02:35:20 mdb Exp $
|
* $Id: keysym-util.c,v 1.2 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: keysym-util.h,v 1.1 2001/02/24 02:35:20 mdb Exp $
|
* $Id: keysym-util.h,v 1.2 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _KEYSYM_UTIL_H_
|
#ifndef _KEYSYM_UTIL_H_
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: launcher.c,v 1.2 2001/02/24 02:35:20 mdb Exp $
|
* $Id: launcher.c,v 1.3 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -95,14 +112,10 @@ guint g_string_replace (GString* source, const gchar* before,
|
|||||||
#define ENCODED_TERM_TOKEN "U"
|
#define ENCODED_TERM_TOKEN "U"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a URL with the supplied terms appropriately embedded. The URL
|
* Either displays a URL or invokes an command line with the supplied
|
||||||
* shown depends on the supplied qualifier. Each qualifier is mapped to a
|
* terms appropriately embedded.
|
||||||
* particular URL into which the terms are substituted before loading.
|
|
||||||
*
|
|
||||||
* @return false if no qualifier mapping could be found for the supplied
|
|
||||||
* qualifier.
|
|
||||||
*/
|
*/
|
||||||
gboolean
|
void
|
||||||
lk_launcher_launch (const LkBinding* binding, const gchar* terms)
|
lk_launcher_launch (const LkBinding* binding, const gchar* terms)
|
||||||
{
|
{
|
||||||
char cwdbuf[1024];
|
char cwdbuf[1024];
|
||||||
@@ -144,6 +157,4 @@ lk_launcher_launch (const LkBinding* binding, const gchar* terms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_string_free(cmd, TRUE);
|
g_string_free(cmd, TRUE);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: launcher.h,v 1.2 2001/02/24 02:35:20 mdb Exp $
|
* $Id: launcher.h,v 1.3 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _LAUNCHER_H_
|
#ifndef _LAUNCHER_H_
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: lookuplet.c,v 1.4 2001/08/16 19:26:31 mdb Exp $
|
* $Id: lookuplet.c,v 1.5 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@@ -26,8 +43,13 @@ main (int argc, char** argv)
|
|||||||
textdomain(PACKAGE);
|
textdomain(PACKAGE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef APPLET_MODE
|
||||||
|
/* initialize gtk */
|
||||||
|
gtk_init(&argc, &argv);
|
||||||
|
#else
|
||||||
/* initialize gnome */
|
/* initialize gnome */
|
||||||
gnome_init(PACKAGE, VERSION, argc, argv);
|
gnome_init(PACKAGE, VERSION, argc, argv);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* initialize our preferences */
|
/* initialize our preferences */
|
||||||
lk_prefs_init();
|
lk_prefs_init();
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: preferences.c,v 1.1 2001/02/24 02:35:20 mdb Exp $
|
* $Id: preferences.c,v 1.2 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: preferences.h,v 1.2 2001/02/24 02:45:36 mdb Exp $
|
* $Id: preferences.h,v 1.3 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PREFERENCES_H_
|
#ifndef _PREFERENCES_H_
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: querybox.c,v 1.5 2001/03/10 20:43:57 mdb Exp $
|
* $Id: querybox.c,v 1.6 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* $Id: querybox.h,v 1.2 2001/02/24 02:35:20 mdb Exp $
|
* $Id: querybox.h,v 1.3 2001/08/16 20:25:09 mdb Exp $
|
||||||
|
*
|
||||||
|
* lookuplet - a utility for quickly looking up information
|
||||||
|
* Copyright (C) 2001 Michael Bayne
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _QUERYBOX_H_
|
#ifndef _QUERYBOX_H_
|
||||||
|
|||||||
Reference in New Issue
Block a user