Commit graph

1453 commits

Author SHA1 Message Date
Christian Dywan
9241afa0db Implement FTP support in External Applications
For the moment 'gftp' is hardcoded for ftp://.
2010-05-13 01:06:58 +02:00
Christian Dywan
969c225c3b Add Midori.View to midori.vala description 2010-05-12 23:52:39 +02:00
Christian Dywan
4027fdfcd4 Use grouped bit fields in MidoriWebSettings
One settings instance needs only about half the memory
when using bit fields with exact sizes.
2010-05-12 23:37:26 +02:00
Christian Dywan
d522efa23c Hide the tab label properly if it's minimized initially 2010-05-09 00:30:24 +02:00
Christian Dywan
3b9a4a5705 Hide the tab label if it's minimized at creation 2010-05-09 00:27:02 +02:00
Christian Dywan
6442b34b89 Use the basename of the suggested download name
Sometimes the suggested name contains a folder name.
2010-05-09 00:25:22 +02:00
Christian Dywan
cd54d23dbe Take care to avoid overwriting files accidentally
When a file needs to be saved in a specific location, ask
whether to overwrite or not. And if a file is saved
implicitly, append a number if the filename exists.
2010-05-08 03:38:07 +02:00
Christian Dywan
743b264a72 Rework rendering of raw XML as source
We need to be stricter with what counts as raw XML, for instance
not SVG images. And we shouldn't break explicit source view.
2010-05-07 20:31:41 +02:00
Christian Dywan
fb72bcfeae Unify content type/ MIME type handling and plug leak 2010-05-07 20:17:53 +02:00
Christian Dywan
affde90e2c Consistently focus the view, which propagates
Rather than trying to determine and focus the web view
from different places, the parent view should simply
propagate focus by default. The child needs to be
constructed implicitly if focus comes in early.
2010-05-06 22:49:47 +02:00
Christian Dywan
4b94b63f70 Base KatzeThrobber on GtkSpinner if available 2010-05-02 16:11:18 +02:00
Christian Dywan
001d9e463a Rely on WebKitWebView::icon-uri for icon discovery 2010-05-02 12:19:37 +02:00
Arno Renevier
7c0e58a835 Refactor userscripts and userstyles as an extension 2010-05-02 11:53:05 +02:00
Christian Dywan
f24bc315e2 Update FAQ link used for Help > Frequent Questions 2010-05-01 03:12:03 +02:00
Christian Dywan
e7f04272cd Check free space before trying to download 2010-04-30 23:52:33 +02:00
Christian Dywan
efa81643c5 Expose midori_view_populate_popup for use in extensions 2010-04-29 02:19:20 +02:00
Christian Dywan
a25e4c5f0a Add gtk_widget_get_window and fix gtk_dialog_get_content_area 2010-04-28 23:57:22 +02:00
Christian Dywan
7a7f4c6a44 Provide midori.vapi for App, Browser, Extension and WebSettings
With this API description extensions can be written in Vala. Mind
it is not complete yet, missing interfaces can be added later.
2010-04-27 23:49:45 +02:00
Christian Dywan
4576360ec3 Implement midori_browser_get_settings in MidoriBrowser 2010-04-27 23:36:14 +02:00
Christian Dywan
64b6f6ce6d Implement midori_app_get_browser in MidoriApp 2010-04-27 22:34:26 +02:00
Christian Dywan
7044bb70c4 Expose tabs in MidoriBrowser as GList 2010-04-25 23:39:00 +02:00
Christian Dywan
102810842f Expose browsers in MidoriApp as GList 2010-04-25 23:39:00 +02:00
Christian Dywan
9d3c884194 Implement midori_browser_get_proxy_items
This supersedes midori_browser_get_proxy_array as a means to
access the KatzeItem* items. The new name is clearer.
2010-04-25 23:38:59 +02:00
Christian Dywan
d2d5086e3b Unset save file dialog when it is destroyed
If the window manager closes the dialogue rather than one of the
buttons, it is destroyed implicitly.
2010-04-25 00:57:21 +02:00
Christian Dywan
34984c7ac1 Fix gtk_widget_set_no_show_all and g_filename_to_uri calls 2010-04-23 00:02:46 +02:00
Christian Dywan
0d4b041de3 Security with background color and secondary icon 2010-04-21 02:47:21 +02:00
Christian Dywan
aaf0d4b395 Guards around midori_browser_add_download_item
The function is guarded already but of course the declaration
needs to be guarded as well.
2010-04-20 21:38:02 +02:00
Christian Dywan
999af1d164 Fix use of priv in GtkIconEntry code 2010-04-17 01:42:09 +02:00
Christian Dywan
aade642897 Conditionalize SSL validation on libsoup 2.29.91
The flag in the SoupMessage to verify secure connections is
only available in recent versions of libsoup. So we continue
to be oblivious to certificates with older versions.
2010-04-14 22:41:24 +02:00
Christian Dywan
2507f971ca Validate SSL against root certificates
If one of two known root certificate files is available, we
enable certificate validation, otherwise a warning is emitted.
Not using validation means that we trust any certificate. We
should consider doing the opposite.

