gparted r809 - in trunk: . include po src
- From: gedakc svn gnome org
- To: svn-commits-list gnome org
- Subject: gparted r809 - in trunk: . include po src
- Date: Mon, 7 Apr 2008 16:26:19 +0100 (BST)
Author: gedakc
Date: Mon Apr 7 16:26:19 2008
New Revision: 809
URL: http://svn.gnome.org/viewvc/gparted?rev=809&view=rev
Log:
gparted-0.3.5 - code recreation from Source Forge
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/include/OperationDetail.h
trunk/include/Utils.h
trunk/po/ChangeLog
trunk/src/GParted_Core.cc
trunk/src/Win_GParted.cc
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Mon Apr 7 16:26:19 2008
@@ -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 @@
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
Modified: trunk/include/OperationDetail.h
==============================================================================
--- trunk/include/OperationDetail.h (original)
+++ trunk/include/OperationDetail.h Mon Apr 7 16:26:19 2008
@@ -22,6 +22,7 @@
#include <glibmm/markup.h>
#include <vector>
+#include <ctime>
namespace GParted
{
Modified: trunk/include/Utils.h
==============================================================================
--- trunk/include/Utils.h (original)
+++ trunk/include/Utils.h Mon Apr 7 16:26:19 2008
@@ -30,6 +30,7 @@
#include <glibmm/ustring.h>
#include <iostream>
+#include <ctime>
namespace GParted
{
Modified: trunk/src/GParted_Core.cc
==============================================================================
--- trunk/src/GParted_Core.cc (original)
+++ trunk/src/GParted_Core.cc Mon Apr 7 16:26:19 2008
@@ -38,6 +38,8 @@
#include "../include/ufs.h"
#include <cerrno>
+#include <cstdio>
+#include <csignal>
#include <sys/statvfs.h>
std::vector<Glib::ustring> libparted_messages ; //see ped_exception_handler()
@@ -45,6 +47,13 @@
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 @@
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 @@
{
fdi_file << "<deviceinfo version='0.2'>" ;
fdi_file << "<device>" ;
- fdi_file << "<match key='@block.storage_device:storage.hotpluggable' bool='true'>" ;
- fdi_file << "<merge key='volume.ignore' type='bool'>true</merge>" ;
+ fdi_file << "<match key='storage.hotpluggable' bool='true'>" ;
+ fdi_file << "<merge key='storage.automount_enabled_hint' type='bool'>false</merge>" ;
fdi_file << "</match>" ;
fdi_file << "</device>" ;
fdi_file << "</deviceinfo>" ;
Modified: trunk/src/Win_GParted.cc
==============================================================================
--- trunk/src/Win_GParted.cc (original)
+++ trunk/src/Win_GParted.cc Mon Apr 7 16:26:19 2008
@@ -916,8 +916,13 @@
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]