/* * Copyright (C) 2007 Gauvain Pocentek * * Mostly taken from the gsynaptics mcs plugin * Copyright (c) 2004 Danny Milosavljevic * * 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; You may only use version 2 of the License, * you have no option to use any other 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #include #include #define EXE "xfce4-autostart-editor" #define ICON "xfce4-autostart-editor" /* static prototypes */ static void run_dialog (McsPlugin *); /* */ McsPluginInitResult mcs_plugin_init (McsPlugin * plugin) { gchar *where = NULL; xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8"); plugin->plugin_name = g_strdup ("autostarted"); plugin->caption = g_strdup (Q_("Button Label|Autostarted apps")); plugin->run_dialog = run_dialog; plugin->icon = xfce_themed_icon_load (ICON, 24); if (plugin->icon) g_object_set_data_full (G_OBJECT (plugin->icon), "mcs-plugin-icon-name", g_strdup (ICON), g_free); where = g_find_program_in_path (EXE); if (where) { g_free (where); return (MCS_PLUGIN_INIT_OK); } g_free (where); return (MCS_PLUGIN_INIT_ERROR); } /* * */ static void run_dialog (McsPlugin * plugin) { xfce_exec(EXE, FALSE, FALSE, NULL); }