Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Librem5
pureos-store
Commits
e77e2d1b
Commit
e77e2d1b
authored
Sep 02, 2013
by
Richard Hughes
Browse files
Only show the plugin loader state after all the plugins have been enabled
parent
d8465b63
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/gs-application.c
View file @
e77e2d1b
...
...
@@ -164,6 +164,9 @@ gs_application_startup (GApplication *application)
gs_plugin_loader_set_enabled
(
app
->
plugin_loader
,
"datadir-apps"
,
TRUE
);
gs_plugin_loader_set_enabled
(
app
->
plugin_loader
,
"datadir-filename"
,
TRUE
);
/* show the priority of each plugin */
gs_plugin_loader_dump_state
(
app
->
plugin_loader
);
/* setup UI */
app
->
shell
=
gs_shell_new
();
...
...
src/gs-plugin-loader.c
View file @
e77e2d1b
...
...
@@ -1733,8 +1733,6 @@ gs_plugin_loader_setup (GsPluginLoader *plugin_loader, GError **error)
gboolean
ret
=
TRUE
;
gchar
*
filename_plugin
;
GDir
*
dir
;
GsPlugin
*
plugin
;
guint
i
;
g_return_val_if_fail
(
plugin_loader
->
priv
->
location
!=
NULL
,
FALSE
);
...
...
@@ -1764,15 +1762,6 @@ gs_plugin_loader_setup (GsPluginLoader *plugin_loader, GError **error)
g_ptr_array_sort
(
plugin_loader
->
priv
->
plugins
,
gs_plugin_loader_plugin_sort_fn
);
/* print what the priorities are */
for
(
i
=
0
;
i
<
plugin_loader
->
priv
->
plugins
->
len
;
i
++
)
{
plugin
=
g_ptr_array_index
(
plugin_loader
->
priv
->
plugins
,
i
);
g_debug
(
"%.1f
\t
->
\t
%s [%s]"
,
plugin
->
priority
,
plugin
->
name
,
plugin
->
enabled
?
"enabled"
:
"disabled"
);
}
/* run the plugins */
gs_plugin_loader_run
(
plugin_loader
,
"gs_plugin_initialize"
);
out:
...
...
@@ -1781,6 +1770,25 @@ out:
return
ret
;
}
/**
* gs_plugin_loader_dump_state:
**/
void
gs_plugin_loader_dump_state
(
GsPluginLoader
*
plugin_loader
)
{
GsPlugin
*
plugin
;
guint
i
;
/* print what the priorities are */
for
(
i
=
0
;
i
<
plugin_loader
->
priv
->
plugins
->
len
;
i
++
)
{
plugin
=
g_ptr_array_index
(
plugin_loader
->
priv
->
plugins
,
i
);
g_debug
(
"[%s]
\t
%.1f
\t
->
\t
%s"
,
plugin
->
enabled
?
"enabled"
:
"disabled"
,
plugin
->
priority
,
plugin
->
name
);
}
}
/**
* gs_plugin_loader_plugin_free:
**/
...
...
src/gs-plugin-loader.h
View file @
e77e2d1b
...
...
@@ -122,6 +122,7 @@ GList *gs_plugin_loader_search_finish (GsPluginLoader *plugin_loader,
GError
**
error
);
gboolean
gs_plugin_loader_setup
(
GsPluginLoader
*
plugin_loader
,
GError
**
error
);
void
gs_plugin_loader_dump_state
(
GsPluginLoader
*
plugin_loader
);
gboolean
gs_plugin_loader_set_enabled
(
GsPluginLoader
*
plugin_loader
,
const
gchar
*
plugin_name
,
gboolean
enabled
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment