grim/guifications3

e62da38a5799
Parents 65091b5b15de
Children
removed gflib-query-plugins since we're using gplugin now...
--- a/gflib/gflib/CMakeLists.txt Mon Apr 30 00:09:32 2012 -0500
+++ b/gflib/gflib/CMakeLists.txt Mon Apr 30 00:10:59 2012 -0500
@@ -90,12 +90,6 @@
configure_file(gf_version.h.in gf_version.h @ONLY)
###############################################################################
-# gflib-query-plugins executable
-###############################################################################
-add_executable(gflib-query-plugins gf_query_plugins.c gf_lib.h)
-target_link_libraries(gflib-query-plugins ${GLIB_LIBRARIES} gflib)
-
-###############################################################################
# gf_enum.[ch] generation
###############################################################################
set(ENUM_HEADERS
@@ -162,9 +156,6 @@
# install the library
install(TARGETS gflib LIBRARY DESTINATION lib)
-# install gflib-query-plugins and gflib-genheader
-install(TARGETS gflib-query-plugins RUNTIME DESTINATION bin)
-
# install the single include into the main directory
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/gf_lib.h
--- a/gflib/gflib/gf_query_plugins.c Mon Apr 30 00:09:32 2012 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
- * Guifications - The end-all, be-all notification framework
- * Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
- *
- * 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 3 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, see <http://www.gnu.org/licenses/>.
- */
-
-#include <getopt.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <glib.h>
-
-#include <gf_lib.h>
-
-enum {
- OPT_VARIABLE
-};
-
-static gint verbosity = 0;
-
-static gboolean
-verbosity_cb(const gchar *n, const gchar *v, gpointer d, GError **e) {
- verbosity++;
-
- return TRUE;
-}
-
-static GOptionEntry entries[] = {
- {
- "verbose", 'v', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- verbosity_cb,
- "Increase verbosity.",
- NULL,
- }, {
- "version", 'V', 0, G_OPTION_ARG_NONE, NULL,
- "Disable the version and exit.",
- NULL,
- }, {
- NULL
- }
-};
-
-static void
-print_plugin(GfPlugin *plugin) {
- GfPluginInfo *info = gf_plugin_get_info(plugin);
-
- printf("%s\n", info->name);
- if(verbosity > 0) {
- printf(" version: %s\n", info->version);
- printf(" summary: %s\n", info->summary);
- printf(" description: %s\n", info->description);
- printf(" author: %s\n", info->author);
- printf(" website: %s\n", info->website);
-
- if(verbosity > 1) {
- printf(" filename: %s\n", gf_plugin_get_filename(plugin));
- printf(" ABI version: %d\n", info->abi_version);
- }
-
- printf("\n");
- }
-}
-
-static void
-list_cb(GfPlugin *plugin, gpointer data) {
- print_plugin(plugin);
-}
-
-gint
-main(gint argc, gchar **argv, gchar **envp) {
- GError *error = NULL;
- GOptionContext *ctx = NULL;
- gint i = 0;
-
- gf_lib_init(&argc, &argv);
-
- ctx = g_option_context_new("PLUGIN");
- g_option_context_add_main_entries(ctx, entries, GETTEXT_PACKAGE);
- g_option_context_add_group(ctx, gf_get_option_group());
- g_option_context_parse(ctx, &argc, &argv, &error);
-
- if(error) {
- gint ret = error->code;
- gf_log_critical("gflib-queryplugins", "%s\n", error->message);
-
- g_error_free(error);
-
- return ret;
- }
-
- /* check if the user gave us a plugin to look for */
- if(argc > 1) {
- gboolean found = FALSE;
-
- for(i = 1; i < argc; i++) {
- GfPlugin *plugin = NULL;
-
- if(!argv[i])
- continue;
-
- plugin = gf_plugin_manager_find_plugin_by_name(argv[i]);
- if(plugin) {
- found = TRUE;
-
- print_plugin(plugin);
- } else {
- printf("%s (not found)\n", argv[i]);
- }
- }
-
- if(!found)
- return EXIT_FAILURE;
- } else {
- /* if not, just output all of them */
- gf_plugin_manager_foreach(list_cb, NULL);
- }
-
- return EXIT_SUCCESS;
-}
-