Commit 612339d6 authored by Michael Catanzaro's avatar Michael Catanzaro

flatpak: Hide download directory option from preferences dialog

This option cannot possibly work
parent f5cfd01e
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* Copyright © 2017 Igalia S.L.
*
* This file is part of Epiphany.
*
* Epiphany is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Epiphany is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Epiphany. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "ephy-flatpak-utils.h"
gboolean
ephy_is_running_inside_flatpak (void)
{
return g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
}
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* Copyright © 2017 Igalia S.L.
*
* This file is part of Epiphany.
*
* Epiphany is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Epiphany is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Epiphany. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <glib.h>
gboolean ephy_is_running_inside_flatpak (void);
......@@ -20,6 +20,7 @@ libephymisc_sources = [
'ephy-favicon-helpers.c',
'ephy-file-helpers.c',
'ephy-filters-manager.c',
'ephy-flatpak-utils.c',
'ephy-gui.c',
'ephy-langs.c',
'ephy-notification.c',
......
......@@ -30,6 +30,7 @@
#include "ephy-embed-utils.h"
#include "ephy-file-chooser.h"
#include "ephy-file-helpers.h"
#include "ephy-flatpak-utils.h"
#include "ephy-gui.h"
#include "ephy-langs.h"
#include "ephy-prefs.h"
......@@ -1709,7 +1710,10 @@ setup_general_page (PrefsDialog *dialog)
G_CALLBACK (do_not_track_button_clicked_cb),
dialog);
create_download_path_button (dialog);
if (ephy_is_running_inside_flatpak ())
gtk_widget_hide (dialog->download_button_label);
else
create_download_path_button (dialog);
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment