summaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)Author
2023-01-03global: Convert use of `SoupURI` to use `GUri`Patrick Steinhardt
The `SoupURI` interface has been deprecated in libsoup 3.0 in favor of `GUri`, which is part of glib 2.66 and newer. Convert the codebase to use the latter.
2023-01-03js.c: Remove unused functionPatrick Steinhardt
Remove the unused code contained in "js.c" and its header file. The functionality has been replaced by utility functions in "util.c".
2023-01-03main: fix compilation with FEATURE_NO_XEMBEDPatrick Steinhardt
When FEATURE_NO_XEMBED is defined then we don't support using the Xembed interface, which will cause us to set the `VIMB_XID` envvar. With 55fb9cc (Add new env VIMB_WIN_ID to hold the gtk window id., 2021-01-25) a related feature was added that causes us to expose the Gtk window ID via the `VIMB_WIN_ID` environment variable. This feature also depends on X-specific information because it uses `GDK_WINDOW_XID()` to derive the window ID. This change thus broke Wayland-only environments. Fix compilation by extending the `ifdef` to guard the logic that both sets the `VIMB_XID` and the `VIMB_WIN_ID`.
2021-10-15Used macro to define status pattern and values together.Daniel Carl
Use a more flexible way to specify how the setting flags are shown on statusbar.
2021-10-15status bar settings now configurable with config.hSadoon AlBader
2021-10-15use macros instead of reinventing the wheelSadoon AlBader
2021-10-15a better fix for scroll percentageSadoon AlBader
2021-10-15change scroll_percent from guint to guint16Sadoon AlBader
2021-10-15new feature: show some settings on statusbarrafa_99
2021-09-25Updated Cookies Settingsrafa_99
2021-09-25Removed and set incognito mode on by default with cookiesrafa_99
2021-09-25Project branch offrafa_99
2021-09-24Removed History and Last Opened Historyrafa_99
2021-01-25Add new env VIMB_WIN_ID to hold the gtk window id.Daniel Carl
Fixes #658.
2021-01-07Fix none registered webextension in ephemeral mode.Daniel Carl
Fixes #652
2021-01-03remove useless printfCássio
2020-12-22removed unecessary includeCássio
2020-12-22added support for web notifications via dbusCássio
2020-10-13Move some file to $XDG_DATA_HOME #582.Daniel Carl
Do not store all files in XDG_CONFIG_HOME.
2020-04-15Allow to push link url to queue by <S-LeftMouse> #610.Daniel Carl
2020-02-29Allow to set scroll-multiplier #602.Daniel Carl
2020-02-12fix conditional xembed compilationRaphael Gosselin
2020-01-04Remove expansion of '%' #584.Daniel Carl
The % is often used in urls and in case of the x-hint-command those are feed to :shellcmd and will be replaced by current URL. This made the x-hint-command unusable on some search engines. The expansion of % to the current URL also required to give the current browser state to the expansion logic and to feed it to all callers of this too. This bloated the code. This patch removes the % expansion which was a redundant alternative to $VIMB_URI.
2019-12-18Added --cmd,-C option to give ex commands on startup #342.Daniel Carl
2019-11-18Fix none working geolocation=always #580.Daniel Carl
The 'permission-request' return value is only used to identify if the callback made a decision or not.
2019-11-18Merge branch 'geolocation' of https://github.com/fjallarefur/vimb.Daniel Carl
2019-11-18Add geolocation settingAlva
This setting lets users automatically reject/allow geolocation access. The default is to ask every time, like before.
2019-11-11autocmd: implement new LoadStarting eventPatrick Steinhardt
The first autocommand event that is being triggered when loading a website is the "LoadStarted" event. LoadStarted gets triggered when the web view has started loading of the page, notably after the initial request has been sent. Thus, this event comes too late to change settings that would modify the initial request, like e.g. the user agent. Implement a new event LoadStarting that triggers immediately before performing the initial load and thus before LoadStarted. As WebKit does not provide any signal for this, we have to manually trigger this event when executing any load or navigation actions. The best place to piggy-back on WebKit itself is in fact `decide_navigation_action`, which will get executed on clicks, history navigation and `load_uri`. Like this, there is only a single location that needs to trigger the new event. This change enables one to modify configuration like the user agent for certain websites, which was not possible with "LoadStarted".
2019-06-15Use ephemeral webview if incognito option is used #562Daniel Carl
Also removed obsolete 'private-browsing' setting.
2019-06-14Fixed memory allocation errors in incognito mode.Daniel Carl
Fix crash with message "free(): invalid next size (fast)" when a new instance was spawned.
2019-06-08Give --incognito option also to new spawned instances #562.Daniel Carl
2019-06-08Rename option ephemeral to incognito #562.Daniel Carl
2019-06-04Added ephemeral mode #562.Daniel Carl
If vimb is started with --ephemeral option no files are created by default and no persistent cookie manager is used.
2019-05-20Avoid double free in on_webview_notify_uri #561.Daniel Carl
Thank to Valérian Rousset for pointing this out. Also change the until_sanitize_uri function to return given uri in case an error occurred during sanitization process to reduce cases where this function returns NULL.
2019-05-20Fix NULL ret of util_sanitize_uritharvik
2019-05-19Add external download command #543 #348.Daniel Carl
Added 'download-command' setting to configure a command/script that handles the download of an uri. With the new setting flag 'download-use-external' can be decided if the external download command is used to download an uri or the built in downloader.
2019-04-24Fix segfault on open in new tabe from context menu #556.Daniel Carl
2019-03-30Change hover link url on status bar via direct function.Daniel Carl
Do not emit fake signal to show the current hovered url from hinting shown on the left of the statusbar. Instead call a function which writes the url to the statusbar.
2019-03-25Use webkit_uri_for_display().Daniel Carl
Use this function for shown url for IDN homograph mitigation.
2019-03-24Prevent opening links into new window #544.Daniel Carl
Added setting 'prevent-newwindow' to enforce opening links into same window even if they are crafted by `target="_blank"` or using `window.open()`. This option does not change the behaviour for links fired by hinting.
2019-03-13Split policy decision into parts.Daniel Carl
Also make always a decision.
2019-03-12Allow to not maximize window via option --no-maximize #483.Daniel Carl
2019-02-13Avoid double client destroy in case of webview close #537.Daniel Carl
2019-01-21Replace deprecated gtk_css_provider_get_default.Daniel Carl
2019-01-18Allow to show video in fullscreen if requested.Daniel Carl
If JavaScript calls element.webkitRequestFullScreen webkit switches vimb into full screen mode. But the statusbar and the input box where still shown. So now vimb hides the statusbar and the input box to allow videos to be show on the whole screen.
2019-01-10Always generate version from git if possible #532.Daniel Carl
2018-10-12Use stat(2) to retrieve the file permissions modeLeonardo Taccari
Remove the mode arguments from util_file_prepend_line(), util_file_pop_line() and util_file_set_content(). Both util_file_prepend_line() and util_file_pop_line() just calls util_file_set_content() so stat(2) can be used there and if it fails the 0600 is used as a fallback. Thanks to @fanglingsu for reviews and suggestions!
2018-10-11Replace g_file_set_contents().Daniel Carl
The g_file_set_contents performs atomic write to file by creating a temporary file, writing to it and renaming it. But during the creation of the temporary file, the mode is set hard to 0666. So our files will silently always change their mode in case we processed their content. This patch adds the util_file_set_content() function which follows the same approach, but allows to set the mode that is used to create the temporary file. So the file is created with the right permissions.
2018-10-10Add a mode (in chmod(2) context) argument to util_get_filepath()Leonardo Taccari
Add a mode argument to util_get_filepath() in order to adjust file permissions when creating file. Adjust all util_get_filepath() call and file permissions making them readable and writable only by the user.
2018-10-08Setup dbus server before the webextension #438.Daniel Carl
Not sure if this changes anything, but it's a good choice to setup the server before telling webkit where to look for webextensions.