The new property MidoriView:security is set during load
and indicates the security status. midori_view_get_security can
be used to determine the status later on.

midori_location_action_set_security_hint is implemented to
present security status visually. For now, this only changes
the icon, we need to find a more visible solution.

MidoriBrowser updates the security hint for the current view in
_midori_browser_update_interface.
2010-04-14 04:20:56 +02:00
Christian Dywan
b4a7bb928b Use view source mode for XML that isn't XHTML 2010-04-14 03:55:19 +02:00
Christian Dywan
586469fa73 Only hide find implicitly if invoked by typing, . or / 2010-04-14 03:55:19 +02:00
Christian Dywan
2ba9b1b65f Remove bookmark, open and image in window from Link context menu 2010-04-14 03:55:18 +02:00
Christian Dywan
f71e86d879 Update copyright in --version and about dialogue 2010-04-10 00:58:15 +02:00
Christian Dywan
130eb0e46a Make the license in the about dialogue localizable 2010-04-10 00:58:15 +02:00
Christian Dywan
1cdd7cc643 Add an i18n comment for Clear Private Data dialog
Since there is a button with the same wording, it is good to
point out the difference.
2010-04-08 23:54:25 +02:00
Christian Dywan
5146e5182c Add an explaining i18n comment for 'Reset Midori...' 2010-04-08 23:51:52 +02:00
Christian Dywan
b389c5bcde Refer to regular expression as PATTERN like grep 2010-04-08 23:27:04 +02:00
Christian Dywan
51b1f87400 Reindent author and license definitions 2010-04-04 21:38:16 +02:00
Christian Dywan
82ee513a96 Reindent entries, toggle_entries, encoding_entries 2010-04-04 21:38:16 +02:00
Christian Dywan
23b093a248 Reindent actions in Tools menu in MidoriBrowser 2010-04-04 21:38:16 +02:00
Christian Dywan
2b66adabf2 Reindent ui_markup definition in MidoriBrowser 2010-04-04 21:38:16 +02:00
Christian Dywan
bde7495e6c Implement -b, --blocked-uris command line option
Using a regular expression of blocked URIs makes it possible to
restrict the locations that can be visited. Any URI matching
the expression will be replaced with "http://.invalid".

The option works in --app and normal mode.
2010-04-04 01:43:56 +02:00
Christian Dywan
e886293ebf Implement 'Proxy type' preference which can be Auto, HTTP or None 2010-04-02 20:41:39 +02:00
Christian Dywan
476f64e9bc Pass the correct parent in the web-view-ready callback
This was overlooked when changing the packing of the view.
2010-04-02 19:14:22 +02:00
Christian Dywan
f2f0f16dd2 Update uses of deprecated GTK+ macros and API 2010-04-02 18:54:29 +02:00
Christian Dywan
12b4859dc7 Use gtk_widget_get_visible rather than GTK_WIDGET_VISIBLE 2010-04-02 18:38:56 +02:00
Christian Dywan
2f1ae3feba Make use of the XScreenSaver extension optional
The extension is only needed for the --inactivity-reset option,
so most users building Midori won't need it.
We also need to check for the according header file.
2010-04-01 18:25:30 +02:00
Christian Dywan
37e2216775 Implement -i, --inactivity-reset command line option
The use case is kiosk systems where leaving the application
idle for a period of time means that the user left, and the
session is reset so the next user starts off clean.

The implementation uses libXss and uses XScreenSaverQueryExtension
which means it is for now supported on X11 only.

Right now reset means closing any opens web pages and opening
the original web page.

Currently --inactivity-reset is only supported with --app.
2010-04-01 00:05:08 +02:00
Christian Dywan
832b2e9922 Change remaining GET_PRIVATE to priv in GtkIconEntry 2010-03-31 21:02:37 +02:00
Christian Dywan
67b9fc013a Use priv instead of GET_PRIVATE in GtkIconEntry 2010-03-31 19:05:17 +02:00
Arno Renevier
c3238d7c12 Change MidoriView into a subclass of GtkVBox
This change makes it possible to pack widgets, notably info bars,
into a MidoriView.
2010-03-31 00:18:42 +02:00
Arno Renevier
3e67ce525f Implement midori_view_get_web_view function
This provides access to the child web view even if we change
the internal packing of MidoriView.
2010-03-31 00:18:41 +02:00
Enrico Tröger
05488d8bd3 Filter keyboard state against modfifier default mask
The modifier state does in fact incorporate modal keys such as
NumLock. So code assuming that state be 0 if no modifier is
pressed is wrong, if NumLock, CapsLock and the like are active.

