Verified Commit 2278f4e6 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by ma1
Browse files

MB 80: Enable Mullvad Browser as a default browser

parent f86f00b8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ let ShellServiceInternal = {
      ) {
        if (this._shouldSetDefaultPDFHandler()) {
          lazy.log.info("Setting Firefox as default PDF handler");
          extraFileExtensions.push(".pdf", "FirefoxPDF");
          extraFileExtensions.push(".pdf", "MullvadBrowserPDF");
        } else {
          lazy.log.info("Not setting Firefox as default PDF handler");
        }
@@ -344,7 +344,7 @@ let ShellServiceInternal = {
    try {
      this.defaultAgent.setDefaultExtensionHandlersUserChoice(aumi, [
        ".pdf",
        "FirefoxPDF",
        "MullvadBrowserPDF",
      ]);
    } catch (err) {
      this._throwForWDBAResult(err.result || Cr.NS_ERROR_FAILURE);
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
#include <wchar.h>
#include <windows.h>

#define APP_REG_NAME_BASE L"Firefox-"
#define APP_REG_NAME_BASE L"MullvadBrowser-"

static bool IsWindowsLogonConnected() {
  WCHAR userName[UNLEN + 1];
+6 −4
Original line number Diff line number Diff line
@@ -407,10 +407,12 @@ nsWindowsShellService::CheckAllProgIDsExist(bool* aResult) {

    *aResult = result;
  } else {
    *aResult =
        CheckProgIDExists(FormatProgID(L"FirefoxURL", aumid.get()).get()) &&
        CheckProgIDExists(FormatProgID(L"FirefoxHTML", aumid.get()).get()) &&
        CheckProgIDExists(FormatProgID(L"FirefoxPDF", aumid.get()).get());
    *aResult = CheckProgIDExists(
                   FormatProgID(L"MullvadBrowserURL", aumid.get()).get()) &&
               CheckProgIDExists(
                   FormatProgID(L"MullvadBrowserHTML", aumid.get()).get()) &&
               CheckProgIDExists(
                   FormatProgID(L"MullvadBrowserPDF", aumid.get()).get());
  }

  return NS_OK;
+14 −0
Original line number Diff line number Diff line
CXXFLAGS=-Icityhash -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DCITYHASH_EXPORTS -DUNICODE
SRCS=Set.cpp
OBJS=$(subst .cpp,.o,$(SRCS))
LDFLAGS=-lole32 -lshlwapi -shared -Wl,--no-insert-timestamp
PLUGIN=ApplicationID.dll

all: $(PLUGIN)

$(PLUGIN): $(OBJS)
	$(CXX) $(OBJS) $(LDFLAGS) -o $@
	llvm-strip $@

clean:
	$(RM) $(OBJS) $(PLUGIN)
+2 −1
Original line number Diff line number Diff line
@@ -35,7 +35,8 @@ unsigned int g_stringsize;
TCHAR *g_variables;

// Indicates that an application supports dual desktop and immersive modes. In Windows 8, this property is only applicable for web browsers.
DEFINE_PROPERTYKEY(PKEY_AppUserModel_IsDualMode, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 11);
// mingw already defines this in propkey.h.
// DEFINE_PROPERTYKEY(PKEY_AppUserModel_IsDualMode, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 11);

int popstring(TCHAR *str, int len);
void pushstring(const TCHAR *str, int len);
Loading