From 6c149ea1d976c5aa5b7c42118d3d54a82cbed72d Mon Sep 17 00:00:00 2001 From: Curtis Gedak Date: Mon, 7 Apr 2008 15:26:19 +0000 Subject: [PATCH] gparted-0.3.5 - code recreation from Source Forge svn path=/trunk/; revision=809 --- ChangeLog | 47 +++++++++++++++++++++++++++++++++++++++ configure.in | 4 ++-- include/OperationDetail.h | 1 + include/Utils.h | 1 + po/ChangeLog | 5 +++++ src/GParted_Core.cc | 36 ++++++++++++++++++++++++++++-- src/Win_GParted.cc | 5 +++++ 7 files changed, 95 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0b3eb2b..ac5349a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,53 @@ * MAINTAINERS: New file (bug #524276). * configure.in: Added 'sk' to ALL_LINGUAS. +2008-02-01 Curtis Gedak + + * configure.in: gparted-0.3.5 + =================================================== + +2008-02-01 Curtis Gedak + + * gparted.desktop.in: Rolled back HIG code changes to 0.3.3 + - Reopens bugs #440012, and #381557 + - Rolls back debian patch 01_fix-desktop.patch + - moved config.in: gparted-0.3.5 entry from 2008-01-30 + to 2008-02-01 to improve readability of ChangeLog entries + +2008-01-29 Curtis Gedak + + * gparted.desktop.in: Updated to align with GNOME Human + Interface Guidelines 2.0 + - Closes bug #440012 + +2008-01-28 Curtis Gedak + + * src/Win_GParted.cc: Applied debian patch 04_Win_GParted.cc.diff + - Fixed "crashes when rescanning devices after any operation", + closes: #446522. Patch by Denis Sirotkin + + * src/GParted_Core.cc: Applied debian patch + 03_fdi_robustification.patch + - Install a signal handler for cleaning up the automount disabling + FDI, so that it will be cleaned up on program crashes, too. + - Use storage.automount_enabled_hint instead of volume.ignore for the + automount disabling FDI. That way, the new drives will at least + appear in Gnome and the user can mount them manually. + - Patch by Martin Pitt + - LP: #134712 + - Closes: 434268 + + * include/Utils.h, + include/OperationDetail.h: Applied debian patch + 02_fix-build-failure-with-g++-4.3.patch + - Fix build failures with g++-4.3. LP: #138584 + + * gparted.desktop.in: Applied debian patch 01_fix-desktop.patch + - don't specify the encoding that's deprecated, update the categories + and set the translation domain (LP: #145202) + - Changes name to `Partition Editor` + - Enables gksu to run gparted with + 2007-10-14 Yannig Marchegay * configure.in: Added 'oc' to ALL_LINGUAS. diff --git a/configure.in b/configure.in index 38458449..87259525 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -AC_INIT(gparted, 0.3.4) +AC_INIT(gparted, 0.3.5) AC_CONFIG_SRCDIR(src/main.cc) AM_INIT_AUTOMAKE @@ -20,7 +20,7 @@ GETTEXT_PACKAGE=gparted AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[description]) -ALL_LINGUAS="ar bg ca cs de dz el en_CA en_GB es eu fi fr gl he hu it ja lt lv mk nb ne nl oc pa pl pt pt_BR ru rw sk sl sv th tr uk vi zh_CN zh_HK zh_TW" +ALL_LINGUAS="ar bg ca cs de dz el en_CA en_GB es eu fi fr gl he hu it ja lt lv mk nb ne nl oc pa pl pt pt_BR ru rw sl sv th tr uk vi zh_CN zh_HK zh_TW" AM_GLIB_GNU_GETTEXT AC_PROG_INTLTOOL diff --git a/include/OperationDetail.h b/include/OperationDetail.h index 3570faab..930941f6 100644 --- a/include/OperationDetail.h +++ b/include/OperationDetail.h @@ -22,6 +22,7 @@ #include #include +#include namespace GParted { diff --git a/include/Utils.h b/include/Utils.h index bc66e686..f277c2e7 100644 --- a/include/Utils.h +++ b/include/Utils.h @@ -30,6 +30,7 @@ #include #include +#include namespace GParted { diff --git a/po/ChangeLog b/po/ChangeLog index 9f2fc562..e958fdfc 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -22,6 +22,11 @@ * eu.po: Updated Basque translation. +2008-01-30 Curtis Gedak + + * gparted-0.3.5 + =================================================== + 2008-01-29 Jonh Wendell * pt_BR.po: Brazilian Portuguese translation updated by Djavan Fagundes. diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 723eeb34..ce01faec 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -38,6 +38,8 @@ #include "../include/ufs.h" #include +#include +#include #include std::vector libparted_messages ; //see ped_exception_handler() @@ -45,6 +47,13 @@ std::vector libparted_messages ; //see ped_exception_handler() namespace GParted { +// Clean up the fdi when terminating +void sig_fdi_cleanup( int signum ) +{ + remove( "/usr/share/hal/fdi/policy/gparted-disable-automount.fdi" ); + raise( signum ); +} + GParted_Core::GParted_Core() { lp_device = NULL ; @@ -53,6 +62,29 @@ GParted_Core::GParted_Core() p_filesystem = NULL ; ped_exception_set_handler( ped_exception_handler ) ; + + //make sure that the fdi is cleaned up on all but the most forceful + //program exits + struct sigaction sa; + sa.sa_handler = sig_fdi_cleanup; + sigemptyset( &sa.sa_mask ); + sa.sa_flags = SA_RESETHAND; + if( sigaction( SIGHUP, &sa, NULL ) == -1 || + sigaction( SIGINT, &sa, NULL ) == -1 || + sigaction( SIGQUIT, &sa, NULL ) == -1 || + sigaction( SIGILL, &sa, NULL ) == -1 || + sigaction( SIGABRT, &sa, NULL ) == -1 || + sigaction( SIGFPE, &sa, NULL ) == -1 || + sigaction( SIGSEGV, &sa, NULL ) == -1 || + sigaction( SIGPIPE, &sa, NULL ) == -1 || + sigaction( SIGALRM, &sa, NULL ) == -1 || + sigaction( SIGTERM, &sa, NULL ) == -1 || + sigaction( SIGUSR1, &sa, NULL ) == -1 || + sigaction( SIGUSR2, &sa, NULL ) == -1 || + sigaction( SIGBUS, &sa, NULL ) == -1 || + sigaction( SIGXCPU, &sa, NULL ) == -1 || + sigaction( SIGXFSZ, &sa, NULL ) == -1 ) + perror( "Could not set signal handler" ); //disable automount //FIXME: temporary hack, till i find a better solution... std::ofstream fdi_file( "/usr/share/hal/fdi/policy/gparted-disable-automount.fdi" ) ; @@ -60,8 +92,8 @@ GParted_Core::GParted_Core() { fdi_file << "" ; fdi_file << "" ; - fdi_file << "" ; - fdi_file << "true" ; + fdi_file << "" ; + fdi_file << "false" ; fdi_file << "" ; fdi_file << "" ; fdi_file << "" ; diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 58cc57b2..c091f2b6 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -916,8 +916,13 @@ void Win_GParted::clear_operationslist() void Win_GParted::combo_devices_changed() { + unsigned int old_current_device = current_device; //set new current device current_device = combo_devices .get_active_row_number() ; + if ( current_device == (unsigned int) -1 ) + current_device = old_current_device; + if ( current_device >= devices .size() ) + current_device = 0 ; set_title( String::ucompose( _("%1 - GParted"), devices[ current_device ] .get_path() ) ); //refresh label_device_info