summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilder.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-05-30 00:21:18 +0200
committerBenjamin Otte <otte@redhat.com>2014-05-31 05:19:40 +0200
commit3df52ae6d56fc4c47db1b72b9441c43f3ff665c2 (patch)
treeb9dbd4db89e42c29d5d977c19194ec420c39b546 /gtk/gtkbuilder.c
parentbb9bf4b40888da66129801313144ac3ad2129b04 (diff)
downloadgtk+-3df52ae6d56fc4c47db1b72b9441c43f3ff665c2.tar.gz
builder: Cleanup
Use the usual way of providing user data to vfuncs: - Don't allocate it, use the stack - Use CamelCase for naming the struct
Diffstat (limited to 'gtk/gtkbuilder.c')
-rw-r--r--gtk/gtkbuilder.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index d7cadc4c3f..1be1589af5 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -1547,7 +1547,7 @@ gtk_builder_expose_object (GtkBuilder *builder,
typedef struct {
GModule *module;
gpointer data;
-} connect_args;
+} ConnectArgs;
static void
gtk_builder_connect_signals_default (GtkBuilder *builder,
@@ -1559,7 +1559,7 @@ gtk_builder_connect_signals_default (GtkBuilder *builder,
gpointer user_data)
{
GCallback func;
- connect_args *args = (connect_args*)user_data;
+ ConnectArgs *args = (ConnectArgs*) user_data;
func = gtk_builder_lookup_callback_symbol (builder, handler_name);
@@ -1618,23 +1618,20 @@ void
gtk_builder_connect_signals (GtkBuilder *builder,
gpointer user_data)
{
- connect_args *args;
+ ConnectArgs args;
g_return_if_fail (GTK_IS_BUILDER (builder));
- args = g_slice_new0 (connect_args);
- args->data = user_data;
+ args.data = user_data;
if (g_module_supported ())
- args->module = g_module_open (NULL, G_MODULE_BIND_LAZY);
+ args.module = g_module_open (NULL, G_MODULE_BIND_LAZY);
gtk_builder_connect_signals_full (builder,
gtk_builder_connect_signals_default,
- args);
- if (args->module)
- g_module_close (args->module);
-
- g_slice_free (connect_args, args);
+ &args);
+ if (args.module)
+ g_module_close (args.module);
}
/**