diff --git a/Makefile.am b/Makefile.am
index 8c2c8592..e268470c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -62,3 +62,6 @@ DISTCLEANFILES = \
po-subdirs-stamp
distuninstallcheck_listfiles = find . -type f -print | grep -v share/mime/ | grep -v share/icons/hicolor
+
+snapshot:
+ $(MAKE) dist && mv $(PACKAGE)-$(VERSION).tar.bz2 $(PACKAGE)-`date +%F-%H-%M`.tar.bz2
diff --git a/moo/mooapp/mooapp.c b/moo/mooapp/mooapp.c
index 8fcb51e5..e3dc1218 100644
--- a/moo/mooapp/mooapp.c
+++ b/moo/mooapp/mooapp.c
@@ -1561,6 +1561,8 @@ moo_app_write_session (MooApp *app)
g_free (file);
g_error_free (error);
}
+
+ g_free (string);
}
void
diff --git a/moo/mooapp/mooappinput.c b/moo/mooapp/mooappinput.c
index e5e6441c..e708f126 100644
--- a/moo/mooapp/mooappinput.c
+++ b/moo/mooapp/mooappinput.c
@@ -112,6 +112,7 @@ _moo_app_input_free (MooAppInput *ch)
g_return_if_fail (ch != NULL);
g_slist_foreach (ch->pipes, (GFunc) input_channel_free, NULL);
+ g_slist_free (ch->pipes);
g_free (ch->main_path);
g_free (ch->appname);
diff --git a/moo/mooedit/filters.xml b/moo/mooedit/filters.xml
index eb4181ff..fd6cb872 100644
--- a/moo/mooedit/filters.xml
+++ b/moo/mooedit/filters.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/moo/mooedit/gtksourceview/upstream/gtksourcecontextengine.c b/moo/mooedit/gtksourceview/upstream/gtksourcecontextengine.c
index 8a71acf8..f0ddc51c 100644
--- a/moo/mooedit/gtksourceview/upstream/gtksourcecontextengine.c
+++ b/moo/mooedit/gtksourceview/upstream/gtksourcecontextengine.c
@@ -2710,6 +2710,7 @@ regex_resolve (Regex *regex,
new_regex = regex_new ("$never-match^", 0, NULL);
}
+ g_free (expanded_regex);
g_regex_unref (start_ref);
return new_regex;
}
diff --git a/moo/mooedit/mooedit.c b/moo/mooedit/mooedit.c
index cff1a51c..ec3eac48 100644
--- a/moo/mooedit/mooedit.c
+++ b/moo/mooedit/mooedit.c
@@ -1050,7 +1050,7 @@ moo_edit_filename_changed (MooEdit *edit,
gboolean lang_changed = FALSE;
MooLang *lang = NULL, *old_lang = NULL;
const char *lang_id = NULL;
- const char *filter_config = NULL;
+ char *filter_config = NULL;
old_lang = moo_text_view_get_lang (MOO_TEXT_VIEW (edit));
@@ -1091,6 +1091,8 @@ moo_edit_filename_changed (MooEdit *edit,
}
_moo_edit_thaw_config_notify (edit);
+
+ g_free (filter_config);
}
diff --git a/moo/mooedit/mooeditaction-factory.c b/moo/mooedit/mooeditaction-factory.c
index 0a512f13..f528e526 100644
--- a/moo/mooedit/mooeditaction-factory.c
+++ b/moo/mooedit/mooeditaction-factory.c
@@ -225,7 +225,10 @@ moo_edit_class_install_action (MooEditClass *klass,
GtkAction *action = create_action (action_id, info, l->data);
if (action)
+ {
moo_edit_add_action (l->data, action);
+ g_object_unref (action);
+ }
}
}
}
@@ -542,7 +545,10 @@ add_action (const char *id,
GtkAction *action = create_action (id, info, edit);
if (action)
+ {
moo_edit_add_action (edit, action);
+ g_object_unref (action);
+ }
}
void
diff --git a/moo/mooedit/mooeditfiltersettings.c b/moo/mooedit/mooeditfiltersettings.c
index d558d627..acdbd133 100644
--- a/moo/mooedit/mooeditfiltersettings.c
+++ b/moo/mooedit/mooeditfiltersettings.c
@@ -38,8 +38,8 @@ typedef struct {
static FilterSettingsStore *settings_store;
-static const char *filter_settings_store_get_setting (FilterSettingsStore *store,
- const char *filename);
+static char *filter_settings_store_get_setting (FilterSettingsStore *store,
+ const char *filename);
static void
@@ -169,7 +169,7 @@ _moo_edit_filter_settings_reload (void)
}
-static const char *
+static char *
_moo_edit_filter_settings_get_for_file_utf8 (const char *filename)
{
g_return_val_if_fail (settings_store != NULL, NULL);
@@ -181,11 +181,11 @@ _moo_edit_filter_settings_get_for_file_utf8 (const char *filename)
}
-const char *
+char *
_moo_edit_filter_settings_get_for_file (const char *filename)
{
char *filename_utf8;
- const char *result;
+ char *result;
g_return_val_if_fail (filename != NULL, NULL);
@@ -216,7 +216,7 @@ filter_setting_match (FilterSetting *setting,
}
-static const char *
+static char *
filter_settings_store_get_setting (FilterSettingsStore *store,
const char *filename)
{
diff --git a/moo/mooedit/mooeditfiltersettings.h b/moo/mooedit/mooeditfiltersettings.h
index 58d0d578..e31a58c0 100644
--- a/moo/mooedit/mooeditfiltersettings.h
+++ b/moo/mooedit/mooeditfiltersettings.h
@@ -28,7 +28,7 @@ void _moo_edit_filter_settings_load (void);
GSList *_moo_edit_filter_settings_get_strings (void);
void _moo_edit_filter_settings_set_strings (GSList *strings);
-const char *_moo_edit_filter_settings_get_for_file (const char *filename);
+char *_moo_edit_filter_settings_get_for_file (const char *filename);
G_END_DECLS
diff --git a/moo/mooedit/mooeditwindow.c b/moo/mooedit/mooeditwindow.c
index 594aa398..1fe21d2c 100644
--- a/moo/mooedit/mooeditwindow.c
+++ b/moo/mooedit/mooeditwindow.c
@@ -2550,6 +2550,8 @@ create_tab_label (MooEditWindow *window,
G_CALLBACK (tab_icon_button_press),
window);
+ g_object_unref (group);
+
return hbox;
}
diff --git a/moo/mooedit/mooindenter.c b/moo/mooedit/mooindenter.c
index 16555d70..654c21dd 100644
--- a/moo/mooedit/mooindenter.c
+++ b/moo/mooedit/mooindenter.c
@@ -229,6 +229,8 @@ moo_indenter_finalize (GObject *object)
if (indent->priv->re)
_moo_indenter_regex_unref (indent->priv->re);
+ g_free (indent->priv->id);
+
G_OBJECT_CLASS(moo_indenter_parent_class)->finalize (object);
}
diff --git a/moo/moofileview/mooiconview.c b/moo/moofileview/mooiconview.c
index 9f4c2681..7135ae39 100644
--- a/moo/moofileview/mooiconview.c
+++ b/moo/moofileview/mooiconview.c
@@ -998,6 +998,7 @@ destroy_layout (MooIconView *view)
g_free (column);
}
+ g_slist_free (view->priv->layout->columns);
g_free (view->priv->layout);
view->priv->layout = NULL;
}
@@ -1259,6 +1260,7 @@ static gboolean moo_icon_view_update_layout (MooIconView *view)
g_free (column);
}
+ g_slist_free (layout->columns);
layout->columns = NULL;
layout->num_rows = 0;
diff --git a/moo/moopython/pygtk/mooutils-pygtk.override b/moo/moopython/pygtk/mooutils-pygtk.override
index a42a4361..8ebabaf4 100644
--- a/moo/moopython/pygtk/mooutils-pygtk.override
+++ b/moo/moopython/pygtk/mooutils-pygtk.override
@@ -364,8 +364,7 @@ _wrap_moo_closure_new (G_GNUC_UNUSED PyObject *self, PyObject *args)
Py_INCREF (closure->func);
closure->args = cl_args;
- moo_closure_ref ((MooClosure*) closure);
- moo_closure_sink ((MooClosure*) closure);
+ moo_closure_ref_sink ((MooClosure*) closure);
return pyg_boxed_new (MOO_TYPE_CLOSURE, closure, FALSE, TRUE);
}
diff --git a/moo/mooutils/mooactioncollection.c b/moo/mooutils/mooactioncollection.c
index 8c8591bf..75f1db8a 100644
--- a/moo/mooutils/mooactioncollection.c
+++ b/moo/mooutils/mooactioncollection.c
@@ -61,6 +61,7 @@ moo_action_collection_dispose (GObject *object)
g_slist_free (coll->priv->groups_list);
g_free (coll->priv->name);
g_free (coll->priv);
+ coll->priv = NULL;
}
G_OBJECT_CLASS (moo_action_collection_parent_class)->dispose (object);
diff --git a/moo/mooutils/mooclosure.c b/moo/mooutils/mooclosure.c
index 6e3ce2fc..6d66d360 100644
--- a/moo/mooutils/mooclosure.c
+++ b/moo/mooutils/mooclosure.c
@@ -91,8 +91,8 @@ moo_closure_invoke (MooClosure *closure)
closure->call (closure);
closure->in_call = FALSE;
- if (!closure->valid)
- moo_closure_invalidate (closure);
+ if (!closure->valid && closure->destroy)
+ closure->destroy (closure);
moo_closure_unref (closure);
}
@@ -105,8 +105,12 @@ moo_closure_invalidate (MooClosure *closure)
if (closure && closure->valid)
{
closure->valid = FALSE;
+
if (!closure->in_call && closure->destroy)
+ {
closure->destroy (closure);
+ closure->destroy = (MooClosureDestroy) 0xdeadbeef;
+ }
}
}
diff --git a/moo/mooutils/moofontsel.c b/moo/mooutils/moofontsel.c
index 82990a58..abb00519 100644
--- a/moo/mooutils/moofontsel.c
+++ b/moo/mooutils/moofontsel.c
@@ -708,6 +708,15 @@ moo_font_selection_show_available_fonts (MooFontSelection *fontsel)
}
}
+ if (!match_family && fontsel->monospace)
+ {
+ g_free (families);
+ fontsel->monospace = FALSE;
+ moo_font_selection_show_available_fonts (fontsel);
+ fontsel->monospace = TRUE;
+ return;
+ }
+
fontsel->family = match_family;
if (match_family)
{
diff --git a/moo/mooutils/moomenumgr.c b/moo/mooutils/moomenumgr.c
index 2f9858a9..240f222d 100644
--- a/moo/mooutils/moomenumgr.c
+++ b/moo/mooutils/moomenumgr.c
@@ -342,6 +342,7 @@ mgr_remove (MooMenuMgr *mgr,
g_slist_free (items_to_free);
g_slist_free (menus_to_free);
+ g_slist_free (menus);
ensure_active_item (mgr);
diff --git a/moo/mooutils/moouixml.c b/moo/mooutils/moouixml.c
index 2fdcc16d..cba1fc0b 100644
--- a/moo/mooutils/moouixml.c
+++ b/moo/mooutils/moouixml.c
@@ -122,7 +122,6 @@ static gboolean node_is_ancestor (Node *node,
Node *ancestor);
static gboolean node_is_empty (Node *node);
static GSList *node_list_children (Node *ndoe);
-static GSList *node_list_all_children (Node *ndoe);
static void node_free (Node *node);
static void node_foreach (Node *node,
NodeForeachFunc func,
@@ -2466,43 +2465,20 @@ toplevel_add_node (MooUIXML *xml,
}
-static GSList*
-node_list_all_children (Node *node)
-{
- GSList *list, *l;
-
- g_return_val_if_fail (node != NULL, NULL);
-
- list = g_slist_append (NULL, node);
-
- for (l = node->children; l != NULL; l = l->next)
- list = g_slist_append (list, node_list_all_children (l->data));
-
- return list;
-}
-
-
static void
toplevel_remove_node (G_GNUC_UNUSED MooUIXML *xml,
Toplevel *toplevel,
Node *node)
{
- GSList *children, *l;
+ GtkWidget *widget;
g_return_if_fail (node != toplevel->node);
g_return_if_fail (node_is_ancestor (node, toplevel->node));
- children = node_list_all_children (node);
+ widget = g_hash_table_lookup (toplevel->children, node);
- for (l = children; l != NULL; l = l->next)
- {
- GtkWidget *widget = g_hash_table_lookup (toplevel->children, node);
-
- if (widget)
- gtk_widget_destroy (widget);
- }
-
- g_slist_free (children);
+ if (widget)
+ gtk_widget_destroy (widget);
}