{
icon_theme = gtk_icon_theme_get_for_screen (screen);
if ((parts = g_strsplit (view->mime_type, "/", 2)))
- parts = (parts[0] && parts[1]) ? parts : NULL;
+ {
+ if (!(parts[0] && parts[1]))
+ katze_assign (parts, NULL);
+ }
}
else
parts = NULL;
g_strfreev (parts);
}
g_strfreev (items);
- g_object_set_data (G_OBJECT (view), "news-feeds",
- value && *value ? (void*)1 : (void*)0);
+ g_object_set_data_full (G_OBJECT (view), "news-feeds",
+ value && *value ? (void*)1 : (void*)0, g_free);
/* Ensure load-status is notified again, whether it changed or not */
g_object_notify (G_OBJECT (view), "load-status");
}
GParamSpec* pspec)
{
MidoriWebSettings* web_settings;
- const gchar* string;
+ gchar* string;
const gchar* encoding;
web_settings = MIDORI_WEB_SETTINGS (object);
web_settings->preferred_encoding = MIDORI_ENCODING_WESTERN;
else
web_settings->preferred_encoding = MIDORI_ENCODING_CUSTOM;
+ g_free (string);
g_object_notify (object, "preferred-encoding");
}
static void
midori_web_settings_finalize (GObject* object)
{
+ MidoriWebSettings* web_settings;
+
+ web_settings = MIDORI_WEB_SETTINGS (object);
+
+ katze_assign (web_settings->toolbar_items, NULL);
+ katze_assign (web_settings->homepage, NULL);
+ katze_assign (web_settings->download_folder, NULL);
+ katze_assign (web_settings->download_manager, NULL);
+ katze_assign (web_settings->text_editor, NULL);
+ katze_assign (web_settings->news_aggregator, NULL);
+ katze_assign (web_settings->location_entry_search, NULL);
+ katze_assign (web_settings->http_proxy, NULL);
+ katze_assign (web_settings->ident_string, NULL);
+
G_OBJECT_CLASS (midori_web_settings_parent_class)->finalize (object);
}