Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
gtk
Commits
35a41bd8
Commit
35a41bd8
authored
Oct 20, 2010
by
Matthias Clasen
Committed by
Carlos Garnacho
Dec 04, 2010
Browse files
Make loading of theming engines from modules work
parent
d0f681e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
gtk/gtkthemingengine.c
View file @
35a41bd8
...
...
@@ -154,8 +154,11 @@ typedef struct GtkThemingModuleClass GtkThemingModuleClass;
struct
GtkThemingModule
{
GTypeModule
parent_instance
;
GModule
*
module
;
gchar
*
name
;
void
(
*
init
)
(
GTypeModule
*
module
);
void
(
*
exit
)
(
void
);
GtkThemingEngine
*
(
*
create_engine
)
(
void
);
};
...
...
@@ -622,26 +625,50 @@ gtk_theming_module_load (GTypeModule *type_module)
return
FALSE
;
}
if
(
!
g_module_symbol
(
module
,
"create_engine"
,
if
(
!
g_module_symbol
(
module
,
"theme_init"
,
(
gpointer
*
)
&
theming_module
->
init
)
||
!
g_module_symbol
(
module
,
"theme_exit"
,
(
gpointer
*
)
&
theming_module
->
exit
)
||
!
g_module_symbol
(
module
,
"create_engine"
,
(
gpointer
*
)
&
theming_module
->
create_engine
))
{
g_warning
(
"%s"
,
g_module_error
());
g_warning
(
"%s"
,
g_module_error
());
g_module_close
(
module
);
return
FALSE
;
}
g_module_make_resident
(
module
);
theming_module
->
module
=
module
;
theming_module
->
init
(
theming_module
);
return
TRUE
;
}
static
void
gtk_theming_module_unload
(
GTypeModule
*
type_module
)
{
GtkThemingModule
*
theming_module
;
theming_module
=
GTK_THEMING_MODULE
(
type_module
);
theming_module
->
exit
();
g_module_close
(
theming_module
->
module
);
theming_module
->
module
=
NULL
;
theming_module
->
init
=
NULL
;
theming_module
->
exit
=
NULL
;
theming_module
->
create_engine
=
NULL
;
}
static
void
gtk_theming_module_class_init
(
GtkThemingModuleClass
*
klass
)
{
GTypeModuleClass
*
module_class
=
G_TYPE_MODULE_CLASS
(
klass
);
module_class
->
load
=
gtk_theming_module_load
;
module_class
->
unload
=
gtk_theming_module_unload
;
}
static
void
...
...
Write
Preview
Markdown
is supported
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