2
* Copyright (C) 1997-2002 George Lebl
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
30
#include "genius-i18n.h"
33
gel_readplugin (const char *dir_name, const char *file_name)
46
p = g_strconcat (ve_sure_string (dir_name), "/", ve_sure_string (file_name), NULL);
47
cfg = ve_config_new (p);
50
name = ve_config_get_translated_string (cfg, "/Genius Plugin/Name");
51
file = ve_config_get_string (cfg, "/Genius Plugin/File");
52
copyright = ve_config_get_translated_string (cfg, "/Genius Plugin/Copyright");
53
author = ve_config_get_string (cfg, "/Genius Plugin/Author");
54
description = ve_config_get_translated_string (cfg, "/Genius Plugin/Description");
55
gui = ve_config_get_bool (cfg, "/Genius Plugin/GUI=false");
56
hide = ve_config_get_bool (cfg, "/Genius Plugin/Hide=false");
57
ve_config_destroy (cfg);
59
if (ve_string_empty (name) ||
60
ve_string_empty (file)) {
68
plg = g_new0 (GelPlugin, 1);
70
plg->base = g_strdup (file_name);
71
p = strstr (plg->base,".plugin");
72
if (p != NULL) *p='\0';
74
plg->copyright = copyright;
76
plg->description = description;