Commit Graph

2333 Commits

Author SHA1 Message Date
Curtis Gedak e5a426d0b3 Add xdg-su program to gparted.desktop file (#699626)
Add xdg-su to list of graphical switch-to-root programs to be
considered for gparted.desktop file.

The openSUSE GNU/Linux distribution includes the program xdg-su by
default for graphically prompting for root privilege.

This enhancement enables a user to compile and install gparted from
source code on openSUSE and have the gparted menu entry graphically
prompt for root privilege.

Bug #699626 - Enable gparted.desktop to prompt for root on default
              openSUSE installation
2013-05-05 11:48:56 +01:00
Curtis Gedak c532db0e55 Append -git to version for continuing development 2013-04-30 10:36:02 -06:00
Curtis Gedak 24458c2224 ========== gparted-0.16.1 ========== 2013-04-30 09:17:54 -06:00
Mike Fleetwood b7b2af4f5e Fix autoconf check for set_default_icon_name method (#695279)
The autoconf check for the Gtk::Window::set_default_icon_name() method
was failing to detect its availability, but only on Ubuntu >= 11.10.

Turns out that the autoconf check incorrectly defined the link libraries
via the C++ flags variable CXXFLAGS, rather than the LIBS variable.
This resulted in the libraries being specified in the wrong order on the
command line.  The test only failed when Ubuntu also added the
"--as-needed" flag to the linker by default [1] which required the
libraries to be correctly specified at the end of the command line.

[1] Ubuntu 11.10 Release Notes, GCC 4.6 Toolchain
    https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes#GCC_4.6_Toolchain

This fixes commit:

    a042107883
    Only use Gtk::Window::set_default_icon_name method when available

Bug #695279 - GParted doesn't compile on RHEL / CentOS 5.9
2013-04-29 15:42:18 -06:00
Phillip Susi 9475731ac8 Avoid glibmm GSource bug/crash (again) (#697727)
The previous commit missed one glibmm GSource wrapper in the form of the
io watch for the PipeCapture class.  Convert this one to use glib
directly as well.

Bug #697727 - Segfault in livecd Gparted v 0.15.0-3 when copying
              partition
2013-04-29 18:42:53 +01:00
Mike Fleetwood 1386984def Add copyright notice to PipeCapture .cc and .h files 2013-04-28 13:51:06 -06:00
Mike Fleetwood d6baac2546 Only install fallback icon when required (#695279)
Applications are moving away from storing icons in /usr/share/pixmaps,
instead preferring /usr/share/icons/hicolor/$SIZE/apps, so only install
the fallback icon when GParted requires it.

Bug #695279 - GParted doesn't compile on RHEL / CentOS 5.9
2013-04-28 13:51:06 -06:00
Mike Fleetwood b09d6035cd Add fallback method for specifying GParted icon (#695279)
On RHEL / CentOS 5.9 GParted couldn't set an icon as the
set_default_icon_name() method is not available.  See commit [1] for
details.

Re-add the old set_icon_from_file() method as a fallback and re-install
a GParted pixmap as was used before commit [2].

Commit [1]:
    a042107883
    Only use Gtk::Window::set_default_icon_name method when available

Commit [2]:
    f5a80bc904
    Enabled GParted to use themed app icon (Tango theme)

Bug #695279 - GParted doesn't compile on RHEL / CentOS 5.9
2013-04-28 13:51:06 -06:00
Mike Fleetwood bae9db222b Work around failure to execute commands with old glibmm (#695279)
On RHEL / CentOS 5.9 GParted failed to run any external commands and
instead reported the following warnings to the terminal:

    # src/gpartedbin
    ======================
    libparted : 1.8.1
    ======================
    Failed to change to directory '' (No such file or directory)
    Failed to change to directory '' (No such file or directory)
    Failed to change to directory '' (No such file or directory)
    ...

Utils::execute_command() and FileSystem::execute_command() passed a zero
length string for the working directory to
Glib::spawn_async_with_pipes() to mean don't change directory.  Instead
glibmm just tried to change to the directory with a zero length name.
This was fixed with glibmm >= 2.21.2 released July 2009, however RHEL /
CentOS 5.9 only has glibmm 2.12.10.

Relevant glibmm fix:
    Treat empty Glib::spawn*() working dir as unset
    https://git.gnome.org/browse/glibmm/commit/?id=8a7805cbbe6d268e975669349beb4e82d971537d

Fix by simply specifying ".", the current working directory, as the
directory to change into before executing all commands.

Bug #695279 - GParted doesn't compile on RHEL / CentOS 5.9
2013-04-28 13:51:06 -06:00
Mike Fleetwood 5f06ea3369 Further RHEL / CentOS 5.9 compile fixes (#695279)
Glib::ustring::compose() method requires glibmm >= 2.16, but RHEL /
CentOS 5.9 only provides glibmm 2.12.  Replace with String::ucompose()
as is used everywhere else in the code.

Add missing include for kill() and SIGINT declarations.

Bug #695279 - GParted doesn't compile on RHEL / CentOS 5.9
2013-04-28 13:51:06 -06:00
Mike Fleetwood d44971328a Recognise HFSX variant as an HFS+ file system (#698876)
Roughly HFSX is a case sensitive version of the HFS+ file system.

Parted reports such a file system as "hfsx" rather than "hfs+".

    # mkfs.hfsplus -v "case insensitive hfs+" /dev/sda7
    Initialized /dev/sda7 as a 1024 MB HFS Plus volume

    # mkfs.hfsplus -s -v "case sensitive hfs+" /dev/sda8
    Initialized /dev/sda8 as a 1024 MB HFS Plus volume

    # parted /dev/sda print
    ...
    Number  Start   End     Size    Type      File system     Flags
    ...
     7      356GB   357GB   1074MB  logical   hfs+
     8      357GB   358GB   1074MB  logical   hfsx

    # blkid /dev/sda[78]
    /dev/sda7: LABEL="case insensitive hfs+" TYPE="hfsplus"
    /dev/sda8: LABEL="case sensitive hfs+" TYPE="hfsplus"

Make GParted recognise HFSX file system variants too.

Closes Bug #698876 - GParted fails to recognize HFS+ partition (possible
                     due to disabled journaling)
2013-04-28 12:47:37 -06:00
Curtis Gedak ead2a1a53f Append -git to version for continuing development 2013-04-24 10:37:43 -06:00
Curtis Gedak 02d3d4a217 ========== gparted-0.16.0 ========== 2013-04-24 09:13:44 -06:00
Daniel Șerbănescu 6e2de3b47a Updated Romanian Translation 2013-04-22 14:42:00 +02:00
Wolfgang Stöggl 66b272f575 [l10n] Updated German documentation translation 2013-04-20 20:47:43 +02:00
Wolfgang Stöggl 27f4d5169f [l10n] Updated German translation 2013-04-20 20:43:30 +02:00
Gabor Kelemen 526a82bf30 Updated Hungarian translation 2013-04-20 00:05:42 +02:00
Milo Casagrande 3c7758aec9 [l10n] Updated Italian translation. 2013-04-19 19:18:59 +02:00
Curtis Gedak 51b8e241bc Fix gparted scans forever blank disk in virtual machine (#697518)
In some circumstances gparted would appear to scan forever if it
encountered a blank hard disk.  This would happen if the timing of
events was right and gparted encountered a disk without a partition
table.  The missing partition table would cause a call to the
exception handler, which could get stuck in a thread waiting position.

The problem was traced back to the ped_exception_handler
and a cond.signal() call missing the requisite mutex.lock() and
mutex.unlock() around the signal call.

Closes Bug #697518 - gparted scans forever blank disk in virtualbox
2013-04-19 18:02:03 +01:00
Christian Kirbach 17a51ba622 Updated German translation 2013-04-19 12:44:08 +02:00
Muhammet Kara b95c101810 l10n: Update Turkish translation 2013-04-18 21:05:47 +09:00
Claude Paroz 41706f4792 Updated French translation 2013-04-18 09:05:39 +02:00
Rafael Ferreira 633cba440d Updated Brazilian Portuguese translations 2013-04-17 22:05:38 -03:00
Phillip Susi c36934aca5 Avoid glibmm GSource bug/crash (#697727)
The glibmm GSource wrappers have a bug where they do not do
reference counting properly, and have a race condition where
the background thread can try to touch the source after the
main thread has already processed and destroyed it.  This
results in writes to freed memory and sometimes this causes
crashes or other erratic behavior.  Avoid using the glibmm
wrappers and use glib directly.  See bug #561885 for details
of the glibmm bug.

Bug #697727 - Segfault in livecd Gparted v 0.15.0-3 when copying partition
2013-04-17 11:53:55 -06:00
Mike Fleetwood 50ca2e5f13 Correctly report usage of absolutely full NTFS (#697946)
For an absolutely full NTFS GParted doesn't show the file system usage
but instead shows a warning against the partition.

GParted was looking only for "resize at %d" to determine file system
used figure in the output from the ntfsresize command.  Also handle
finding "ERROR: Volume is full" too to derive used figure.

NTFS with 1 block free case:
    # ntfsresize --info --force --no-progress-bar /dev/sda9
    ...
    Current volume size: 1073738240 bytes (1074 MB)
    ...
    Collecting resizing constraints ...
    You might resize at 1073737728 bytes (freeing 4096 bytes).
    ...
    # echo $?
    0

Absolutely full NTFS case:
    # ntfsresize --info --force --no-progress-bar /dev/sda9
    ...
    Current volume size: 1073738240 bytes (1074 MB)
    ...
    Collecting resizing constraints ...
    ERROR: Volume is full. To shrink it, delete unused files.
    # echo $?
    1

Closes Bug #697946 - Absolutely full NTFS reported as partition error
2013-04-17 10:53:09 -06:00
Nicolás Satragno 76a9cd3c93 Updated Spanish translation 2013-04-12 10:43:29 +02:00
Nicolás Satragno afbee8ae64 Updated Spanish translation 2013-04-12 10:43:13 +02:00
Rafael Ferreira d56bc10eb0 Updated Brazilian Portuguese translation 2013-04-09 23:14:18 -03:00
Мирослав Николић e8529ff807 Updated Serbian translation 2013-04-02 09:53:06 +02:00
Aurimas Černius a661df2fe8 Updated Lithuanian translation 2013-04-01 20:18:29 +03:00
Daniel Șerbănescu 8d5b4fbc8e Updated romanian translation 2013-04-01 11:12:54 +02:00
Carles Ferrando 64d0c92ddf [l10n] Updated Catalan (Valencian) translation 2013-03-31 21:29:45 +02:00
Pau Iranzo ce6cbda6b9 [l10n] Update Catalan translation 2013-03-31 21:29:37 +02:00
Matej Urbančič 6d2c04ec80 Updated Slovenian translation 2013-03-31 20:13:10 +02:00
Martin Srebotnjak 9681299341 Updated Slovenian translation 2013-03-30 09:19:13 +01:00
Martin Srebotnjak 0b3b203757 Updated Slovenian translation 2013-03-30 09:19:13 +01:00
Marek Černocký b2fd98b7e0 Updated Czech translation 2013-03-27 22:13:18 +01:00
Marek Černocký 2f125a4efb Updated Czech translation 2013-03-27 22:13:11 +01:00
Marek Černocký a3c8d2deaf Updated Czech translation 2013-03-27 21:33:19 +01:00
Marek Černocký 44a226b79d Updated Czech translation 2013-03-27 21:28:31 +01:00
Marek Černocký f5f661af1c Updated Czech translation 2013-03-26 23:35:43 +01:00
Piotr Drąg bc8468b410 Updated Polish translation 2013-03-25 20:41:41 +01:00
Piotr Drąg fd3679b4de Updated Polish translation 2013-03-25 20:39:16 +01:00
Mike Fleetwood 6c33a8f5ca Remove unused function copy_filesystem_simulation()
The function is no longer used after commit:

    b9b4b2e55d
    Remove simulation pass ( read test ) on move
2013-03-25 10:06:40 -06:00
Mike Fleetwood a39079211b Don't hard code reiser4 max label length when reading the label
Lookup the maximum reiser4 file system label length instead, so that it
is defined in only one place.  Small improvement missed from earlier
commit:

    18941e24d3
    Avoid reading trailing junk for a reiser4 label (#689318)
2013-03-25 10:06:40 -06:00
Mike Fleetwood e218ba3358 Refactor and rename GParted_Core::open/close_device_and_disk()
These functions in GParted_Core:
    open_device()
    open_device_and_disk()
    close_disk()
    close_device_and_disk()
call the following functions in the libparted API:
    ped_device_get()
    ped_disk_new()
    ped_disk_destroy()
    ped_device_destroy()
which don't open or close anything.  Instead they allocate and
deallocate PedDevice and PedDisk memory structures which describe block
devices and partition tables respectively.

Rename functions:
    open_device_and_disk()  -> get_device_and_disk()
    close_device_and_disk() -> destroy_device_and_disk()
and merge open_device() and open_device() as each only wrapped one
libparted function and was only called from a single place.
2013-03-25 10:06:39 -06:00
Mike Fleetwood 17a349e28b Add "cleared" file system format details to the GParted Manual (#688882)
Minimum update explaining the meaning of the cleared and unformatted
file system types.

Also markup file system names as GUI menu items.

Bug #688882 - Improve clearing of file system signatures
2013-03-25 10:06:39 -06:00
Mike Fleetwood 2b7e469473 Remove use of wipefs to clear file system signatures (#688882)
The wipefs command has the following significant limitations which were
worked around in previous commits:

1)  Wasn't available in the earliest distributions supported by GParted;

2)  Had to be called 3 times to erase vfat (fat16/32) signatures in all
    but the most recent versions.

This meant we had all the code to clear file system signatures without
using the wipefs command as well as extra complexity of using wipefs
too.  So just remove use of the wipefs command.

Bug #688882 - Improve clearing of file system signatures
2013-03-25 10:06:39 -06:00
Mike Fleetwood 38ca0db343 Clear nilfs2 secondary super block (#688882)
Wipefs only clears the nilfs2 file system signature from the primary
super block at the start of the partition.  This is enough for blkid to
no longer detect the file system.  However parted (>= 2.4 with nilfs2
support) and therefore GParted still detect the file system using the
secondary super block at the end of the partition.

    # mkfs.nilfs2 /dev/sda12
    # wipefs -a /dev/sda12
    2 bytes were erased at offset 0x00000406 (nilfs2): 34 34
    # blkid /dev/sda12
    # parted /dev/sda12 print
    Model: Unknown (unknown)
    Disk /dev/sda12: 1074MB
    Sector size (logical/physical): 512B/512B
    Partition Table: loop
    Disk Flags:

    Number  Start  End     Size    File system  Flags
     1      0.00B  1074MB  1074MB  nilfs2

Overwrite the nilfs2 secondary super block at the end of the partition
with 4K block of zeros.  Always do this just in case the partition
contains a nilfs secondary super block but is detected as a different
file system.  Such an example was documented in an earlier commit
message.

Bug #688882 - Improve clearing of file system signatures
2013-03-25 10:06:39 -06:00
Mike Fleetwood 0b164b168d Make flush OS cache a reported step (#688882)
As failure of flushing the cache can lead to misidentification of file
systems make it a checked step in the displayed operation details.

Bug #688882 - Improve clearing of file system signatures
2013-03-25 10:06:39 -06:00