Address leaked strings and item references
This commit is contained in:
parent
00f848b27c
commit
1011d5c5b5
3 changed files with 11 additions and 13 deletions
|
@ -249,7 +249,6 @@ static void
|
||||||
_toggle_tabbar_smartly (MidoriBrowser* browser)
|
_toggle_tabbar_smartly (MidoriBrowser* browser)
|
||||||
{
|
{
|
||||||
guint n;
|
guint n;
|
||||||
gboolean always_show_tabbar;
|
|
||||||
|
|
||||||
if (!browser->show_tabs)
|
if (!browser->show_tabs)
|
||||||
return;
|
return;
|
||||||
|
@ -257,9 +256,7 @@ _toggle_tabbar_smartly (MidoriBrowser* browser)
|
||||||
n = gtk_notebook_get_n_pages (GTK_NOTEBOOK (browser->notebook));
|
n = gtk_notebook_get_n_pages (GTK_NOTEBOOK (browser->notebook));
|
||||||
if (n < 2)
|
if (n < 2)
|
||||||
{
|
{
|
||||||
g_object_get (browser->settings, "always-show-tabbar",
|
if (katze_object_get_boolean (browser->settings, "always-show-tabbar"))
|
||||||
&always_show_tabbar, NULL);
|
|
||||||
if (always_show_tabbar)
|
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (browser->notebook), n > 1);
|
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (browser->notebook), n > 1);
|
||||||
|
@ -3443,6 +3440,7 @@ _action_source_view_activate (GtkAction* action,
|
||||||
gchar* filename = g_filename_from_uri (uri, NULL, NULL);
|
gchar* filename = g_filename_from_uri (uri, NULL, NULL);
|
||||||
sokoke_spawn_program (text_editor, filename);
|
sokoke_spawn_program (text_editor, filename);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
g_free (text_editor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
katze_net_load_uri (NULL, uri, NULL,
|
katze_net_load_uri (NULL, uri, NULL,
|
||||||
|
@ -6300,6 +6298,7 @@ _midori_browser_update_settings (MidoriBrowser* browser)
|
||||||
gboolean close_buttons_on_tabs;
|
gboolean close_buttons_on_tabs;
|
||||||
KatzeItem* item;
|
KatzeItem* item;
|
||||||
|
|
||||||
|
g_free (browser->location_entry_search);
|
||||||
g_free (browser->news_aggregator);
|
g_free (browser->news_aggregator);
|
||||||
|
|
||||||
g_object_get (browser->settings,
|
g_object_get (browser->settings,
|
||||||
|
@ -6602,12 +6601,7 @@ midori_browser_show_bookmarkbar_notify_value_cb (MidoriWebSettings* settings,
|
||||||
GParamSpec* pspec,
|
GParamSpec* pspec,
|
||||||
MidoriBrowser* browser)
|
MidoriBrowser* browser)
|
||||||
{
|
{
|
||||||
gboolean show_bookmarkbar;
|
if (!katze_object_get_boolean (browser->settings, "show-bookmarkbar"))
|
||||||
|
|
||||||
g_object_get (browser->settings, "show-bookmarkbar",
|
|
||||||
&show_bookmarkbar, NULL);
|
|
||||||
|
|
||||||
if (!show_bookmarkbar)
|
|
||||||
midori_bookmarkbar_clear (browser->bookmarkbar);
|
midori_bookmarkbar_clear (browser->bookmarkbar);
|
||||||
else
|
else
|
||||||
midori_bookmarkbar_populate (browser);
|
midori_bookmarkbar_populate (browser);
|
||||||
|
|
|
@ -1034,6 +1034,7 @@ midori_search_action_get_editor (MidoriSearchAction* search_action,
|
||||||
we need to update the default search engine after editing it. */
|
we need to update the default search engine after editing it. */
|
||||||
else if (item == midori_search_action_get_default_item (search_action))
|
else if (item == midori_search_action_get_default_item (search_action))
|
||||||
midori_search_action_set_default_item (search_action, item);
|
midori_search_action_set_default_item (search_action, item);
|
||||||
|
g_object_unref (item);
|
||||||
}
|
}
|
||||||
gtk_widget_destroy (dialog);
|
gtk_widget_destroy (dialog);
|
||||||
}
|
}
|
||||||
|
@ -1123,6 +1124,7 @@ midori_search_action_dialog_move_up_cb (GtkWidget* widget,
|
||||||
|
|
||||||
i = katze_array_get_item_index (search_engines, item);
|
i = katze_array_get_item_index (search_engines, item);
|
||||||
katze_array_move_item (search_engines, item, i - 1);
|
katze_array_move_item (search_engines, item, i - 1);
|
||||||
|
g_object_unref (item);
|
||||||
/* If the index of the current item has changed it needs to be reset */
|
/* If the index of the current item has changed it needs to be reset */
|
||||||
g_object_notify (G_OBJECT (search_action), "current-item");
|
g_object_notify (G_OBJECT (search_action), "current-item");
|
||||||
}
|
}
|
||||||
|
@ -1155,6 +1157,7 @@ midori_search_action_dialog_move_down_cb (GtkWidget* widget,
|
||||||
|
|
||||||
i = katze_array_get_item_index (search_engines, item);
|
i = katze_array_get_item_index (search_engines, item);
|
||||||
katze_array_move_item (search_engines, item, i + 1);
|
katze_array_move_item (search_engines, item, i + 1);
|
||||||
|
g_object_unref (item);
|
||||||
/* If the index of the current item has changed it needs to be reset */
|
/* If the index of the current item has changed it needs to be reset */
|
||||||
g_object_notify (G_OBJECT (search_action), "current-item");
|
g_object_notify (G_OBJECT (search_action), "current-item");
|
||||||
}
|
}
|
||||||
|
@ -1236,6 +1239,7 @@ midori_search_action_dialog_engines_remove_item_cb (KatzeArray* list,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
valid = gtk_tree_model_iter_next (liststore, &iter);
|
valid = gtk_tree_model_iter_next (liststore, &iter);
|
||||||
|
g_object_unref (found_item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1858,10 +1858,10 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view,
|
||||||
new_uri = sokoke_magic_uri (uri);
|
new_uri = sokoke_magic_uri (uri);
|
||||||
if (!new_uri)
|
if (!new_uri)
|
||||||
{
|
{
|
||||||
gchar* search;
|
gchar* search = katze_object_get_string (
|
||||||
g_object_get (view->settings, "location-entry-search",
|
view->settings, "location-entry-search");
|
||||||
&search, NULL);
|
|
||||||
new_uri = sokoke_search_uri (search, uri);
|
new_uri = sokoke_search_uri (search, uri);
|
||||||
|
g_free (search);
|
||||||
}
|
}
|
||||||
katze_assign (uri, new_uri);
|
katze_assign (uri, new_uri);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue