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>
|
||||
@@ -7,7 +24,6 @@
|
||||
|
||||
static gchar* DEFAULT_BINDING_KEYS[] =
|
||||
{
|
||||
"Control-m",
|
||||
"Control-g",
|
||||
"Control-d",
|
||||
"Control-Shift-d",
|
||||
@@ -16,29 +32,29 @@ static gchar* DEFAULT_BINDING_KEYS[] =
|
||||
|
||||
static LkBindingType DEFAULT_BINDING_TYPES[] =
|
||||
{
|
||||
URL,
|
||||
URL,
|
||||
EXEC,
|
||||
URL,
|
||||
URL,
|
||||
URL,
|
||||
};
|
||||
|
||||
static gchar* DEFAULT_BINDING_NAMES[] =
|
||||
{
|
||||
"MetaCrawler search",
|
||||
"Google search",
|
||||
"Dictionary lookup",
|
||||
"Debian package search",
|
||||
"Freshmeat search",
|
||||
"IMDB Title search",
|
||||
};
|
||||
|
||||
static gchar* DEFAULT_BINDING_ARGUMENTS[] =
|
||||
{
|
||||
"http://search.metacrawler.com/crawler?general=%U",
|
||||
"http://www.google.com/search?client=googlet&q=%U",
|
||||
"gdict -a %T",
|
||||
"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://www.imdb.com/Tsearch?title=%U&restrict=Movies+only"
|
||||
};
|
||||
|
||||
#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_
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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_
|
||||
|
||||
@@ -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>
|
||||
@@ -95,14 +112,10 @@ guint g_string_replace (GString* source, const gchar* before,
|
||||
#define ENCODED_TERM_TOKEN "U"
|
||||
|
||||
/**
|
||||
* Displays a URL with the supplied terms appropriately embedded. The URL
|
||||
* shown depends on the supplied qualifier. Each qualifier is mapped to a
|
||||
* particular URL into which the terms are substituted before loading.
|
||||
*
|
||||
* @return false if no qualifier mapping could be found for the supplied
|
||||
* qualifier.
|
||||
* Either displays a URL or invokes an command line with the supplied
|
||||
* terms appropriately embedded.
|
||||
*/
|
||||
gboolean
|
||||
void
|
||||
lk_launcher_launch (const LkBinding* binding, const gchar* terms)
|
||||
{
|
||||
char cwdbuf[1024];
|
||||
@@ -144,6 +157,4 @@ lk_launcher_launch (const LkBinding* binding, const gchar* terms)
|
||||
}
|
||||
|
||||
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_
|
||||
|
||||
@@ -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>
|
||||
@@ -26,8 +43,13 @@ main (int argc, char** argv)
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
|
||||
#ifdef APPLET_MODE
|
||||
/* initialize gtk */
|
||||
gtk_init(&argc, &argv);
|
||||
#else
|
||||
/* initialize gnome */
|
||||
gnome_init(PACKAGE, VERSION, argc, argv);
|
||||
#endif
|
||||
|
||||
/* initialize our preferences */
|
||||
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>
|
||||
|
||||
@@ -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_
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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_
|
||||
|
||||
Reference in New Issue
Block a user