Commit ddda0161 authored by Kai Lüke's avatar Kai Lüke

build: remove autodetection of features and require a recent UDisks

parent a0c7b3a1
......@@ -65,7 +65,7 @@ add_project_arguments(compiler_flags, language: 'c')
gmodule_dep = dependency('gmodule-2.0')
gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.31.0')
udisk_dep = dependency('udisks2', version: '>= 2.1.1')
udisk_dep = dependency('udisks2', version: '>= 2.7.6')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.16.0')
libsecret_dep = dependency('libsecret-1', version: '>= 0.7')
pwquality_dep = dependency('pwquality', version: '>= 1.0.0')
......@@ -75,15 +75,6 @@ libnotify_dep = dependency('libnotify', version: '>= 0.7')
liblzma_dep = dependency('liblzma', version: '>= 5.0.5')
m_dep = cc.find_library('m')
# *** Check for recent UDisks ***
udisks2_7_2_dep = dependency('udisks2', version: '>= 2.7.2', required: false)
config_h.set('HAVE_UDISKS2_7_2', udisks2_7_2_dep.found(),
description: 'Define to 1 if UDisks version >= 2.7.2 for resize, repair, check')
udisks2_7_6_dep = dependency('udisks2', version: '>= 2.7.6', required: false)
config_h.set('HAVE_UDISKS2_7_6', udisks2_7_6_dep.found(),
description: 'Define to 1 if UDisks version >= 2.7.6 for userspace mount options')
# *** Check for libsystemd ***
enable_libsystemd = get_option('libsystemd')
if enable_libsystemd
......
......@@ -139,7 +139,6 @@ on_other_fs_selected (GtkToggleButton *object, GduCreateOtherPage *page)
priv->other_fs_type = g_object_get_data (G_OBJECT (object), "id");
}
#ifdef HAVE_UDISKS2_7_2
static void
can_format_cb (UDisksManager *manager,
GAsyncResult *res,
......@@ -164,7 +163,6 @@ can_format_cb (UDisksManager *manager,
row_adder (user_data, TRUE, available, util);
g_free (util);
}
#endif
static void
row_adder (GduCreateOtherPage *page, gboolean tested, gboolean available, gchar *missing_util)
......@@ -182,14 +180,12 @@ row_adder (GduCreateOtherPage *page, gboolean tested, gboolean available, gchar
return;
}
#ifdef HAVE_UDISKS2_7_2
if (!tested)
{
udisks_manager_call_can_format (udisks_client_get_manager (priv->client), id,
NULL, (GAsyncReadyCallback) can_format_cb, page);
return;
}
#endif
if (priv->prev_other_fs_radio != NULL)
group = gtk_radio_button_get_group (priv->prev_other_fs_radio);
......
......@@ -294,7 +294,6 @@ static void on_volume_menu_item_change_passphrase (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
#ifdef HAVE_UDISKS2_7_2
static void on_volume_menu_item_resize (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
......@@ -304,7 +303,6 @@ static void on_volume_menu_item_repair (GSimpleAction *action,
static void on_volume_menu_item_check (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
#endif
static void on_volume_menu_item_edit_label (GSimpleAction *action,
GVariant *parameter,
......@@ -359,11 +357,10 @@ static const GActionEntry actions[] = {
{ "edit-partition", on_volume_menu_item_edit_partition },
{ "edit-label", on_volume_menu_item_edit_label },
{ "change-passphrase", on_volume_menu_item_change_passphrase },
#ifdef HAVE_UDISKS2_7_2
{ "resize", on_volume_menu_item_resize },
{ "check-fs", on_volume_menu_item_check },
{ "repair-fs", on_volume_menu_item_repair },
#endif
{ "configure-fstab", on_volume_menu_item_configure_fstab },
{ "configure-crypttab", on_volume_menu_item_configure_crypttab },
{ "create-partition-image", on_volume_menu_item_create_volume_image },
......@@ -2694,8 +2691,6 @@ update_device_page_for_block (GduWindow *window,
show_flags->drive_buttons |= SHOW_FLAGS_DRIVE_BUTTONS_EJECT;
}
#ifdef HAVE_UDISKS2_7_2
if (partition != NULL && g_strcmp0 (usage, "") == 0 && !read_only)
{
......@@ -2715,8 +2710,6 @@ update_device_page_for_block (GduWindow *window,
show_flags->volume_menu |= SHOW_FLAGS_VOLUME_MENU_CHECK;
}
#endif
/* Only show jobs if the volume is a partition (if it's not, we're already showing
* the jobs in the drive section)
*/
......@@ -2957,8 +2950,6 @@ update_device_page (GduWindow *window,
/* ---------------------------------------------------------------------------------------------------- */
#ifdef HAVE_UDISKS2_7_2
static void
on_volume_menu_item_resize (GSimpleAction *action,
GVariant *parameter,
......@@ -3207,8 +3198,6 @@ on_volume_menu_item_check (GSimpleAction *action,
gtk_widget_destroy (message_dialog);
}
#endif
/* ---------------------------------------------------------------------------------------------------- */
static void
......
......@@ -26,6 +26,7 @@ sources = files(
'gdunewdiskimagedialog.c',
'gdupartitiondialog.c',
'gdupasswordstrengthwidget.c',
'gduresizedialog.c',
'gdurestorediskimagedialog.c',
'gduunlockdialog.c',
'gduvolumegrid.c',
......@@ -34,10 +35,6 @@ sources = files(
'main.c'
)
if config_h.get('HAVE_UDISKS2_7_2')
sources += files('gduresizedialog.c')
endif
resource_data = files(
'ui/about-dialog.ui',
'ui/app-menu.ui',
......
......@@ -67,7 +67,6 @@ gboolean
gdu_utils_has_userspace_mount_option (UDisksBlock *block,
const gchar *option)
{
#ifdef HAVE_UDISKS2_7_6
const gchar *const *options;
gboolean ret;
......@@ -78,9 +77,6 @@ gdu_utils_has_userspace_mount_option (UDisksBlock *block,
ret = g_strv_contains (options, option);
return ret;
#else
return FALSE;
#endif
}
void
......@@ -879,7 +875,6 @@ gdu_utils_is_ntfs_available (UDisksClient *client)
if (g_once_init_enter (&once))
{
#ifdef HAVE_UDISKS2_7_2
GVariant *out_available;
gchar *missing_util;
......@@ -890,13 +885,7 @@ gdu_utils_is_ntfs_available (UDisksClient *client)
g_variant_unref (out_available);
g_free (missing_util);
}
#else
gchar *path;
path = g_find_program_in_path ("mkntfs");
if (path != NULL)
available = TRUE;
g_free (path);
#endif
g_once_init_leave (&once, (gsize) 1);
}
return available;
......@@ -904,7 +893,6 @@ gdu_utils_is_ntfs_available (UDisksClient *client)
/* ---------------------------------------------------------------------------------------------------- */
#ifdef HAVE_UDISKS2_7_2
typedef struct
{
......@@ -1064,7 +1052,6 @@ gdu_utils_can_check (UDisksClient *client,
return result ? result->available : FALSE;
}
#endif
/* ---------------------------------------------------------------------------------------------------- */
......
......@@ -77,7 +77,6 @@ gboolean gdu_utils_show_confirmation (GtkWindow *parent_window,
gboolean gdu_utils_is_ntfs_available (UDisksClient *client);
#ifdef HAVE_UDISKS2_7_2
/* Defined by libblockdev/UDisks */
typedef enum {
......@@ -103,7 +102,6 @@ gboolean gdu_utils_can_check (UDisksClient *client,
gboolean flush,
gchar **missing_util_out);
#endif
guint gdu_utils_get_max_label_length (const gchar *fstype);
......
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