2009-11-05 11:08:32 -07:00
|
|
|
/* Copyright (C) 2004 Bart
|
2010-08-10 11:36:10 -06:00
|
|
|
* Copyright (C) 2008, 2009, 2010 Curtis Gedak
|
2004-09-19 14:24:53 -06:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2014-01-23 03:59:48 -07:00
|
|
|
* GNU General Public License for more details.
|
2004-09-19 14:24:53 -06:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-23 03:59:48 -07:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2004-09-19 14:24:53 -06:00
|
|
|
*/
|
2013-05-27 05:20:16 -06:00
|
|
|
|
|
|
|
#ifndef GPARTED_WIN_GPARTED_H
|
|
|
|
#define GPARTED_WIN_GPARTED_H
|
2004-09-19 14:24:53 -06:00
|
|
|
|
2016-10-18 16:45:28 -06:00
|
|
|
#include "Device.h"
|
|
|
|
#include "DrawingAreaVisualDisk.h"
|
|
|
|
#include "Partition.h"
|
|
|
|
#include "PartitionVector.h"
|
|
|
|
#include "TreeView_Detail.h"
|
|
|
|
#include "GParted_Core.h"
|
|
|
|
#include "HBoxOperations.h"
|
2004-09-19 14:24:53 -06:00
|
|
|
|
|
|
|
#include <gtkmm/paned.h>
|
|
|
|
#include <gtkmm/toolbar.h>
|
|
|
|
#include <gtkmm/separatortoolitem.h>
|
2018-08-03 11:38:39 -06:00
|
|
|
#include <gtkmm/checkmenuitem.h>
|
2004-09-19 14:24:53 -06:00
|
|
|
#include <gtkmm/menubar.h>
|
|
|
|
#include <gtkmm/statusbar.h>
|
2005-12-29 16:35:37 -07:00
|
|
|
#include <gtkmm/combobox.h>
|
2006-01-24 05:31:58 -07:00
|
|
|
#include <gtkmm/progressbar.h>
|
2006-01-26 13:58:55 -07:00
|
|
|
#include <gtkmm/window.h>
|
2019-03-07 03:44:05 -07:00
|
|
|
|
2004-09-19 14:24:53 -06:00
|
|
|
|
|
|
|
namespace GParted
|
|
|
|
{
|
2015-09-15 08:34:12 -06:00
|
|
|
|
|
|
|
enum MergeType
|
|
|
|
{
|
|
|
|
MERGE_LAST_WITH_PREV = 0,
|
|
|
|
MERGE_LAST_WITH_ANY = 1,
|
|
|
|
MERGE_ALL_ADJACENT = 2
|
|
|
|
};
|
|
|
|
|
2004-09-19 14:24:53 -06:00
|
|
|
class Win_GParted : public Gtk::Window
|
|
|
|
{
|
|
|
|
public:
|
2006-02-02 06:50:37 -07:00
|
|
|
Win_GParted( const std::vector<Glib::ustring> & user_devices ) ;
|
2015-09-10 05:44:48 -06:00
|
|
|
~Win_GParted();
|
2004-09-19 14:24:53 -06:00
|
|
|
|
|
|
|
private:
|
2015-09-10 05:44:48 -06:00
|
|
|
Win_GParted( const Win_GParted & src ); // Not implemented copy constructor
|
|
|
|
Win_GParted & operator=( const Win_GParted & rhs ); // Not implemented copy assignment operator
|
|
|
|
|
2006-02-22 15:05:15 -07:00
|
|
|
void init_menubar() ;
|
|
|
|
void init_toolbar() ;
|
|
|
|
void init_partition_menu() ;
|
|
|
|
Gtk::Menu * create_format_menu() ;
|
2019-06-13 03:50:10 -06:00
|
|
|
void create_format_menu_add_item(FSType fstype, bool activate);
|
2006-02-22 15:05:15 -07:00
|
|
|
void init_device_info() ;
|
|
|
|
void init_hpaned_main() ;
|
2019-01-22 07:45:58 -07:00
|
|
|
void add_custom_css();
|
2004-09-19 14:24:53 -06:00
|
|
|
|
2005-12-29 16:35:37 -07:00
|
|
|
void refresh_combo_devices() ;
|
2006-01-08 08:20:14 -07:00
|
|
|
void show_pulsebar( const Glib::ustring & status_message ) ;
|
2013-02-21 17:57:33 -07:00
|
|
|
void hide_pulsebar();
|
2005-02-01 10:04:03 -07:00
|
|
|
void Fill_Label_Device_Info( bool clear = false );
|
2004-09-19 14:24:53 -06:00
|
|
|
|
2017-04-21 01:30:39 -06:00
|
|
|
void Add_Operation( const Device & device, Operation * operation );
|
2015-09-15 07:30:03 -06:00
|
|
|
bool merge_two_operations( unsigned int first, unsigned int second );
|
2015-09-15 08:34:12 -06:00
|
|
|
void merge_operations( MergeType mergetype );
|
2006-02-22 15:05:15 -07:00
|
|
|
void Refresh_Visual();
|
2015-09-15 07:30:03 -06:00
|
|
|
bool valid_display_partition_ptr( const Partition * partition_ptr );
|
2006-02-22 15:05:15 -07:00
|
|
|
bool Quit_Check_Operations();
|
2006-02-08 13:36:18 -07:00
|
|
|
void set_valid_operations() ;
|
2013-05-17 10:01:42 -06:00
|
|
|
void show_operationslist() ;
|
2004-09-19 14:24:53 -06:00
|
|
|
|
|
|
|
//convenience functions
|
2006-08-20 10:51:18 -06:00
|
|
|
void toggle_item( bool state, int menu_item, int toolbar_item = -1 )
|
|
|
|
{
|
2018-08-02 01:24:41 -06:00
|
|
|
if (menu_item >= 0 && partitionmenu_items.count(menu_item))
|
|
|
|
partitionmenu_items[menu_item]->set_sensitive(state);
|
2006-08-20 10:51:18 -06:00
|
|
|
|
|
|
|
if ( toolbar_item >= 0 && toolbar_item < toolbar_main .get_n_items() )
|
|
|
|
toolbar_main .get_nth_item( toolbar_item ) ->set_sensitive( state ) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
void allow_new( bool state ) {
|
|
|
|
toggle_item( state, MENU_NEW, TOOLBAR_NEW ) ; }
|
2004-11-06 12:48:24 -07:00
|
|
|
|
2006-08-20 10:51:18 -06:00
|
|
|
void allow_delete( bool state ) {
|
|
|
|
toggle_item( state, MENU_DEL, TOOLBAR_DEL ) ; }
|
2005-11-27 12:48:00 -07:00
|
|
|
|
2006-08-20 10:51:18 -06:00
|
|
|
void allow_resize( bool state ) {
|
|
|
|
toggle_item( state, MENU_RESIZE_MOVE, TOOLBAR_RESIZE_MOVE ) ; }
|
2005-11-27 12:48:00 -07:00
|
|
|
|
2006-08-20 10:51:18 -06:00
|
|
|
void allow_copy( bool state ) {
|
|
|
|
toggle_item( state, MENU_COPY, TOOLBAR_COPY ) ; }
|
2005-11-27 12:48:00 -07:00
|
|
|
|
2006-08-20 10:51:18 -06:00
|
|
|
void allow_paste( bool state ) {
|
|
|
|
toggle_item( state, MENU_PASTE, TOOLBAR_PASTE ) ; }
|
2005-11-27 12:48:00 -07:00
|
|
|
|
2006-08-20 10:51:18 -06:00
|
|
|
void allow_format( bool state ) {
|
|
|
|
toggle_item( state, MENU_FORMAT ) ; }
|
2012-06-17 05:26:49 -06:00
|
|
|
|
2016-10-25 03:47:38 -06:00
|
|
|
void allow_toggle_crypt_busy_state( bool state ) {
|
|
|
|
toggle_item( state, MENU_TOGGLE_CRYPT_BUSY ); }
|
|
|
|
|
2016-10-25 05:05:47 -06:00
|
|
|
void allow_toggle_fs_busy_state( bool state ) {
|
|
|
|
toggle_item( state, MENU_TOGGLE_FS_BUSY ); }
|
2006-03-31 03:49:27 -07:00
|
|
|
|
2006-08-20 10:51:18 -06:00
|
|
|
void allow_manage_flags( bool state ) {
|
|
|
|
toggle_item( state, MENU_FLAGS ) ; }
|
2005-11-27 12:48:00 -07:00
|
|
|
|
2006-11-26 07:27:16 -07:00
|
|
|
void allow_check( bool state ) {
|
|
|
|
toggle_item( state, MENU_CHECK ) ; }
|
|
|
|
|
2014-12-18 15:18:33 -07:00
|
|
|
void allow_label_filesystem( bool state ) {
|
2019-06-27 05:48:26 -06:00
|
|
|
toggle_item(state, MENU_LABEL_FILESYSTEM); }
|
2008-04-07 13:41:18 -06:00
|
|
|
|
2014-12-12 00:00:02 -07:00
|
|
|
void allow_name_partition( bool state ) {
|
|
|
|
toggle_item( state, MENU_NAME_PARTITION ); }
|
|
|
|
|
2012-01-22 13:49:52 -07:00
|
|
|
void allow_change_uuid( bool state ) {
|
|
|
|
toggle_item( state, MENU_CHANGE_UUID ) ; }
|
|
|
|
|
2006-08-20 10:51:18 -06:00
|
|
|
void allow_info( bool state ) {
|
|
|
|
toggle_item( state, MENU_INFO ) ; }
|
2006-09-16 05:27:05 -06:00
|
|
|
|
|
|
|
void allow_undo_clear_apply( bool state )
|
|
|
|
{
|
2006-08-20 10:51:18 -06:00
|
|
|
toggle_item( state, -1, TOOLBAR_UNDO ) ;
|
2018-08-02 01:24:41 -06:00
|
|
|
static_cast<Gtk::CheckMenuItem *>(mainmenu_items[MENU_UNDO_OPERATION])
|
2006-09-16 05:27:05 -06:00
|
|
|
->set_sensitive( state ) ;
|
|
|
|
|
2018-08-02 01:24:41 -06:00
|
|
|
static_cast<Gtk::CheckMenuItem *>(mainmenu_items[MENU_CLEAR_OPERATIONS])
|
2006-09-16 05:27:05 -06:00
|
|
|
->set_sensitive( state ) ;
|
|
|
|
|
|
|
|
toggle_item( state, -1, TOOLBAR_APPLY ) ;
|
2018-08-02 01:24:41 -06:00
|
|
|
static_cast<Gtk::CheckMenuItem *>(mainmenu_items[MENU_APPLY_OPERATIONS])
|
2006-09-16 05:27:05 -06:00
|
|
|
->set_sensitive( state ) ;
|
|
|
|
}
|
2016-09-10 12:34:10 -06:00
|
|
|
|
|
|
|
static bool unmount_partition( const Partition & partition, Glib::ustring & error );
|
|
|
|
|
2004-09-19 14:24:53 -06:00
|
|
|
//signal handlers
|
2006-02-22 15:05:15 -07:00
|
|
|
void open_operationslist() ;
|
|
|
|
void close_operationslist() ;
|
|
|
|
void clear_operationslist() ;
|
|
|
|
void combo_devices_changed();
|
2006-02-02 03:59:44 -07:00
|
|
|
void radio_devices_changed( unsigned int item ) ;
|
2006-03-24 12:08:41 -07:00
|
|
|
bool on_delete_event( GdkEventAny* ) ;
|
2006-04-02 08:04:44 -06:00
|
|
|
void on_show() ;
|
2016-09-21 06:49:02 -06:00
|
|
|
|
|
|
|
static gboolean initial_device_refresh( gpointer data );
|
2006-02-22 15:05:15 -07:00
|
|
|
void menu_gparted_refresh_devices();
|
2006-04-05 03:33:04 -06:00
|
|
|
void menu_gparted_features();
|
2006-02-22 15:05:15 -07:00
|
|
|
void menu_gparted_quit();
|
|
|
|
void menu_view_harddisk_info();
|
|
|
|
void menu_view_operations();
|
2021-11-01 08:12:58 -06:00
|
|
|
void show_disklabel_unrecognized(const Glib::ustring& device_name);
|
2018-09-17 10:20:03 -06:00
|
|
|
void show_resize_readonly( const Glib::ustring & path );
|
2019-02-28 03:50:26 -07:00
|
|
|
void show_help(const Glib::ustring & filename, const Glib::ustring & link_id);
|
2006-02-22 15:05:15 -07:00
|
|
|
void menu_help_contents();
|
|
|
|
void menu_help_about();
|
2004-09-19 14:24:53 -06:00
|
|
|
|
2015-05-16 10:06:22 -06:00
|
|
|
void on_partition_selected( const Partition * partition_ptr, bool src_is_treeview );
|
2005-12-23 17:06:05 -07:00
|
|
|
void on_partition_activated() ;
|
|
|
|
void on_partition_popup_menu( unsigned int button, unsigned int time ) ;
|
|
|
|
|
2006-01-19 12:15:15 -07:00
|
|
|
bool max_amount_prim_reached() ;
|
2004-09-19 14:24:53 -06:00
|
|
|
|
2006-01-07 14:23:09 -07:00
|
|
|
void activate_resize();
|
2021-03-26 15:16:06 -06:00
|
|
|
bool ask_for_password_for_encrypted_resize_as_required(const Partition& partition);
|
2006-01-07 14:23:09 -07:00
|
|
|
void activate_copy();
|
|
|
|
void activate_paste();
|
|
|
|
void activate_new();
|
|
|
|
void activate_delete();
|
|
|
|
void activate_info();
|
2018-01-02 10:44:01 -07:00
|
|
|
void activate_format( FSType new_fs );
|
2018-02-11 14:07:00 -07:00
|
|
|
bool open_encrypted_partition( const Partition & partition, const char * password, Glib::ustring & message );
|
2016-10-25 03:47:38 -06:00
|
|
|
void toggle_crypt_busy_state();
|
2016-09-11 07:52:47 -06:00
|
|
|
bool check_toggle_busy_allowed( const Glib::ustring & disallowed_msg );
|
|
|
|
void show_toggle_failure_dialog( const Glib::ustring & failure_summary,
|
|
|
|
const Glib::ustring & marked_up_error );
|
2016-10-25 05:05:47 -06:00
|
|
|
void toggle_fs_busy_state();
|
2006-03-16 10:09:17 -07:00
|
|
|
void activate_mount_partition( unsigned int index ) ;
|
2006-01-07 14:23:09 -07:00
|
|
|
void activate_disklabel() ;
|
2011-01-28 11:09:21 -07:00
|
|
|
void activate_attempt_rescue_data();
|
2006-03-31 03:49:27 -07:00
|
|
|
void activate_manage_flags() ;
|
2006-11-26 07:27:16 -07:00
|
|
|
void activate_check() ;
|
2012-01-22 13:49:52 -07:00
|
|
|
void activate_change_uuid() ;
|
2014-12-18 15:18:33 -07:00
|
|
|
void activate_label_filesystem();
|
2014-12-12 00:00:02 -07:00
|
|
|
void activate_name_partition();
|
2014-12-18 15:18:33 -07:00
|
|
|
|
2006-01-19 12:15:15 -07:00
|
|
|
void activate_undo();
|
2006-03-24 12:08:41 -07:00
|
|
|
void remove_operation( int index = -1, bool remove_all = false ) ;
|
2010-08-09 13:33:28 -06:00
|
|
|
int partition_in_operation_queue_count( const Partition & partition ) ;
|
2010-08-10 12:52:59 -06:00
|
|
|
int active_partitions_on_device_count( const Device & device ) ;
|
2006-01-19 12:15:15 -07:00
|
|
|
void activate_apply();
|
2012-07-05 16:33:04 -06:00
|
|
|
bool remove_non_empty_lvm2_pv_dialog( const OperationType optype ) ;
|
2004-09-19 14:24:53 -06:00
|
|
|
|
|
|
|
//private variables
|
2004-11-17 06:00:25 -07:00
|
|
|
unsigned int current_device ;
|
2023-04-20 03:34:45 -06:00
|
|
|
std::vector<Device> devices;
|
|
|
|
Device m_display_device; // Copy of devices[current_device] with pending operations
|
|
|
|
// operations applied to partitions for displaying in the UI.
|
2015-05-17 07:01:48 -06:00
|
|
|
const Partition * selected_partition_ptr; // Pointer to the selected partition. (Alias to element
|
2023-04-20 03:34:45 -06:00
|
|
|
// in Win_GParted::m_display_device.partitions[] vector).
|
C++11: Convert NULL to nullptr (!117)
In C++11, nullptr [1] is the strongly typed value to use instead of the
macro NULL [2]. Use everywhere [3][4].
[1] nullptr, the pointer literal (since C++11)
https://en.cppreference.com/w/cpp/language/nullptr
[2] NULL
https://en.cppreference.com/w/cpp/types/NULL
[3] Bjarne Stroustrup's C++ Style and Technique FAQ, Should I use NULL
or 0?
https://www.stroustrup.com/bs_faq2.html#null
"In C++, the definition of NULL is 0, so there is only an
aesthetic difference. I prefer to avoid macros, so I use 0.
Another problem with NULL is that people sometimes mistakenly
believe that it is different from 0 and/or not an integer. In
pre-standard code, NULL was/is sometimes defined to something
unsuitable and therefore had/has to be avoided. That's less
common these days.
If you have to name the null pointer, call it nullptr; that's
what it's called in C++11. Then, "nullptr" will be a keyword.
"
[4] What is nullptr in C++? Advantages, Use Cases & Examples
https://favtutor.com/blogs/nullptr-cpp
"Advantages of nullptr
...
Compatible: Null pointers are compatible with null pointer
constants in the C style (such as NULL and 0). This implies
that old C code that uses these constants and null pointers can
communicate with each other in C++.
"
Closes !117 - Require C++11 compilation
2023-08-31 14:08:59 -06:00
|
|
|
const Partition* copied_partition; // nullptr or copy of source partition object.
|
2006-03-24 12:08:41 -07:00
|
|
|
std::vector<Operation *> operations;
|
2004-09-19 14:24:53 -06:00
|
|
|
|
|
|
|
//gui stuff
|
2019-02-27 09:52:50 -07:00
|
|
|
Gtk::Paned hpaned_main;
|
|
|
|
Gtk::Paned vpaned_main;
|
Use Gtk::Box for Win_GParted (!25)
Gtk::HBox and Gtk::VBox were deprecated in Gtkmm 3.2 [1]. Replace with
plain Gtk::Box.
This commit makes the change for Win_GParted.{h,cc}.
[1] Gtkmm 3.2.0 NEWS file (actually first included in gtkmm 3.1.6
unstable)
https://gitlab.gnome.org/GNOME/gtkmm/blob/3.2.0/NEWS#L91
Gtk:
* All H* or V* specialized classes have been deprecated, to
match the deprecations in the GTK+ C API. You should now
set the orientation instead.
This includes HBox, VBox, HButtonBox, VButtonBox, HPaned,
VPaned, HScale, VScale, HSeparator, VSeparator, HScrollbar and
VScrollbar.
Closes !25 - Modern Gtk3 - part 1
2019-02-27 08:10:37 -07:00
|
|
|
Gtk::Box vbox_main;
|
|
|
|
Gtk::Box vbox_info;
|
|
|
|
Gtk::Box hbox_toolbar;
|
2004-09-19 14:24:53 -06:00
|
|
|
Gtk::Toolbar toolbar_main;
|
|
|
|
Gtk::MenuBar menubar_main;
|
2005-12-29 16:35:37 -07:00
|
|
|
Gtk::ComboBox combo_devices ;
|
2006-01-02 08:18:29 -07:00
|
|
|
Gtk::Menu menu_partition, *menu ;
|
2004-09-19 14:24:53 -06:00
|
|
|
Gtk::ToolButton *toolbutton;
|
|
|
|
Gtk::Statusbar statusbar;
|
|
|
|
Gtk::Image *image ;
|
|
|
|
Gtk::ScrolledWindow *scrollwindow;
|
2006-01-07 14:23:09 -07:00
|
|
|
Gtk::ProgressBar pulsebar ;
|
2005-12-29 16:35:37 -07:00
|
|
|
Gtk::TreeRow treerow;
|
2004-09-19 14:24:53 -06:00
|
|
|
|
2006-03-09 06:12:44 -07:00
|
|
|
DrawingAreaVisualDisk drawingarea_visualdisk ;
|
2004-09-19 14:24:53 -06:00
|
|
|
TreeView_Detail treeview_detail;
|
2006-09-17 07:23:47 -06:00
|
|
|
HBoxOperations hbox_operations ;
|
2005-12-29 16:35:37 -07:00
|
|
|
|
|
|
|
//device combo
|
|
|
|
Glib::RefPtr<Gtk::ListStore> liststore_devices ;
|
Prevent flashing redraw of the devices combobox (#696149)
The device combobox was getting drawn blank, then getting drawn again
with the selected device. This was happening because at the start of
Win_GParted::refresh_combo_devices() the GTK model behind the combobox,
liststore_devices, was cleared, changing the active item, causing the
combobox to get redrawn empty. After the GTK model had been repopulated
the active item was reset causing the comboxbox to get redrawn again,
now showing the selected device. Call flow:
Win_GParted::refresh_combo_devices()
liststore_devices->clear()
//Gtk::Combobox emits signal_change. Registered callbacks
//called.
Win_GParted::combo_devices_changed()
Win_GParted::Refresh_Visual()
...
...
combo_devices.set_active(current_device);
//Gtk::Combobox emits signal_change. Registered callbacks
//called.
Win_GParted::combo_devices_changed()
Win_GParted::Refresh_Visual()
...
This has always been the case, since the device combobox was first added
to GParted before version 0.1 by commit:
3a4b43e0adb3974dea656fcbe90d5e191e0e9784
replaced deprecated OptionMenu with ComboBox ...
Fix by temporarily blocking the devices comboxbox from emitting
signal_changed while the GTK model behind the combobox is recreated.
However, since automatic selection of the largest free space was added
[1] in GParted 0.15.0, a more noticeable flashing redraw issue was
caused in which the partition graphic and partition list were both drawn
blank then redrawn fully populated. Some distributions were not
affected by this at all, some only experienced a single flash and others
suffered from two or more flashing redraws. Some affected
distributions: CentOS 5.10, 6.5, 7.0, Debian 6, Fedora 14, 19, 20,
Ubuntu 13.10, Xubuntu 14.04 LTS. Did not occur on Kubuntu 12.04 LTS.
[1] 5b53c12f6ee12312a9bacb44b8b05b12a540d3d6
Select largest unallocated partition by default (#667365)
Bug #696149 - Double refresh of display introduced with default
unallocated space
2014-08-22 04:35:39 -06:00
|
|
|
sigc::connection combo_devices_changed_connection;
|
2005-12-29 16:35:37 -07:00
|
|
|
|
|
|
|
struct treeview_devices_Columns : public Gtk::TreeModelColumnRecord
|
|
|
|
{
|
|
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > icon ;
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> device ;
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> size ;
|
|
|
|
|
|
|
|
treeview_devices_Columns()
|
|
|
|
{
|
|
|
|
add( icon ) ;
|
|
|
|
add( device ) ;
|
|
|
|
add( size ) ;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
treeview_devices_Columns treeview_devices_columns ;
|
2004-09-19 14:24:53 -06:00
|
|
|
|
2018-08-02 01:24:41 -06:00
|
|
|
// Indices for toolbar
|
|
|
|
int
|
|
|
|
TOOLBAR_NEW,
|
|
|
|
TOOLBAR_DEL,
|
|
|
|
TOOLBAR_RESIZE_MOVE,
|
|
|
|
TOOLBAR_COPY,
|
|
|
|
TOOLBAR_PASTE,
|
|
|
|
TOOLBAR_UNDO,
|
|
|
|
TOOLBAR_APPLY;
|
|
|
|
|
|
|
|
enum MainMenu_Items
|
|
|
|
{
|
|
|
|
MENU_DEVICES = 0,
|
|
|
|
MENU_EDIT,
|
|
|
|
MENU_UNDO_OPERATION,
|
|
|
|
MENU_CLEAR_OPERATIONS,
|
|
|
|
MENU_APPLY_OPERATIONS,
|
|
|
|
MENU_VIEW,
|
|
|
|
MENU_DEVICE_INFORMATION,
|
|
|
|
MENU_PENDING_OPERATIONS,
|
|
|
|
MENU_DEVICE,
|
|
|
|
MENU_PARTITION
|
|
|
|
};
|
|
|
|
|
|
|
|
enum PartitionMenu_Items
|
|
|
|
{
|
|
|
|
MENU_NEW = 0,
|
|
|
|
MENU_DEL,
|
|
|
|
MENU_RESIZE_MOVE,
|
|
|
|
MENU_COPY,
|
|
|
|
MENU_PASTE,
|
|
|
|
MENU_FORMAT,
|
|
|
|
MENU_TOGGLE_CRYPT_BUSY,
|
|
|
|
MENU_TOGGLE_FS_BUSY,
|
|
|
|
MENU_MOUNT,
|
|
|
|
MENU_NAME_PARTITION,
|
|
|
|
MENU_FLAGS,
|
|
|
|
MENU_CHECK,
|
2019-06-27 05:48:26 -06:00
|
|
|
MENU_LABEL_FILESYSTEM,
|
2018-08-02 01:24:41 -06:00
|
|
|
MENU_CHANGE_UUID,
|
|
|
|
MENU_INFO
|
|
|
|
};
|
|
|
|
std::map<int, Gtk::MenuItem*> mainmenu_items;
|
|
|
|
std::map<int, Gtk::MenuItem*> partitionmenu_items;
|
2006-08-20 10:51:18 -06:00
|
|
|
|
2004-09-19 14:24:53 -06:00
|
|
|
//usefull variables which are used by many different functions...
|
2004-10-02 03:39:16 -06:00
|
|
|
unsigned short new_count;//new_count keeps track of the new created partitions
|
2006-02-22 15:05:15 -07:00
|
|
|
bool OPERATIONSLIST_OPEN ;
|
2016-12-16 00:31:49 -07:00
|
|
|
|
2004-11-17 06:00:25 -07:00
|
|
|
GParted_Core gparted_core ;
|
2005-12-29 16:35:37 -07:00
|
|
|
std::vector<Gtk::Label *> device_info ;
|
2004-11-17 06:00:25 -07:00
|
|
|
|
2004-10-16 09:42:08 -06:00
|
|
|
//stuff for progress overview and pulsebar
|
2013-01-14 19:20:49 -07:00
|
|
|
bool pulsebar_pulse();
|
2013-02-21 17:57:33 -07:00
|
|
|
sigc::connection pulsetimer;
|
2004-09-19 14:24:53 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
} //GParted
|
|
|
|
|
2013-05-27 05:20:16 -06:00
|
|
|
#endif /* GPARTED_WIN_GPARTED_H */
|