gtk_widget_show (button);
gtk_widget_show (bbox);
gtk_box_pack_start (GTK_BOX (statusbar), bbox, FALSE, FALSE, 3);
+ g_object_unref (settings);
g_signal_connect (extension, "deactivate",
G_CALLBACK (statusbar_features_deactivate_cb), bbox);
if (g_hash_table_lookup_extended (net->memory,
icon_file, NULL, (gpointer)&pixbuf))
{
+ g_free (icon_file);
if (pixbuf)
g_object_ref (pixbuf);
}
else if ((pixbuf = gdk_pixbuf_new_from_file (icon_file, NULL)))
- ;
+ g_free (icon_file);
/* If the called doesn't provide an icon callback,
we assume there is no interest in loading an un-cached icon. */
else if (icon_cb)
else
g_warning (_("Invalid configuration value '%s'"), property);
}
+ g_free (pspecs);
return settings;
}
}
if (type == G_TYPE_PARAM_STRING)
{
- const gchar* string;
+ gchar* string;
g_object_get (settings, property, &string, NULL);
g_key_file_set_string (key_file, "settings", property,
string ? string : "");
+ g_free (string);
}
else if (type == G_TYPE_PARAM_INT)
{
else
g_warning (_("Invalid configuration value '%s'"), property);
}
+ g_free (pspecs);
saved = sokoke_key_file_save_to_file (key_file, filename, error);
g_key_file_free (key_file);
return saved;
}
katze_array_add_item (search_engines, item);
}
+ g_free (pspecs);
g_strfreev (engines);
g_key_file_free (key_file);
return search_engines;
g_free (value);
}
}
+ g_free (pspecs);
saved = sokoke_key_file_save_to_file (key_file, filename, error);
g_key_file_free (key_file);
addon = g_object_new (MIDORI_TYPE_EXTENSIONS, "app", app, NULL);
gtk_widget_show (addon);
midori_panel_append_page (MIDORI_PANEL (panel), MIDORI_VIEWABLE (addon));
+
+ g_object_unref (panel);
}
static void
katze_item_set_uri (item, homepage);
g_free (homepage);
}
+ g_object_unref (settings);
katze_array_add_item (_session, item);
+ g_object_unref (item);
}
session = midori_browser_get_proxy_array (browser);
#if HAVE_SQLITE
settings = katze_object_get_object (app, "settings");
g_object_get (settings, "maximum-history-age", &max_history_age, NULL);
+ g_object_unref (settings);
midori_history_terminate (db, max_history_age);
#endif
g_object_unref (app);
markup = g_strdup_printf ("<folder%s>\n%s%s%s</folder>\n",
"" /* folded ? folded : "" */,
title, desc,
- g_string_free (_markup, FALSE));
+ _markup->str);
+ g_string_free (_markup, TRUE);
/* g_free (folded); */
g_free (title);
g_free (desc);
"\"http://www.python.org/topics/xml/dtds/xbel-1.0.dtd\">\n",
title,
desc,
- g_string_free (inner_markup, FALSE));
+ inner_markup->str);
+ g_string_free (inner_markup, TRUE);
g_free (title);
g_free (desc);
}
g_signal_connect (monitor, "changed",
G_CALLBACK (midori_addons_directory_monitor_changed), addons);
+ g_object_unref (directory);
}
g_slist_free (list);
PROP_APP
};
+static void
+midori_bookmarks_finalize (GObject* object);
+
static void
midori_bookmarks_set_property (GObject* object,
guint prop_id,
GParamFlags flags;
gobject_class = G_OBJECT_CLASS (class);
+ gobject_class->finalize = midori_bookmarks_finalize;
gobject_class->set_property = midori_bookmarks_set_property;
gobject_class->get_property = midori_bookmarks_get_property;
settings = katze_object_get_object (browser, "settings");
if (!katze_object_get_boolean (settings, "open-tabs-in-the-background"))
midori_browser_set_current_page (MIDORI_BROWSER (browser), n);
+ g_object_unref (settings);
}
i++;
}
settings = katze_object_get_object (browser, "settings");
if (!katze_object_get_boolean (settings, "open-tabs-in-the-background"))
midori_browser_set_current_page (MIDORI_BROWSER (browser), n);
+ g_object_unref (settings);
}
}
}
GtkCellRenderer* renderer_text;
bookmarks->net = katze_net_new ();
- /* FIXME: Dereference the net on finalization */
/* Create the treeview */
model = gtk_tree_store_new (1, KATZE_TYPE_ITEM);
bookmarks->treeview = treeview;
}
+static void
+midori_bookmarks_finalize (GObject* object)
+{
+ MidoriBookmarks* bookmarks = MIDORI_BOOKMARKS (object);
+
+ if (bookmarks->app)
+ g_object_unref (bookmarks->app);
+ g_object_unref (bookmarks->net);
+}
+
/**
* midori_bookmarks_new:
*
PROP_APP
};
+static void
+midori_history_finalize (GObject* object);
+
static void
midori_history_set_property (GObject* object,
guint prop_id,
GParamFlags flags;
gobject_class = G_OBJECT_CLASS (class);
+ gobject_class->finalize = midori_history_finalize;
gobject_class->set_property = midori_history_set_property;
gobject_class->get_property = midori_history_get_property;
time_t now = time (NULL);
gint64 day = sokoke_time_t_to_julian (&now);
- /* FIXME: Dereference the app on finalization */
model = gtk_tree_view_get_model (GTK_TREE_VIEW (history->treeview));
midori_history_insert_item (history, GTK_TREE_STORE (model),
NULL, KATZE_ITEM (g_object_ref (history->array)), day);
settings = katze_object_get_object (browser, "settings");
if (!katze_object_get_boolean (settings, "open-tabs-in-the-background"))
midori_browser_set_current_page (MIDORI_BROWSER (browser), n);
+ g_object_unref (settings);
}
i++;
}
settings = katze_object_get_object (browser, "settings");
if (!katze_object_get_boolean (settings, "open-tabs-in-the-background"))
midori_browser_set_current_page (MIDORI_BROWSER (browser), n);
+ g_object_unref (settings);
}
}
}
history->treeview = treeview;
}
+static void
+midori_history_finalize (GObject* object)
+{
+ MidoriHistory* history = MIDORI_HISTORY (object);
+
+ if (history->app)
+ g_object_unref (history->app);
+ g_object_unref (history->array);
+}
+
/**
* midori_history_new:
*
}
g_list_free (actions);
gtk_widget_destroy (GTK_WIDGET (browser));
+ g_object_unref (app);
}
int