Added read UUID read display
svn path=/trunk/; revision=961
This commit is contained in:
parent
135e60141f
commit
ed9b5afe36
|
@ -1,5 +1,11 @@
|
|||
2008-11-11 Curtis Gedak <gedakc@gmail.com>
|
||||
|
||||
* src/Dialog_Partition_Info.cc,
|
||||
src/GParted_Core.cc: Added read UUID read display.
|
||||
|
||||
* include/Partition.h,
|
||||
src/Partition.h: Added UUID.
|
||||
|
||||
* include/FS_Info.h,
|
||||
include/Makefile.am,
|
||||
src/FS_Info.cc,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2004 Bart
|
||||
/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Bart Hakvoort
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -99,6 +99,7 @@ public:
|
|||
PartitionStatus status; //STAT_REAL, STAT_NEW, etc..
|
||||
FILESYSTEM filesystem ;
|
||||
Glib::ustring label ;
|
||||
Glib::ustring uuid ;
|
||||
Sector sector_start;
|
||||
Sector sector_end;
|
||||
Sector sectors_used;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2004 Bart
|
||||
/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Bart Hakvoort
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -271,7 +271,20 @@ void Dialog_Partition_Info::Display_Info()
|
|||
top++, bottom++,
|
||||
Gtk::FILL) ;
|
||||
}
|
||||
|
||||
|
||||
//uuid
|
||||
if ( partition.type != GParted::TYPE_UNALLOCATED && partition.type != GParted::TYPE_EXTENDED )
|
||||
{
|
||||
table ->attach( * Utils::mk_label( "<b>" + Glib::ustring( _("UUID:") ) + "</b>"),
|
||||
0, 1,
|
||||
top, bottom,
|
||||
Gtk::FILL) ;
|
||||
table ->attach( * Utils::mk_label( partition .uuid ),
|
||||
1, 2,
|
||||
top++, bottom++,
|
||||
Gtk::FILL) ;
|
||||
}
|
||||
|
||||
//one blank line
|
||||
table ->attach( * Utils::mk_label( "" ), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "../include/Win_GParted.h"
|
||||
#include "../include/GParted_Core.h"
|
||||
#include "../include/FS_Info.h"
|
||||
#include "../include/OperationCopy.h"
|
||||
#include "../include/OperationCreate.h"
|
||||
#include "../include/OperationDelete.h"
|
||||
|
@ -676,6 +677,7 @@ void GParted_Core::set_device_partitions( Device & device )
|
|||
{
|
||||
int EXT_INDEX = -1 ;
|
||||
char * lp_path ;//we have to free the result of ped_partition_get_path()..
|
||||
FS_Info fs_info ; //Build cache of file system information
|
||||
|
||||
//clear partitions
|
||||
device .partitions .clear() ;
|
||||
|
@ -733,7 +735,12 @@ void GParted_Core::set_device_partitions( Device & device )
|
|||
break;
|
||||
}
|
||||
|
||||
read_label( partition_temp ) ;
|
||||
//Avoid reading additional file system information if there is no path
|
||||
//FIXME: Why is there an empty path for the first primary partition, and an empty path for each logical partition?
|
||||
if ( partition_temp .get_path() != "" ) {
|
||||
read_label( partition_temp ) ;
|
||||
partition_temp .uuid = fs_info .get_uuid( partition_temp .get_path() ) ;
|
||||
}
|
||||
|
||||
partition_temp .messages .insert( partition_temp .messages .end(),
|
||||
libparted_messages. begin(),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2004 Bart
|
||||
/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Bart Hakvoort
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -40,6 +40,7 @@ void Partition::Reset()
|
|||
type = GParted::TYPE_UNALLOCATED ;
|
||||
filesystem = GParted::FS_UNALLOCATED ;
|
||||
label .clear() ;
|
||||
uuid .clear() ;
|
||||
partition_number = sector_start = sector_end = sectors_used = sectors_unused = -1;
|
||||
color .set( "black" ) ;
|
||||
inside_extended = busy = strict = false ;
|
||||
|
|
Loading…
Reference in New Issue