return;
n = gtk_notebook_get_n_pages (GTK_NOTEBOOK (browser->notebook));
- if (n < 2 && browser->settings)
+ if (n < 2)
{
g_object_get (browser->settings, "always-show-tabbar",
&always_show_tabbar, NULL);
g_object_set_data (G_OBJECT (gtk_widget_get_parent (button)),
"done", (void*)1);
- if (browser->settings && katze_object_get_boolean (
- browser->settings, "notify-transfer-completed"))
+ if (katze_object_get_boolean (browser->settings, "notify-transfer-completed"))
{
const gchar* uri = webkit_download_get_destination_uri (download);
gchar* path = soup_uri_decode (uri);
NULL);
if (!g_object_get_data (G_OBJECT (view), "midori-view-append") &&
- browser->settings &&
katze_object_get_boolean (browser->settings, "open-tabs-next-to-current"))
{
n = gtk_notebook_get_current_page (notebook);
{
static GtkWidget* dialog = NULL;
- if (!browser->settings || !GTK_WIDGET_VISIBLE (browser))
+ if (!GTK_WIDGET_VISIBLE (browser))
return;
if (!dialog)
{
- dialog = midori_preferences_new (GTK_WINDOW (browser),
- browser->settings);
+ dialog = midori_preferences_new (GTK_WINDOW (browser), browser->settings);
g_signal_connect (dialog, "response",
G_CALLBACK (midori_preferences_response_help_cb), browser);
g_signal_connect (dialog, "destroy",
_action_homepage_activate (GtkAction* action,
MidoriBrowser* browser)
{
+ gchar* homepage;
+
if (g_object_get_data (G_OBJECT (action), "midori-middle-click"))
{
g_object_set_data (G_OBJECT (action), "midori-middle-click", (void*)0);
return;
}
- gchar* homepage;
-
- if (!browser->settings)
- return;
-
g_object_get (browser->settings, "homepage", &homepage, NULL);
midori_browser_set_current_uri (browser, homepage);
g_free (homepage);
const gchar* url;
gchar* search;
- if (!browser->settings)
- return;
-
g_object_get (browser->settings, "last-web-search", &last_web_search, NULL);
item = katze_array_get_nth_item (browser->search_engines, last_web_search);
if (item)
g_return_val_if_fail (action != NULL, FALSE);
- if (!browser->settings)
- return FALSE;
-
g_object_get (browser->settings, "homepage", &homepage, NULL);
name = gtk_action_get_name (action);
MidoriBrowser* browser)
{
gint page = katze_object_get_boolean (panel, "page");
- if (browser->settings && page > -1)
+ if (page > -1)
g_object_set (browser->settings, "last-panel-page", page, NULL);
}
gint paned_position = gtk_paned_get_position (GTK_PANED (hpaned));
gint paned_size = hpaned->allocation.width;
- g_object_set (browser->settings, "right-align-sidepanel",
- right_aligned, NULL);
+ g_object_set (browser->settings, "right-align-sidepanel", right_aligned, NULL);
g_object_ref (browser->panel);
g_object_ref (vpaned);