gtk_widget_show_all (browser->inspector);
browser->inspector_view = inspector_view;
gtk_widget_destroy (toplevel);
+ if (!katze_object_get_boolean (browser->settings, "last-inspector-attached"))
+ g_object_set (browser->settings, "last-inspector-attached", TRUE, NULL);
}
static void
gtk_container_remove (GTK_CONTAINER (scrolled), GTK_WIDGET (inspector_view));
gtk_container_add (GTK_CONTAINER (scrolled), browser->inspector_view);
gtk_widget_hide (paned);
+ if (katze_object_get_boolean (browser->settings, "last-inspector-attached"))
+ g_object_set (browser->settings, "last-inspector-attached", FALSE, NULL);
}
static void
gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (window), TRUE);
#endif
gtk_container_add (GTK_CONTAINER (window), inspector_view);
- gtk_widget_show_all (window);
+ gtk_widget_show_all (inspector_view);
g_signal_connect (window, "key-press-event",
G_CALLBACK (midori_view_inspector_window_key_press_event_cb), NULL);
GtkWidget* window = gtk_widget_get_toplevel (GTK_WIDGET (inspector_view));
if (!window)
return FALSE;
- gtk_window_present (GTK_WINDOW (window));
+ if (katze_object_get_boolean (view->settings, "last-inspector-attached"))
+ g_signal_emit_by_name (inspector, "attach-window");
+ else
+ {
+ gtk_widget_show (window);
+ gtk_window_present (GTK_WINDOW (window));
+ }
return TRUE;
}
/*
- Copyright (C) 2008-2010 Christian Dywan <christian@twotoasts.de>
+ Copyright (C) 2008-2012 Christian Dywan <christian@twotoasts.de>
Copyright (C) 2011 Peter Hatina <phatina@redhat.com>
This library is free software; you can redistribute it and/or
gint last_panel_position;
gint last_panel_page;
gint last_web_search;
+ gboolean last_inspector_attached;
gint maximum_cookie_age;
gint maximum_history_age;
gint search_width;
PROP_LAST_PANEL_POSITION,
PROP_LAST_PANEL_PAGE,
PROP_LAST_WEB_SEARCH,
+ PROP_LAST_INSPECTOR_ATTACHED,
PROP_SHOW_MENUBAR,
PROP_SHOW_NAVIGATIONBAR,
_("The last saved Web search"),
0, G_MAXINT, 0,
flags));
+ /**
+ * MidoriWebSettings:last-inspector-attached:
+ *
+ * Whether the inspector was attached.
+ *
+ * Since: 0.4.7
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_LAST_INSPECTOR_ATTACHED,
+ g_param_spec_boolean (
+ "last-inspector-attached",
+ "Inspector attached",
+ "Whether the inspector was attached",
+ FALSE,
+ flags | MIDORI_PARAM_DELAY_SAVING));
g_object_class_install_property (gobject_class,
case PROP_LAST_WEB_SEARCH:
web_settings->last_web_search = g_value_get_int (value);
break;
+ case PROP_LAST_INSPECTOR_ATTACHED:
+ web_settings->last_inspector_attached = g_value_get_boolean (value);
+ break;
case PROP_SHOW_MENUBAR:
web_settings->show_menubar = g_value_get_boolean (value);
case PROP_LAST_WEB_SEARCH:
g_value_set_int (value, web_settings->last_web_search);
break;
+ case PROP_LAST_INSPECTOR_ATTACHED:
+ g_value_set_boolean (value, web_settings->last_inspector_attached);
+ break;
case PROP_SHOW_MENUBAR:
g_value_set_boolean (value, web_settings->show_menubar);