The solution is to filter out these modal keys with
gtk_accelerator_get_default_mod_mask(), and compare the result.

This fixes the problem of being unable to type keys used as
single-letter shortcuts.
2010-03-30 01:05:36 +02:00
Christian Dywan
fdf075513c Don't propagate key events more than once
This fixes problems with dead keys used to type accented letters.
2010-03-26 20:48:33 +01:00
Dale Whittaker
3f8b34853d Update year in Copyright headers 2010-03-25 23:06:38 +01:00
Dale Whittaker
ff63a5f7bd Wrap the location completion in a GtkFrame
That's what GtkEntryCompletion does as well, so it gives our
completion consistent appearance.
2010-03-24 23:26:51 +01:00
Christian Dywan
a15c70ec61 Add behavior preference 'Allow scripts to open popups' 2010-03-23 20:52:06 +01:00
Christian Dywan
9587fde97b Spawn new apps with the original executable name
Opening a web app or private mode should open Midori from the
same executable it was originally opened with.
2010-03-22 02:55:10 +01:00
Christian Dywan
3682b7755e Clarify MidoriApp signal documentation 2010-03-19 20:16:48 +01:00
Christian Dywan
b4a18b2aef Only print error if completion actually failed 2010-03-18 23:26:45 +01:00
André Stösel
555f7a57e4 Implement sokoke_resolve_hostname
sokoke_prefetch_uri is extended take a callback and user data.

sokoke_resolve_hostname is implemented for resolving hostnames
based on a maximum timeout.

sokoke_magic_uri resolves localhost and uris with a / to verify
if there is a local domain, otherwise falls back to search.

Thanks to Andy Kittner <andkit@gmx.de> for input on proceeding
the event loop while resolving asynchronously.
2010-03-17 02:20:58 +01:00
Christian Dywan
ba7f73891f Also update icon URI when a new icon was loaded 2010-03-16 00:26:38 +01:00
Samuel Creshal
f4b4c53166 Always pass view pointer to icon callback 2010-03-15 17:45:00 +01:00
Samuel Creshal
b10b311b07 Don't overwrite uri in _action_location_secondary_icon_released 2010-03-13 19:58:06 +01:00
Christian Dywan
25bbea02e2 Use a boolean 'special' to identify special pages
We used to load special pages, such as error pages as 'blank'
pages internally and try to identify them indirectly. This
breaks navigating back to and forward to such pages and makes
it difficult to allow stock icons for them.

Now a boolean 'special' is used which is reset on any
navigation attempt and any finished load. It is set only
if a special page is loaded.

This should make icons in error pages work reliably.
2010-03-13 16:46:45 +01:00
Christian Dywan
c7ee74610e Normally reload error pages with WebKitGTK+ 1.1.14
For older versions we used a workaround for reloading
special pages like error pages. This is not needed
with recent versions of WebKitGTK+.
2010-03-13 15:07:02 +01:00
André Stösel
283005e217 Implement and use sokoke_recursive_fork_protection
As Midori may call external tools to open URIs it cannot handle,
and at the same time Midori is commonly the default browser,
this can end in recursion when the external tool also calls Midori.

See the description of sokoke_recursive_fork_protection().
2010-03-12 23:31:14 +01:00
Christian Dywan
b5f8334360 Merge KatzeNet icon loading into MidoriView
MidoriView is the only place where icons are and should be
loaded, elsewhere we just use cached icons.

midori_view_get_icon_uri allows distinguishing whether a view
has an icon or a default icon, and using the filename.
2010-03-11 23:30:54 +01:00
Christian Dywan
e69ee84b6b Cancel completion if we don't have an entry 2010-03-06 19:18:09 +01:00
Christian Dywan
e7005abd55 Bail out of Export if no bookmarks or hidden 2010-03-06 19:16:52 +01:00
Christian Dywan
cf6cffe2bc Relate completion height to browser window height
To prevent the completion from obscuring other windows, it will
relate to 2/3 of the browser window and screen height respectively.
2010-03-05 00:02:07 +01:00
Christian Dywan
6ae3633dce Always append tabs added from a loaded session
We shouldn't honor user preferences for new tabs when loading
the session. Rather we append in the order they were saved in.

