From javscript C functions cannot be called, but signals
are available through the GObject type system. So
we allow javascript to call action signals like functions.
At the same time we modify a few browser functions, so
that they are functions that are available as signals.
The new singleton holds the shared settings and trash. It is
further more used to keep track of all open windows and quits
when the last window was closed. It also watches the focus in
case you need something like a "current" browser.
The File Open dialog should remember the last opened folder
or try to obtain it from the currently opened web view.
Besides the dialog ought to be transient.
At the point of loading the first page the web view
hasn't loaded anything, so we need to manually focus
the Location if the page is blank.
Incidentally midori_browser_activate_action can activate
any action, so it will probably be much more useful
in the future.
If the location or web search was hidden, and one attempted
to use the menus or shortcuts for Location or Web search,
an appropriate dialog with an entry was shown.
Now we show the according widget temporarily and hide it again
once it loses focus.
The toolbar style, small toolbar, New Tab, Web Search and
Trash buttons are shown or hidden respectively as
the preference values change.
This is also an attempt at updating the web view's settings
immediately. Although it seems to work, an ugly warning is
emitted to the console on every change.
Switch configuration logic from a custom structure to
fully rely on MidoriWebSettings. This includes revamping
the preferences dialog. The old logic is not yet
replaced completely, this will follow soon, thus several
settings will have no effect right now.
The menu items were sensitive in reversed logic and the Stop item
had the icon and accelerator of the Reload item.
Now the sensitivity is fixed and the Stop item is Stop again.
Based on the implementation of localization via Gettext
contributed by Enrico Tröger, a few adjustments were made
to allow Midori to be properly localized. Initially
German is fully supported.
Add the actions UndoTabClose, BookmarkNew, SaveAs, SourceView and Print
to the context menu. Also add UndoTabClose to the Go menu, remove
STOCK_SOURCE_VIEW and remove ui.h which is obsolete.
The 'browser' struct is superseded by MidoriBrowser, which actually
represents a window that holds pages, i.e. tabs. The tabs are currently
of the type MidoriWebView, which is a slightly enhanced WebView. Also
MidoriWebSettings is introduced to hold additional settings that Midori
needs.
The other two new classes are MidoriTrash, representing closed tabs and
windows and MidoriPanel, representing the side panel.
The refactoring allows for several features to be much more easily
implemented, such as full support for multiple windows and instant
saving of modified files, such as bookmarks or the session. Regressions
are expected and not everything is done yet.