Commit graph

1453 commits

Author SHA1 Message Date
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
Christian Dywan
ccaf696256 Remove unused KatzeNet instance from MidoriSearchAction 2010-02-10 19:52:11 +01:00
Christian Dywan
e15fe776ed Don't update the saved window size if it didn't actually change 2010-02-10 19:52:10 +01:00
Christian Dywan
13b1c9462b Connect config change notifications after creating the first browser 2010-02-10 19:52:10 +01:00
Christian Dywan
2e5c5026bc Only set config properties which are present in the config file 2010-02-07 17:19:00 +01:00
Christian Dywan
0bf27662c5 Only update location combo arrow if there is a history at all 2010-02-07 17:19:00 +01:00
Christian Dywan
14f0a091f6 Do startup timing if MIDORI_STARTTIME environment variable is set 2010-02-07 17:19:00 +01:00
Alexander Butenko
d7f42c5d72 Fix check whether we have the latest database structure 2010-02-04 22:16:01 +01:00
Alexander Butenko
4461a16a79 Refactor location completion queries to use prepared statements 2010-02-04 22:07:30 +01:00
Alexander Butenko
db334e2921 Switch to prepared statements when adding/ updating history 2010-02-04 22:07:16 +01:00
Alexander Butenko
5887067e73 Show the combo arrow if the history table contains any rows 2010-02-04 03:30:09 +01:00
Christian Dywan
af94855fee Render search actions as one line without address 2010-02-04 03:11:52 +01:00
Alexander Butenko
c273d6c73a NULL check the key before rendering suggestions 2010-02-04 02:44:30 +01:00
Christian Dywan
4d05be6a5e Do allow internal icons for views with an unreachable URI 2010-02-03 22:18:51 +01:00
Alexander Butenko
42a29682e6 Store visited pages in the history again 2010-02-03 22:12:19 +01:00
Christian Dywan
297d38e7d0 Use the correct theme detail for < GTK+ 2.18 entry progress 2010-02-03 18:41:54 +01:00
Christian Dywan
bee4615d10 Render history dates directly without age column or render callback
Resurrect sokoke_days_between for calculating age in days.
2010-02-03 01:39:13 +01:00
Christian Dywan
b4a414f371 Load about:blank in private window if URI is empty 2010-02-02 22:29:31 +01:00
Alexander Butenko
57ce6cbe21 Do not populate the history array from sqlite at startup 2010-02-02 21:02:45 +01:00
Christian Dywan
c9c9351ffb Always enable developer extras regardless of the saved value 2010-02-01 23:55:51 +01:00
Christian Dywan
c056a21d1a Unconditionally propagae modified user-agent property value 2010-02-01 23:55:51 +01:00
Christian Dywan
24759ec86f Do not add duplicate Netscape plugins to the extensions 2010-01-31 23:02:31 +01:00
Christian Dywan
41583dc940 Guard pixbuf in location action that is not used with Hildon 2010-01-31 22:29:22 +01:00
Christian Dywan
f5489973f5 Position the suggestion popup, towards the top if below is too narrow 2010-01-31 22:12:58 +01:00
Christian Dywan
4f9d726c55 Merge ident-string setting into user-agent for old and new WebKit
Since the existence of two properties causes confusion among users
we merge the two, and actually remove ident-string.
2010-01-31 22:10:24 +01:00
Christian Dywan
b447070d7d Use new GtkActivatable API in MidoriBrowser 2010-01-31 20:41:30 +01:00
Christian Dywan
cc50c6d58b Remember whether 'Clear private data when quitting' is enabled 2010-01-31 20:41:30 +01:00
Christian Dywan
5472c5d5df Fix the order of search engines in the completion 2010-01-30 17:39:32 +01:00
Christian Dywan
a436234edb Add local storage, database and offline app cache to preferences 2010-01-30 17:26:26 +01:00
Christian Dywan
3441ab45ef Default local storage, database and offline app cache to disabled 2010-01-30 17:26:03 +01:00
Christian Dywan
c43d887747 Use first search engine if the default is not set 2010-01-30 16:54:38 +01:00
Christian Dywan
3d01b7b0c3 Search engines in completion should have a distinct background 2010-01-30 01:52:22 +01:00
Christian Dywan
1a0573e2f3 Use gtk_widget_is_toplevel if available instead of the macro 2010-01-29 22:54:42 +01:00
Christian Dywan
cc6bb8fddb Lookup icon size in relation to the according screen or widget 2010-01-29 22:43:39 +01:00
Christian Dywan
37d89d0986 Move declaration in search action icon callback to the top 2010-01-29 21:13:44 +01:00
Christian Dywan
218a05049c Create and release script context for --run/ -r only when needed 2010-01-29 21:12:14 +01:00
Christian Dywan
32a62a7057 Hide the combobox arrow if the history unset or is empty 2010-01-29 18:54:58 +01:00
Christian Dywan
e5c65a160c Turn browser action helpers into macros 2010-01-28 23:50:44 +01:00
Christian Dywan
88becdd669 Destroy the thumb_view with WebKitGTK+ <> 1.1.14 2010-01-28 23:28:37 +01:00
Christian Dywan
8c62689981 Initially pressing Up in completion should select the last match 2010-01-28 23:15:49 +01:00
Christian Dywan
ca9420bdfc Always hide findbar on hotkey if visible, or when it loses focus 2010-01-28 22:35:21 +01:00
Christian Dywan
b947e5d662 Re-implement search engines in the completion 2010-01-28 22:19:00 +01:00
Christian Dywan
7065767a61 Apply scrollbar size hack to get the correct completion height
GtkEntryCompletion uses a hack to ensure that the suggestion
popup has the correct height. We do the same now.
2010-01-28 02:25:52 +01:00
Christian Dywan
3a949ac407 Use about:blank as speed dial resource root with WebKitGTK+ 1.1.14 2010-01-27 23:17:15 +01:00
Christian Dywan
38d0022ec8 Do not validate URI or title when rendering completion matches 2010-01-26 22:07:57 +01:00
Alexander Butenko
5fa82189fa Only show the completion after resizing it properly
Showing the completion early on will result in ugly flickering,
curiously not with xfwm4.
2010-01-25 22:10:39 +01:00
Christian Dywan
3bcd5700e1 Prevent the panel buttons from shrinking below minimum width 2010-01-25 21:44:26 +01:00
Christian Dywan
36becf34c8 Re-implement location arrow popup with sqlite
All uses of populating filter model, freezing and the hash table
are replaced by populating the combo box model on popup.
2010-01-25 21:44:26 +01:00
Alexander Butenko
4854cfab5d Use notify-send only as a fallback if libnotify is not available 2010-01-25 21:44:26 +01:00
Christian Dywan
65c56f26a8 Rely on sqlite for completion, otherwise disable it entirely 2010-01-25 01:19:03 +01:00
Christian Dywan
726c7c34e0 Popdown completion if key is empty or there are no matches 2010-01-25 00:06:32 +01:00
Christian Dywan
f0bfc701d9 Correct panel toggle button tooltip to say 'Hide operating controls' 2010-01-24 11:04:17 +01:00
Christian Dywan
82cb12b605 Revise and unitfy behavior modulating modifier handling
We define modfifier macros that indicate whether a modifier
indicates a new window, new tab, background tab or scrolling.

