Commit 0baaa020 authored by Jeremy Bicha's avatar Jeremy Bicha

New upstream version 3.32.0

parents b061ca9b 74802dfb
......@@ -2,13 +2,13 @@ GNOME MultiWriter Release Notes
* Write NEWS entries in the same format as usual.
git log --format="%s" GNOME_MULTI_WRITER_3_28_0.. | grep -i -v trivial | grep -v Merge | uniq
git log --format="%s" GNOME_MULTI_WRITER_3_30_0.. | grep -i -v trivial | grep -v Merge | uniq
Add any user visible changes into ../data/appdata/org.gnome.MultiWriter.appdata.xml.in
* Commit changes in git:
git commit -a -m "Release version 3.30.0"
git tag -s GNOME_MULTI_WRITER_3_30_0 -m "==== Version 3.30.0 ===="
git commit -a -m "Release version 3.32.0"
git tag -s GNOME_MULTI_WRITER_3_32_0 -m "==== Version 3.32.0 ===="
ninja dist
git push --tags
git push
......
......@@ -62,7 +62,7 @@ fi
%doc README.md AUTHORS
%{_bindir}/%{name}
%{_libexecdir}/%{name}-probe
%{_datadir}/appdata/org.gnome.MultiWriter.appdata.xml
%{_datadir}/metainfo/org.gnome.MultiWriter.appdata.xml
%{_datadir}/applications/org.gnome.MultiWriter.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.MultiWriter.gschema.xml
%{_datadir}/icons/hicolor/*/apps/*
......
......@@ -61,6 +61,14 @@
Validate with `appstream-util validate *.appdata.xml`
-->
<releases>
<release date="2019-03-08" version="3.32.0">
<description>
<p>
This is the first stable release for GNOME 3.32 which updates several
translations and fixes some build issues.
</p>
</description>
</release>
<release date="2018-09-04" version="3.30.0">
<description>
<p>
......
......@@ -14,7 +14,7 @@
<homepage rdf:resource="https://wiki.gnome.org/Apps/MultiWriter" />
<download-page rdf:resource="http://download.gnome.org/sources/gnome-multi-writer/" />
<bug-database rdf:resource="https://bugzilla.gnome.org/browse.cgi?product=gnome-multi-writer" />
<bug-database rdf:resource="https://gitlab.gnome.org/GNOME/gnome-multi-writer/issues/" />
<maintainer>
<foaf:Person>
......
project('gnome-multi-writer', 'c',
version : '3.30.0',
version : '3.32.0',
default_options : ['warning_level=1'],
meson_version : '>=0.37.0'
meson_version : '>=0.46.0'
)
conf = configuration_data()
......@@ -36,6 +36,7 @@ test_args = [
'-Wno-strict-aliasing',
'-Wno-suggest-attribute=format',
'-Wno-unused-parameter',
'-Wno-cast-function-type',
'-Wold-style-definition',
'-Woverride-init',
'-Wpacked',
......@@ -62,20 +63,15 @@ endforeach
# enable full RELRO where possible
# FIXME: until https://github.com/mesonbuild/meson/issues/1140 is fixed
global_link_args = []
test_link_args = [
'-Wl,-z,relro',
'-Wl,-z,now',
]
foreach arg: test_link_args
if cc.has_argument(arg)
global_link_args += arg
if cc.has_link_argument(arg)
add_project_link_arguments(arg, language : 'c')
endif
endforeach
add_global_link_arguments(
global_link_args,
language: 'c',
)
prefixed_localedir = join_paths(get_option('prefix'), get_option('localedir'))
prefixed_libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
......
bs
ca
cs
da
de
el
en_GB
......@@ -15,6 +16,7 @@ hr
hu
id
it
ja
nb
nl
oc
......
......@@ -7,5 +7,4 @@ data/org.gnome.MultiWriter.policy.in
src/gmw-device.c
src/gmw-main.c
src/gmw-main.ui
src/gmw-menus.ui
src/gmw-probe.c
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -28,11 +28,7 @@
#include <udisks/udisks.h>
#define GMW_TYPE_DEVICE (gmw_device_get_type ())
G_DECLARE_DERIVABLE_TYPE (GmwDevice, gmw_device, GMW, DEVICE, GObject)
struct _GmwDeviceClass {
GObjectClass parent_class;
};
G_DECLARE_FINAL_TYPE (GmwDevice, gmw_device, GMW, DEVICE, GObject)
typedef enum {
GMW_DEVICE_STATE_UNKNOWN,
......@@ -46,58 +42,58 @@ typedef enum {
} GmwDeviceState;
GmwDevice *gmw_device_new (void);
const gchar *gmw_device_get_icon (GmwDevice *device);
gchar *gmw_device_get_description (GmwDevice *device);
gchar *gmw_device_get_quirk_string (GmwDevice *device);
GmwDeviceState gmw_device_get_state (GmwDevice *device);
UDisksBlock *gmw_device_get_udisks_block (GmwDevice *device);
const gchar *gmw_device_get_name (GmwDevice *device);
const gchar *gmw_device_get_block_path (GmwDevice *device);
const gchar *gmw_device_get_hub_label (GmwDevice *device);
const gchar *gmw_device_get_hub_id (GmwDevice *device);
guint8 gmw_device_get_hub_root (GmwDevice *device);
const gchar *gmw_device_get_object_path (GmwDevice *device);
const gchar *gmw_device_get_order_display (GmwDevice *device);
const gchar *gmw_device_get_order_process (GmwDevice *device);
const gchar *gmw_device_get_sysfs_path (GmwDevice *device);
gdouble gmw_device_get_complete (GmwDevice *device);
gdouble gmw_device_get_speed_write (GmwDevice *device);
gdouble gmw_device_get_speed_read (GmwDevice *device);
guint64 gmw_device_get_size (GmwDevice *device);
const gchar *gmw_device_get_icon (GmwDevice *self);
gchar *gmw_device_get_description (GmwDevice *self);
gchar *gmw_device_get_quirk_string (GmwDevice *self);
GmwDeviceState gmw_device_get_state (GmwDevice *self);
UDisksBlock *gmw_device_get_udisks_block (GmwDevice *self);
const gchar *gmw_device_get_name (GmwDevice *self);
const gchar *gmw_device_get_block_path (GmwDevice *self);
const gchar *gmw_device_get_hub_label (GmwDevice *self);
const gchar *gmw_device_get_hub_id (GmwDevice *self);
guint8 gmw_device_get_hub_root (GmwDevice *self);
const gchar *gmw_device_get_object_path (GmwDevice *self);
const gchar *gmw_device_get_order_display (GmwDevice *self);
const gchar *gmw_device_get_order_process (GmwDevice *self);
const gchar *gmw_device_get_sysfs_path (GmwDevice *self);
gdouble gmw_device_get_complete (GmwDevice *self);
gdouble gmw_device_get_speed_write (GmwDevice *self);
gdouble gmw_device_get_speed_read (GmwDevice *self);
guint64 gmw_device_get_size (GmwDevice *self);
void gmw_device_set_state (GmwDevice *device,
void gmw_device_set_state (GmwDevice *self,
GmwDeviceState device_state);
void gmw_device_set_udisks_block (GmwDevice *device,
void gmw_device_set_udisks_block (GmwDevice *self,
UDisksBlock *udisks_block);
void gmw_device_set_udisks_drive (GmwDevice *device,
void gmw_device_set_udisks_drive (GmwDevice *self,
UDisksDrive *udisks_drive);
void gmw_device_set_usb_device (GmwDevice *device,
void gmw_device_set_usb_device (GmwDevice *self,
GUsbDevice *usb_device);
void gmw_device_set_name (GmwDevice *device,
void gmw_device_set_name (GmwDevice *self,
const gchar *name);
void gmw_device_set_block_path (GmwDevice *device,
void gmw_device_set_block_path (GmwDevice *self,
const gchar *block_path);
void gmw_device_set_hub_id (GmwDevice *device,
void gmw_device_set_hub_id (GmwDevice *self,
const gchar *hub_id);
void gmw_device_set_hub_label (GmwDevice *device,
void gmw_device_set_hub_label (GmwDevice *self,
const gchar *hub_label);
void gmw_device_set_object_path (GmwDevice *device,
void gmw_device_set_object_path (GmwDevice *self,
const gchar *object_path);
void gmw_device_set_order_display (GmwDevice *device,
void gmw_device_set_order_display (GmwDevice *self,
const gchar *order_display);
void gmw_device_set_order_process (GmwDevice *device,
void gmw_device_set_order_process (GmwDevice *self,
const gchar *order_process);
void gmw_device_set_complete_read (GmwDevice *device,
void gmw_device_set_complete_read (GmwDevice *self,
gdouble complete);
void gmw_device_set_complete_write (GmwDevice *device,
void gmw_device_set_complete_write (GmwDevice *self,
gdouble complete);
void gmw_device_set_speed_write (GmwDevice *device,
void gmw_device_set_speed_write (GmwDevice *self,
gdouble speed_write);
void gmw_device_set_speed_read (GmwDevice *device,
void gmw_device_set_speed_read (GmwDevice *self,
gdouble speed_read);
void gmw_device_set_write_alloc (GmwDevice *device,
void gmw_device_set_write_alloc (GmwDevice *self,
gdouble write_alloc);
void gmw_device_set_error (GmwDevice *device,
void gmw_device_set_error (GmwDevice *self,
const GError *error);
G_END_DECLS
......
This diff is collapsed.
......@@ -130,17 +130,33 @@
<property name="receives_default">True</property>
<property name="halign">end</property>
<child>
<object class="GtkImage" id="image_settings">
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">22</property>
<property name="icon_name">open-menu-symbolic</property>
<property name="icon_size">1</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_import">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon_name">document-open-symbolic</property>
<property name="icon_size">1</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">3</property>
</packing>
</child>
</object>
......
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<menu id="app-menu">
<section>
<item>
<attribute name="label" translatable="yes" comments="TRANSLATORS: app menu item for the file chooser">Import ISO file…</attribute>
<attribute name="action">app.import</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes" comments="TRANSLATORS: app menu item for the About UI">_About</attribute>
<attribute name="action">app.about</attribute>
</item>
<item>
<attribute name="label" translatable="yes" comments="TRANSLATORS: app menu item for Quit">_Quit</attribute>
<attribute name="action">app.quit</attribute>
<attribute name="accel"><![CDATA[<Ctrl>Q]]></attribute>
</item>
</section>
</menu>
</interface>
......@@ -67,11 +67,8 @@ typedef struct {
static guint8 *
gmw_probe_get_random_data (guint len)
{
guint i;
guint8 *data;
data = g_new (guint8, len);
for (i = 0; i < len; i++)
guint8 *data = g_new (guint8, len);
for (guint i = 0; i < len; i++)
data[i] = g_random_int_range ('a', 'z');
return data;
}
......@@ -176,16 +173,12 @@ gmw_probe_device_data_save (GmwProbeDevice *dev,
GCancellable *cancellable,
GError **error)
{
GmwProbeBlock *item;
guint64 chunk_size;
guint i;
/* aim for roughtly the same number of chunks for all device sizes */
chunk_size = dev->disk_size / 256;
guint64 chunk_size = dev->disk_size / 256;
g_debug ("using chunk size of %" G_GUINT64_FORMAT "MB",
chunk_size / ONE_MB);
for (i = 1; i < 40; i++) {
item = g_new0 (GmwProbeBlock, 1);
for (guint i = 1; i < 40; i++) {
GmwProbeBlock *item = g_new0 (GmwProbeBlock, 1);
item->valid = TRUE;
item->offset = g_random_int_range (1, 0xff);
item->address = i * chunk_size;
......@@ -214,11 +207,8 @@ gmw_probe_device_data_set_dummy (GmwProbeDevice *dev,
GCancellable *cancellable,
GError **error)
{
GmwProbeBlock *item;
guint i;
for (i = 0; i < dev->data_save->len; i++) {
item = g_ptr_array_index (dev->data_save, i);
for (guint i = 0; i < dev->data_save->len; i++) {
GmwProbeBlock *item = g_ptr_array_index (dev->data_save, i);
item->bytes_wrote = gmw_probe_device_write (dev,
item->address +
item->offset,
......@@ -239,18 +229,14 @@ gmw_probe_device_data_verify (GmwProbeDevice *dev,
GCancellable *cancellable,
GError **error)
{
GmwProbeBlock *item;
guint i;
guint32 offset;
g_autofree guint8 *wbuf2 = NULL;
wbuf2 = g_new (guint8, ONE_BLOCK + 0xff);
g_autofree guint8 *wbuf2 = g_new (guint8, ONE_BLOCK + 0xff);
for (i = 0; i < dev->data_save->len; i++) {
item = g_ptr_array_index (dev->data_save, i);
GmwProbeBlock *item = g_ptr_array_index (dev->data_save, i);
/* use a random offset to confuse drives that are just saving
* the address and data in some phantom FAT */
offset = g_random_int_range (1, 0xff);
guint32 offset = g_random_int_range (1, 0xff);
item->bytes_read = gmw_probe_device_read (dev,
item->address +
item->offset - offset,
......@@ -276,7 +262,7 @@ gmw_probe_device_data_verify (GmwProbeDevice *dev,
/* if we aborted early, the rest of the drive is junk */
for (i = i; i < dev->data_save->len; i++) {
item = g_ptr_array_index (dev->data_save, i);
GmwProbeBlock *item = g_ptr_array_index (dev->data_save, i);
item->valid = FALSE;
}
......@@ -288,11 +274,8 @@ gmw_probe_device_data_restore (GmwProbeDevice *dev,
GCancellable *cancellable,
GError **error)
{
GmwProbeBlock *item;
guint i;
for (i = 0; i < dev->data_save->len; i++) {
item = g_ptr_array_index (dev->data_save, i);
for (guint i = 0; i < dev->data_save->len; i++) {
GmwProbeBlock *item = g_ptr_array_index (dev->data_save, i);
if (!item->valid)
continue;
item->bytes_wrote = gmw_probe_device_write (dev,
......@@ -312,9 +295,6 @@ gmw_probe_device_data_restore (GmwProbeDevice *dev,
static gboolean
gmw_probe_scan_device (GmwProbeDevice *dev, GCancellable *cancellable, GError **error)
{
GmwProbeBlock *item;
guint i;
/* open block device */
if (!gmw_probe_device_open (dev, error))
return FALSE;
......@@ -357,8 +337,8 @@ gmw_probe_scan_device (GmwProbeDevice *dev, GCancellable *cancellable, GError **
}
/* sanity check for really broken devices */
for (i = 0; i < dev->data_save->len; i++) {
item = g_ptr_array_index (dev->data_save, i);
for (guint i = 0; i < dev->data_save->len; i++) {
GmwProbeBlock *item = g_ptr_array_index (dev->data_save, i);
if (item->bytes_read != item->bytes_wrote) {
g_set_error (error,
GMW_ERROR,
......@@ -392,8 +372,8 @@ gmw_probe_scan_device (GmwProbeDevice *dev, GCancellable *cancellable, GError **
return FALSE;
/* get results */
for (i = 0; i < dev->data_save->len; i++) {
item = g_ptr_array_index (dev->data_save, i);
for (guint i = 0; i < dev->data_save->len; i++) {
GmwProbeBlock *item = g_ptr_array_index (dev->data_save, i);
if (!item->valid) {
g_set_error (error,
GMW_ERROR,
......@@ -456,14 +436,12 @@ gmw_probe_use_device (GUdevClient *udev_client,
static gboolean
gmw_probe_is_block_device_valid (const gchar *block_device)
{
guint i;
/* dev prefix */
if (!g_str_has_prefix (block_device, "/dev/"))
return FALSE;
/* has no partition number */
for (i = 5; block_device[i] != '\0'; i++) {
for (guint i = 5; block_device[i] != '\0'; i++) {
if (g_ascii_isdigit (block_device[i]))
return FALSE;
}
......@@ -483,13 +461,12 @@ gmw_probe_is_block_device_mounted (const gchar *block_device)
int
main (int argc, char **argv)
{
GOptionContext *context;
const gchar *subsystems[] = { "usb", NULL };
gboolean verbose = FALSE;
int status = EXIT_SUCCESS;
_cleanup_object_unref_ GUdevClient *udev_client = NULL;
g_autoptr(GError) error = NULL;
g_autoptr(GCancellable) cancellable = NULL;
g_autoptr(GError) error = NULL;
g_autoptr(GOptionContext) context = NULL;
const GOptionEntry options[] = {
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
......@@ -505,9 +482,8 @@ main (int argc, char **argv)
context = g_option_context_new (NULL);
g_option_context_add_main_entries (context, options, NULL);
if (!g_option_context_parse (context, &argc, &argv, &error)) {
status = EXIT_FAILURE;
g_print ("Failed to parse command line: %s\n", error->message);
goto out;
return EXIT_FAILURE;
}
if (verbose)
......@@ -515,32 +491,27 @@ main (int argc, char **argv)
/* valid arguments */
if (argc != 2 || !gmw_probe_is_block_device_valid (argv[1])) {
status = EXIT_FAILURE;
g_print ("Block device required as argument\n");
goto out;
return EXIT_FAILURE;
}
/* already mounted */
if (gmw_probe_is_block_device_mounted (argv[1])) {
status = EXIT_FAILURE;
g_print ("Partition mounted from block device\n");
goto out;
return EXIT_FAILURE;
}
/* probe device */
cancellable = g_cancellable_new ();
udev_client = g_udev_client_new (subsystems);
if (!gmw_probe_use_device (udev_client, argv[1], cancellable, &error)) {
status = EXIT_FAILURE;
if (g_error_matches (error, GMW_ERROR, GMW_ERROR_IS_FAKE)) {
g_print ("Device is FAKE: %s\n", error->message);
} else {
g_print ("Failed to scan device: %s\n", error->message);
}
goto out;
return EXIT_FAILURE;
}
g_print ("Device is GOOD\n");
out:
g_option_context_free (context);
return status;
return EXIT_SUCCESS;
}
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/MultiWriter">
<file compressed="true" alias="gtk/menus.ui">gmw-menus.ui</file>
<file compressed="true">gmw-main.ui</file>
<file compressed="true" alias="usb-symbolic.svg">usb.svg</file>
</gresource>
......
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