_toggle_tabbar_smartly (MidoriBrowser* browser)
{
guint n;
- gboolean always_show_tabbar;
if (!browser->show_tabs)
return;
n = gtk_notebook_get_n_pages (GTK_NOTEBOOK (browser->notebook));
if (n < 2)
{
- g_object_get (browser->settings, "always-show-tabbar",
- &always_show_tabbar, NULL);
- if (always_show_tabbar)
+ if (katze_object_get_boolean (browser->settings, "always-show-tabbar"))
n++;
}
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (browser->notebook), n > 1);
gchar* filename = g_filename_from_uri (uri, NULL, NULL);
sokoke_spawn_program (text_editor, filename);
g_free (filename);
+ g_free (text_editor);
return;
}
katze_net_load_uri (NULL, uri, NULL,
gboolean close_buttons_on_tabs;
KatzeItem* item;
+ g_free (browser->location_entry_search);
g_free (browser->news_aggregator);
g_object_get (browser->settings,
GParamSpec* pspec,
MidoriBrowser* browser)
{
- gboolean show_bookmarkbar;
-
- g_object_get (browser->settings, "show-bookmarkbar",
- &show_bookmarkbar, NULL);
-
- if (!show_bookmarkbar)
+ if (!katze_object_get_boolean (browser->settings, "show-bookmarkbar"))
midori_bookmarkbar_clear (browser->bookmarkbar);
else
midori_bookmarkbar_populate (browser);
we need to update the default search engine after editing it. */
else if (item == midori_search_action_get_default_item (search_action))
midori_search_action_set_default_item (search_action, item);
+ g_object_unref (item);
}
gtk_widget_destroy (dialog);
}
i = katze_array_get_item_index (search_engines, item);
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 */
g_object_notify (G_OBJECT (search_action), "current-item");
}
i = katze_array_get_item_index (search_engines, item);
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 */
g_object_notify (G_OBJECT (search_action), "current-item");
}
}
else
valid = gtk_tree_model_iter_next (liststore, &iter);
+ g_object_unref (found_item);
}
}
new_uri = sokoke_magic_uri (uri);
if (!new_uri)
{
- gchar* search;
- g_object_get (view->settings, "location-entry-search",
- &search, NULL);
+ gchar* search = katze_object_get_string (
+ view->settings, "location-entry-search");
new_uri = sokoke_search_uri (search, uri);
+ g_free (search);
}
katze_assign (uri, new_uri);
}