Modifier checks in the address entry, the search entry and view
now use the same consistent modifiers.
2010-01-24 11:00:52 +01:00
Alexander Butenko
dc25035e29 Sort completion matches by visits in complete days 2010-01-24 11:00:51 +01:00
Christian Dywan
edc6d6587c Update Firefox identification to Firefox 3.8 2010-01-21 18:59:34 +01:00
Christian Dywan
3a3fa03bf4 Implement 'Inspect page' menuitem with WebKitGTK+ >= 1.1.17 2010-01-21 18:59:34 +01:00
Christian Dywan
0442113b94 Popdown completion when location text is changed explicitly
Programmatic changes are done when adding, closing or switching
the current tab, and that should popdown completion.
2010-01-20 23:20:28 +01:00
Christian Dywan
8aba77a0e9 Allow button handling for selection and context menu in location entry 2010-01-20 23:16:29 +01:00
Christian Dywan
897af36ed5 Revise completion to react on paste/ cursor/ backspace
We need to avoid updating the real text afterall, but update it
in the event of a cursor movement.

We also need to trigger completion on backspace or paste.

We need to remove the timer when we popdown completion.

We need to make sure to not show completion for empty text.
2010-01-20 23:11:25 +01:00
Christian Dywan
33d90b247c Truly update text in location entry to make Home, End and friends work 2010-01-20 21:55:54 +01:00
Christian Dywan
e0a50c47d3 Clicking inside the location entry closes the completion window 2010-01-20 21:34:17 +01:00
Christian Dywan
4110b64ae8 Let hovering completion suggestions select rows 2010-01-20 21:28:44 +01:00
Christian Dywan
0145cb3171 Make clicking completion suggestion actually open the address 2010-01-20 21:25:39 +01:00
Christian Dywan
cabc3f0764 Fill in address if clicked on completion suggestion 2010-01-20 07:48:34 +01:00
Christian Dywan
0795c4f13c Add #define for gtk_widget_has_focus for GTK+ < 2.18 2010-01-20 07:11:20 +01:00
Christian Dywan
04f953dc0d Don't trigger completion on control characters 2010-01-19 07:11:51 +01:00
Alexander Butenko
4b35435c2c Order completion matches by most recent visit, ascending 2010-01-19 06:42:21 +01:00
Alexander Butenko
5bf92be622 Don't show completion if the entry already lost focus 2010-01-19 06:34:53 +01:00
Alexander Butenko
b5a23cec3a Show completion popup only after resizing the columns 2010-01-19 06:28:07 +01:00
Christian Dywan
1f3313424f Use a tree model filter visible function to limit recent items 2010-01-17 22:36:44 +01:00
Christian Dywan
c99921022f Implement completion with live sqlite queries
If sqlite is available, we can directly query results from the
database and populate our model on the fly.
2010-01-17 18:14:49 +01:00
Christian Dywan
07261e284c Re-implement location action with our own completion popup
Completion is triggered on key press only, with a delay of 150ms.

Completion can be triggered by input method usage.

The popup size adjusts to the entry size and closes if focus is lost.
2010-01-17 18:14:49 +01:00
Christian Dywan
27634e4f1e Use prepared statement to read history array instead of exec 2010-01-17 18:14:49 +01:00
Christian Dywan
7f26cc7384 Remove 'Search engines in completion' functionality
The feature doesn't work well with more than two engines.
2010-01-17 18:14:49 +01:00
Christian Dywan
2d8c8bebf5 Add G_GNUC_CONST to all Midori type functions 2010-01-17 18:14:48 +01:00
Christian Dywan
86d060f250 Change db_ helpers in main.c into direct sqlite3_ calls
This means 1 function call instead of 2 or 3 calls for each
query and should reduce some overhead.
2010-01-15 07:07:00 +01:00
Christian Dywan
8dbc86361d Implement 'Close other tabs' menu item in tab context menu 2010-01-14 02:49:19 +01:00
Dale Whittaker
96178e60b7 Check page icons of search engines first, afterwards icon names 2010-01-13 06:55:49 +01:00
Christian Dywan
789485a086 Do no extra type checking when querying the history database 2010-01-13 00:10:32 +01:00
André Stösel
4e561eeef3 Fixup the key value to allow Ctrl + Shift + Tab 2010-01-12 23:34:10 +01:00
Christian Dywan
dab3505e0c Store argument vector and display it in about:version 2010-01-12 23:34:10 +01:00
André Stösel
ca5bfa1b1d Allow the panel to expand, to stop it from ever-growing in fullscreen 2010-01-11 21:55:12 +01:00
Christoph Wickert
96a03e91bf Use FileTransfer category rather than Network for download managers 2010-01-10 22:02:46 +01:00
Christian Dywan
a4a9cd91d3 Use an alignment the image size request to adjust close buttons 2010-01-10 22:02:46 +01:00
Christian Dywan
16947894d4 Make %u in command lines work just like %s
This is not strictly by the spec but it works in practise.
2010-01-10 22:02:46 +01:00
Christian Dywan
9cf6f6a3cc Move around preferences so Open panels in Windows is always shown 2010-01-10 07:22:21 +01:00
André Stösel
de4eede5cc It should be 'gint position', not gboolean 2010-01-10 07:22:20 +01:00
Christian Dywan
a7cbc73981 Add i18n comments for Paste Proceed as well as Go to next/ previous page 2010-01-10 07:22:20 +01:00
Christian Dywan
9db458ba9c Hide panel toolbooks when there is only a controls button in there 2010-01-08 01:43:33 +01:00
Christian Dywan
317eefa1c8 Prevent a recurive loop when toggling operating controls 2010-01-08 01:08:37 +01:00
Christian Dywan
dba473e069 Move the logo on special pages to the background 2010-01-08 00:42:23 +01:00
Christian Dywan
a8cd1499ab Move panel icons to the bottom and always remove the labels
This is an attempt at simplifying the panel, in the hope
that it is still discoverable enough.
2010-01-08 00:16:56 +01:00
Christian Dywan
cbebda0db4 Remove Plugins panel, instead add Netscape plugins to Extensions
Netscape Plugins cannot actually be activated or deactivated
at the moment.
2010-01-08 00:16:56 +01:00
Christian Dywan
f4c7df59b4 Connect accelerators of implicitly created panel actions 2010-01-08 00:16:55 +01:00
Christian Dywan
139132afbd Implement about:version page with important build configuration aspects 2010-01-08 00:16:55 +01:00
André Stösel
5c89cc8bd2 Spell accept language header as 'Accept-Language' 2010-01-08 00:16:55 +01:00
André Stösel
b5b32495f9 Implement 'Preferred languages' preference, ACCEPT_LANGUAGE header 2010-01-07 01:35:51 +01:00
Christian Dywan
b7d09f38bb Handle window raising without the help of unique 2010-01-06 23:40:46 +01:00
Christian Dywan
996f1a86d3 Omit an unused config variable when loading extensions 2010-01-06 23:40:45 +01:00
Christian Dywan
5d5d2517c8 Rename 'Spell checking languages' to 'Spelling dictionaries' 2010-01-06 23:40:45 +01:00
Christian Dywan
66d72c915e Add a label 'Spell checking languages:' in front of the spell entry
The entry by itself is confusing to many users, and a label is better
than nothing while we don't have a better interface.
2010-01-04 23:42:30 +01:00