This is currently a hack. In the future we should consider
public API additions to insert tabs in a particular order.
2010-03-04 02:08:49 +01:00
Christian Dywan
044f1f96fb Only middle click search if the selection contains :// or Alt
Accidentally searching is annoying. Presumably when a proper
address is selected it was intentional.
2010-03-03 00:31:35 +01:00
Christian Dywan
100eea41da Implement "Export bookmarks" menu item to export to XBEL 2010-03-02 23:58:17 +01:00
Christian Dywan
fe203524fe Implement Scroll actions, defaulting to Vim direction keys 2010-03-01 00:24:46 +01:00
Christian Dywan
3f886f7153 Include previous searches in History panel items 2010-03-01 00:24:46 +01:00
Christian Dywan
de89bcd2dc Store searches and completion search in the location 2010-02-25 00:44:25 +01:00
Alexander Butenko
458c5109be Dupe OS type for ident string before using it 2010-02-22 19:03:45 +01:00
Alexander Butenko
f3f53db4d7 Fallback to the first browser if one is closed
We need to keep one browser as the default for commands
and opening files externally.
2010-02-22 19:03:45 +01:00
Christian Dywan
679ecf5d84 Don't override small toolbar icon size
The hack was originally meant to fix themes with no proper
small icons, but it doesn't really help in most cases.
2010-02-22 14:23:20 +01:00
Christian Dywan
7cf326a338 Always use Icons only for panel toolbar 2010-02-21 18:03:27 +01:00
Christian Dywan
7580ecad8e Omit micro version and arch from ident string 2010-02-20 22:31:58 +01:00
Christian Dywan
142dc432ca Use content_area instead of GtkDialog->vbox in browser 2010-02-19 19:05:29 +01:00
Alexander Butenko
e94edca766 Use the correct completion model and no static
Since the model was a static variable and only set when the
popup was created, we ended up using an obsolete model in
case multiple windows were opened and closed.

As a small optimization we don't need to retrieve the database
pointer except when compiling the statement initially.
2010-02-19 18:55:16 +01:00
Christian Dywan
10591640d1 Re-implement 'Recently visited pages' based on sqlite 2010-02-19 00:34:39 +01:00
Christian Dywan
f3f9dd2b3f Be sure to save outstanding changes to the config on quit
We intentionally set a timeout before saving changes to avoid
continuous disc access and also in case opening or closing a tab
results in an immediate crash or freezing.
But closing Midori normally should save outstanding changes.
2010-02-17 23:19:16 +01:00
Peter de Ridder
aef84bfa02 Look for MidoriView resource files dynamically 2010-02-16 00:59:43 +01:00
Peter de Ridder
4774e35932 Look for user documentation dynamically on win32 2010-02-16 00:59:43 +01:00
Peter de Ridder
c90344ac44 Look for extensions relative to program folder on win32 2010-02-16 00:59:42 +01:00
Peter de Ridder
f4b2111b40 Implement sokoke_show_uri on top of explorer for win32 2010-02-16 00:59:42 +01:00
Christian Dywan
902f836810 Improve and optimize sokoke_uri_to_ascii to parse about:version 2010-02-12 02:08:05 +01:00
Christian Dywan
f19412bc70 Pass action to cell renderer callback rather than the entry
The entry pointer is only meaningful if completion was triggered
by typing or editing in an entry.
We shouldn't render a key in results if the arrow button opened the
completion popup.
We need to check the key in the callback to avoid accidentally
working with an entry of a different window.
2010-02-12 00:36:59 +01:00
Alexander Butenko
f733f453d2 Clear history via sqlite if selected in 'Clear private data' dialog 2010-02-11 23:24:28 +01:00
Christian Dywan
de12aa0078 Revise completion key handling to directly pass or compute the key 2010-02-11 01:57:42 +01:00
Christian Dywan
f494ec090b Handle external, magic URIs from command line consistently 2010-02-11 00:28:49 +01:00
Christian Dywan
532e84ea4f Set consistent flags on all properties of MidoriWebSettings 2010-02-10 23:37:33 +01:00
Christian Dywan
713091134f Handle search engines in MidoriBrowser and simplify sokoke_magic_uri 2010-02-10 19:52:12 +01:00
Christian Dywan
0243e26bed Only split URI if no domain pattern is found in the string 2010-02-10 19:52:11 +01:00
Christian Dywan
060c0b6940 Use strncmp instead of g_str_has_prefix to optimize sokoke_magic_uri 2010-02-10 19:52:11 +01:00