diff --git a/projects/lookuplet/src/c/binding.c b/projects/lookuplet/src/c/binding.c index 0f112511..840d26fd 100644 --- a/projects/lookuplet/src/c/binding.c +++ b/projects/lookuplet/src/c/binding.c @@ -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 @@ -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 \ diff --git a/projects/lookuplet/src/c/binding.h b/projects/lookuplet/src/c/binding.h index a4447200..8d7965d4 100644 --- a/projects/lookuplet/src/c/binding.h +++ b/projects/lookuplet/src/c/binding.h @@ -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_ diff --git a/projects/lookuplet/src/c/keysym-util.c b/projects/lookuplet/src/c/keysym-util.c index 99f7ed57..40b34e1f 100644 --- a/projects/lookuplet/src/c/keysym-util.c +++ b/projects/lookuplet/src/c/keysym-util.c @@ -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 diff --git a/projects/lookuplet/src/c/keysym-util.h b/projects/lookuplet/src/c/keysym-util.h index 183031c7..aaf96a5d 100644 --- a/projects/lookuplet/src/c/keysym-util.h +++ b/projects/lookuplet/src/c/keysym-util.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_ diff --git a/projects/lookuplet/src/c/launcher.c b/projects/lookuplet/src/c/launcher.c index ef46e78a..808f9bdc 100644 --- a/projects/lookuplet/src/c/launcher.c +++ b/projects/lookuplet/src/c/launcher.c @@ -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 @@ -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; } diff --git a/projects/lookuplet/src/c/launcher.h b/projects/lookuplet/src/c/launcher.h index 1b9a8a43..c451bf55 100644 --- a/projects/lookuplet/src/c/launcher.h +++ b/projects/lookuplet/src/c/launcher.h @@ -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_ diff --git a/projects/lookuplet/src/c/lookuplet.c b/projects/lookuplet/src/c/lookuplet.c index e01866cc..ae31d801 100644 --- a/projects/lookuplet/src/c/lookuplet.c +++ b/projects/lookuplet/src/c/lookuplet.c @@ -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 @@ -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(); diff --git a/projects/lookuplet/src/c/preferences.c b/projects/lookuplet/src/c/preferences.c index 6f2d4e75..68c35d86 100644 --- a/projects/lookuplet/src/c/preferences.c +++ b/projects/lookuplet/src/c/preferences.c @@ -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 diff --git a/projects/lookuplet/src/c/preferences.h b/projects/lookuplet/src/c/preferences.h index 73308baa..7cf7fa0c 100644 --- a/projects/lookuplet/src/c/preferences.h +++ b/projects/lookuplet/src/c/preferences.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_ diff --git a/projects/lookuplet/src/c/querybox.c b/projects/lookuplet/src/c/querybox.c index a1d6c7aa..0dc11c3e 100644 --- a/projects/lookuplet/src/c/querybox.c +++ b/projects/lookuplet/src/c/querybox.c @@ -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 diff --git a/projects/lookuplet/src/c/querybox.h b/projects/lookuplet/src/c/querybox.h index f715fd2f..7a1cbb2a 100644 --- a/projects/lookuplet/src/c/querybox.h +++ b/projects/lookuplet/src/c/querybox.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_