The plug-ins are now initialized automatically

This commit is contained in:
Pierre Pronchery 2014-08-28 03:51:44 +02:00
parent dc270dabeb
commit 23bbe5c4ee
2 changed files with 2 additions and 8 deletions

View File

@ -41,9 +41,7 @@ static int _engineering(void)
{
Phone phone;
config_load(phone.config, "/home/khorben/.phone"); /* FIXME hardcoded */
_phone_init(&phone, &plugin);
if((phone.plugin = plugin.init(&helper)) == NULL)
if(_phone_init(&phone, &plugin) != 0)
return -1;
gtk_main();
_engineering_destroy(phone.plugin);

View File

@ -43,11 +43,7 @@ static int _gprs(void)
{
Phone phone;
_phone_init(&phone, &plugin);
/* FIXME no longer hardcode the interface name */
config_set(phone.config, "gprs", "interface", "ppp0");
config_set(phone.config, "gprs", "systray", "1");
if((phone.plugin = plugin.init(&phone.helper)) == NULL)
if(_phone_init(&phone, &plugin) != 0)
return -1;
g_idle_add(_gprs_on_idle, &phone);
gtk_main();