mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-27 14:25:34 +00:00
Some more UI tweaks.
A new "Add Device" dialog - allows specifying type and additional smartctl parameters. Drive properties in preferences - allow specifying device type.
This commit is contained in:
@@ -68,8 +68,6 @@ When adding device via GUI, have an option to specify "-d" type and other parame
|
||||
|
||||
|
||||
Rework drive properties UI:
|
||||
add properties for each multi-drive (with type in a separate entry).
|
||||
smartctl options
|
||||
use 48-bit or not or auto.
|
||||
Enable/disable/dont_touch SMART on startup for this drive.
|
||||
Enable/disable/dont_touch AODC on startup for this drive.
|
||||
|
||||
@@ -347,6 +347,7 @@ AC_SUBST(WINDOWS_ARCH)
|
||||
|
||||
|
||||
RES_FILES="src/res/gsc_about_dialog.glade \
|
||||
src/res/gsc_add_device_window.glade \
|
||||
src/res/gsc_executor_log_window.glade \
|
||||
src/res/gsc_help_window.glade \
|
||||
src/res/gsc_info_window.glade \
|
||||
|
||||
@@ -30,10 +30,10 @@ gsmartcontrol_LDADD = $(top_builddir)/src/applib/libapplib.a \
|
||||
$(top_builddir)/src/pcrecpp/libpcrecpp.a $(top_builddir)/src/libdebug/libdebug.a \
|
||||
$(top_builddir)/src/res/libres.a $(WINRES_OBJ)
|
||||
|
||||
noinst_HEADERS = global_macros.h gsc_about_dialog.h gsc_executor_error_dialog.h \
|
||||
noinst_HEADERS = global_macros.h gsc_about_dialog.h gsc_add_device_window.h gsc_executor_error_dialog.h \
|
||||
gsc_executor_log_window.h gsc_help_window.h gsc_info_window.h gsc_init.h gsc_main_window.h \
|
||||
gsc_main_window_iconview.h gsc_preferences_window.h gsc_settings.h gsc_text_window.h
|
||||
gsmartcontrol_SOURCES = $(WIN_MAIN_SRC) gsc_about_dialog.cpp \
|
||||
gsmartcontrol_SOURCES = $(WIN_MAIN_SRC) gsc_about_dialog.cpp gsc_add_device_window.cpp \
|
||||
gsc_executor_error_dialog.cpp gsc_executor_log_window.cpp gsc_help_window.cpp gsc_info_window.cpp \
|
||||
gsc_init.cpp gsc_main.cpp gsc_main_window.cpp gsc_preferences_window.cpp
|
||||
|
||||
|
||||
@@ -27,16 +27,22 @@ inline device_option_map_t app_unserialize_device_option_map(const std::string&
|
||||
hz::Bin2AsciiEncoder enc;
|
||||
|
||||
std::vector<std::string> pairs;
|
||||
hz::string_split(str, ';', pairs, true);
|
||||
hz::string_split(str, ";", pairs, true);
|
||||
|
||||
device_option_map_t option_map;
|
||||
for (std::vector<std::string>::const_iterator iter = pairs.begin(); iter != pairs.end(); ++iter) {
|
||||
std::vector<std::string> dev_entry;
|
||||
hz::string_split(*iter, ':', dev_entry, true);
|
||||
hz::string_split(*iter, ":", dev_entry, true, 2);
|
||||
|
||||
std::string dev, opt;
|
||||
if (dev_entry.size() == 2) {
|
||||
std::string dev = hz::string_trim_copy(enc.decode(dev_entry[0]));
|
||||
std::string opt = hz::string_trim_copy(enc.decode(dev_entry[1]));
|
||||
dev = dev_entry.at(0); // includes type (separated by encoded "::")
|
||||
opt = dev_entry.at(1);
|
||||
}
|
||||
|
||||
if (dev != "") {
|
||||
dev = hz::string_trim_copy(enc.decode(dev));
|
||||
opt = hz::string_trim_copy(enc.decode(opt));
|
||||
|
||||
// ignore potentially harmful chars
|
||||
if (!dev.empty() && !opt.empty()
|
||||
@@ -62,7 +68,7 @@ inline std::string app_serialize_device_option_map(const device_option_map_t& op
|
||||
pairs.push_back(enc.encode(iter->first) + ":" + enc.encode(iter->second));
|
||||
}
|
||||
|
||||
return hz::string_join(pairs, ';');
|
||||
return hz::string_join(pairs, ";");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
/**************************************************************************
|
||||
Copyright:
|
||||
(C) 2011 Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
License: See LICENSE_gsmartcontrol.txt
|
||||
***************************************************************************/
|
||||
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/entry.h>
|
||||
#include <gtkmm/filechooserdialog.h>
|
||||
#include <gtkmm/stock.h>
|
||||
#include <gdk/gdkkeysyms.h> // GDK_Escape
|
||||
|
||||
#include "hz/fs_path.h"
|
||||
#include "hz/string_sprintf.h"
|
||||
#include "applib/app_gtkmm_utils.h"
|
||||
|
||||
#include "gsc_add_device_window.h"
|
||||
#include "gsc_main_window.h"
|
||||
|
||||
|
||||
|
||||
|
||||
GscAddDeviceWindow::GscAddDeviceWindow(BaseObjectType* gtkcobj, const app_ui_res_ref_t& ref_ui)
|
||||
: AppUIResWidget<GscAddDeviceWindow, true>(gtkcobj, ref_ui), main_window_(0)
|
||||
{
|
||||
// Connect callbacks
|
||||
|
||||
APP_GTKMM_CONNECT_VIRTUAL(delete_event); // make sure the event handler is called
|
||||
|
||||
Gtk::Button* window_cancel_button = 0;
|
||||
APP_UI_RES_AUTO_CONNECT(window_cancel_button, clicked);
|
||||
|
||||
Gtk::Button* window_ok_button = 0;
|
||||
APP_UI_RES_AUTO_CONNECT(window_ok_button, clicked);
|
||||
|
||||
Gtk::Button* device_name_browse_button = 0;
|
||||
APP_UI_RES_AUTO_CONNECT(device_name_browse_button, clicked);
|
||||
|
||||
|
||||
Glib::ustring device_name_tooltip = "Device name, e.g. %s.";
|
||||
#ifdef _WIN32
|
||||
device_name_tooltip = hz::string_sprintf(device_name_tooltip.c_str(), "\"pd0\" for the first physical drive");
|
||||
#else
|
||||
device_name_tooltip = hz::string_sprintf(device_name_tooltip.c_str(), "\"/dev/sda\" or \"/dev/twa0\"");
|
||||
#endif
|
||||
Gtk::Label* device_name_label = lookup_widget<Gtk::Label*>("device_name_label");
|
||||
app_gtkmm_set_widget_tooltip(*device_name_label, device_name_tooltip);
|
||||
|
||||
|
||||
Gtk::Entry* device_name_entry = 0;
|
||||
APP_UI_RES_AUTO_CONNECT(device_name_entry, changed);
|
||||
|
||||
|
||||
// Accelerators
|
||||
|
||||
Glib::RefPtr<Gtk::AccelGroup> accel_group = this->get_accel_group();
|
||||
if (window_cancel_button) {
|
||||
window_cancel_button->add_accelerator("clicked", accel_group, GDK_Escape,
|
||||
Gdk::ModifierType(0), Gtk::AccelFlags(0));
|
||||
}
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
// "Browse" doesn't make sense in win32, hide it.
|
||||
if (device_name_browse_button) {
|
||||
device_name_browse_button->hide();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// initial state of OK button
|
||||
on_device_name_entry_changed();
|
||||
|
||||
// show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GscAddDeviceWindow::set_main_window(GscMainWindow* main_window)
|
||||
{
|
||||
main_window_ = main_window;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GscAddDeviceWindow::on_window_cancel_button_clicked()
|
||||
{
|
||||
destroy(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GscAddDeviceWindow::on_window_ok_button_clicked()
|
||||
{
|
||||
std::string dev, type, params;
|
||||
if (Gtk::Entry* entry = lookup_widget<Gtk::Entry*>("device_name_entry")) {
|
||||
dev = entry->get_text();
|
||||
}
|
||||
if (Gtk::Entry* entry = lookup_widget<Gtk::Entry*>("device_type_entry")) {
|
||||
type = entry->get_text();
|
||||
}
|
||||
if (Gtk::Entry* entry = lookup_widget<Gtk::Entry*>("smartctl_params_entry")) {
|
||||
params = entry->get_text();
|
||||
}
|
||||
if (main_window_ && !dev.empty()) {
|
||||
main_window_->add_device(dev, type, params);
|
||||
}
|
||||
|
||||
destroy(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GscAddDeviceWindow::on_device_name_browse_button_clicked()
|
||||
{
|
||||
std::string default_file;
|
||||
|
||||
Gtk::Entry* entry = this->lookup_widget<Gtk::Entry*>("device_name_entry");
|
||||
if (!entry)
|
||||
return;
|
||||
|
||||
Gtk::FileChooserDialog dialog(*this, "Choose Device...",
|
||||
Gtk::FILE_CHOOSER_ACTION_OPEN);
|
||||
|
||||
// Add response buttons the the dialog
|
||||
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
|
||||
dialog.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT);
|
||||
|
||||
// Note: This works on absolute paths only (otherwise it's gtk warning).
|
||||
hz::FsPath p(entry->get_text());
|
||||
if (p.is_absolute())
|
||||
dialog.set_filename(p.str()); // change to its dir and select it if exists.
|
||||
|
||||
// Show the dialog and wait for a user response
|
||||
int result = dialog.run(); // the main cycle blocks here
|
||||
|
||||
// Handle the response
|
||||
switch (result) {
|
||||
case Gtk::RESPONSE_ACCEPT:
|
||||
{
|
||||
entry->set_text(std::string(dialog.get_filename()));
|
||||
break;
|
||||
}
|
||||
|
||||
case Gtk::RESPONSE_CANCEL: case Gtk::RESPONSE_DELETE_EVENT:
|
||||
// nothing, the dialog is closed already
|
||||
break;
|
||||
|
||||
default:
|
||||
debug_out_error("app", DBG_FUNC_MSG << "Unknown dialog response code: " << result << ".\n");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GscAddDeviceWindow::on_device_name_entry_changed()
|
||||
{
|
||||
// Allow OK only if name is not empty
|
||||
Gtk::Entry* entry = lookup_widget<Gtk::Entry*>("device_name_entry");
|
||||
Gtk::Button* ok_button = lookup_widget<Gtk::Button*>("window_ok_button");
|
||||
if (entry && ok_button) {
|
||||
ok_button->set_sensitive(!entry->get_text().empty());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/**************************************************************************
|
||||
Copyright:
|
||||
(C) 2011 Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
License: See LICENSE_gsmartcontrol.txt
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef GSC_ADD_DEVICE_WINDOW_H
|
||||
#define GSC_ADD_DEVICE_WINDOW_H
|
||||
|
||||
#include <gtkmm/window.h>
|
||||
|
||||
#include "applib/app_ui_res_utils.h"
|
||||
|
||||
|
||||
|
||||
class GscMainWindow;
|
||||
|
||||
|
||||
/// The "Add Device" window.
|
||||
/// Use create() / destroy() with this class instead of new / delete!
|
||||
class GscAddDeviceWindow : public AppUIResWidget<GscAddDeviceWindow, true> {
|
||||
|
||||
public:
|
||||
|
||||
// name of glade/ui file without a .glade/.ui extension and quotes
|
||||
APP_UI_RES_DATA_INIT(gsc_add_device_window);
|
||||
|
||||
|
||||
/// glade/gtkbuilder needs this constructor
|
||||
GscAddDeviceWindow(BaseObjectType* gtkcobj, const app_ui_res_ref_t& ref_ui);
|
||||
|
||||
/// Compiler requirement
|
||||
virtual ~GscAddDeviceWindow()
|
||||
{ }
|
||||
|
||||
|
||||
/// On OK button click main_window->add_device() will be called.
|
||||
void set_main_window(GscMainWindow* main_window);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
// ---------- override virtual methods
|
||||
|
||||
/// Destroy this object on delete event (by default it calls hide()).
|
||||
bool on_delete_event_before(GdkEventAny* e)
|
||||
{
|
||||
destroy(this); // deletes this object and nullifies instance
|
||||
return true; // event handled, don't call default virtual handler
|
||||
}
|
||||
|
||||
|
||||
// ---------- other callbacks
|
||||
|
||||
/// Button click callback
|
||||
void on_window_cancel_button_clicked();
|
||||
|
||||
/// Button click callback
|
||||
void on_window_ok_button_clicked();
|
||||
|
||||
/// Button click callback
|
||||
void on_device_name_browse_button_clicked();
|
||||
|
||||
/// Entry text change callback
|
||||
void on_device_name_entry_changed();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
GscMainWindow* main_window_; ///< The main window that created us
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "gsc_main_window_iconview.h"
|
||||
#include "gsc_main_window.h"
|
||||
#include "gsc_add_device_window.h"
|
||||
|
||||
|
||||
|
||||
@@ -1195,71 +1196,10 @@ GscInfoWindow* GscMainWindow::show_device_info_window(StorageDeviceRefPtr drive)
|
||||
|
||||
void GscMainWindow::show_add_device_chooser()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
// A simple text entry dialog, since there are no device files on win32.
|
||||
|
||||
static std::string last_str;
|
||||
if (last_str.empty())
|
||||
last_str = "pd0";
|
||||
|
||||
std::string dev;
|
||||
if (gui_show_text_entry_dialog("Add Device", "Enter a device name",
|
||||
"For example, pd0 means the first physical drive",
|
||||
dev, last_str, this, false)) {
|
||||
last_str = dev; // safe for the future
|
||||
std::string type_arg = ""; /// TODO
|
||||
std::string extra_args = ""; /// TODO
|
||||
// both the GUI and the API is in utf-8, no conversion is necessary.
|
||||
this->add_device(dev, type_arg, extra_args);
|
||||
}
|
||||
|
||||
|
||||
#else // non-win32:
|
||||
|
||||
// Show a file chooser
|
||||
|
||||
static std::string last_dir;
|
||||
if (last_dir.empty())
|
||||
last_dir = "/dev";
|
||||
|
||||
Gtk::FileChooserDialog dialog(*this, "Choose Device File...",
|
||||
Gtk::FILE_CHOOSER_ACTION_OPEN);
|
||||
|
||||
// Add response buttons the the dialog
|
||||
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
|
||||
dialog.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT);
|
||||
|
||||
if (!last_dir.empty())
|
||||
dialog.set_current_folder(last_dir);
|
||||
|
||||
// Show the dialog and wait for a user response
|
||||
int result = dialog.run(); // the main cycle blocks here
|
||||
|
||||
// Handle the response
|
||||
switch (result) {
|
||||
case Gtk::RESPONSE_ACCEPT:
|
||||
{
|
||||
last_dir = dialog.get_current_folder(); // safe for the future
|
||||
|
||||
std::string file = dialog.get_filename(); // in fs encoding
|
||||
std::string type_arg = ""; /// TODO
|
||||
std::string extra_args = ""; /// TODO
|
||||
this->add_device(file, type_arg, extra_args);
|
||||
break;
|
||||
}
|
||||
|
||||
case Gtk::RESPONSE_CANCEL: case Gtk::RESPONSE_DELETE_EVENT:
|
||||
// nothing, the dialog is closed already
|
||||
break;
|
||||
|
||||
default:
|
||||
debug_out_error("app", DBG_FUNC_MSG << "Unknown dialog response code: " << result << ".\n");
|
||||
break;
|
||||
}
|
||||
|
||||
#endif // non-win32
|
||||
|
||||
GscAddDeviceWindow* window = GscAddDeviceWindow::create();
|
||||
window->set_main_window(this);
|
||||
window->set_transient_for(*this);
|
||||
window->show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,16 +38,20 @@ class GscPreferencesDeviceOptionsTreeView : public Gtk::TreeView {
|
||||
{
|
||||
Gtk::TreeModelColumnRecord model_columns;
|
||||
|
||||
// Device, [Parameters], [Device Real].
|
||||
// Device, Type, [Parameters], [Device Real], [Type Real].
|
||||
// Device may hold "<empty>", while Device Real is "".
|
||||
// Type may hold "<all>", while Type Real is "".
|
||||
|
||||
model_columns.add(col_device);
|
||||
this->append_column("Device", col_device);
|
||||
this->set_search_column(col_device.index());
|
||||
|
||||
model_columns.add(col_parameters);
|
||||
model_columns.add(col_type);
|
||||
this->append_column("Type", col_type);
|
||||
|
||||
model_columns.add(col_parameters);
|
||||
model_columns.add(col_device_real);
|
||||
model_columns.add(col_type_real);
|
||||
|
||||
|
||||
// create a TreeModel (ListStore)
|
||||
@@ -78,12 +82,14 @@ class GscPreferencesDeviceOptionsTreeView : public Gtk::TreeView {
|
||||
}
|
||||
|
||||
|
||||
void add_new_row(const std::string& device, const std::string& params, bool select = true)
|
||||
void add_new_row(const std::string& device, const std::string& type, const std::string& params, bool select = true)
|
||||
{
|
||||
Gtk::TreeRow row = *(model->append());
|
||||
row[col_device] = (device.empty() ? "<empty>" : device);
|
||||
row[col_type] = (type.empty() ? "<all>" : type);
|
||||
row[col_parameters] = params;
|
||||
row[col_device_real] = device;
|
||||
row[col_type_real] = type;
|
||||
|
||||
if (select)
|
||||
this->get_selection()->select(row);
|
||||
@@ -100,6 +106,16 @@ class GscPreferencesDeviceOptionsTreeView : public Gtk::TreeView {
|
||||
}
|
||||
|
||||
|
||||
void update_selected_row_type(const std::string& type)
|
||||
{
|
||||
if (this->get_selection()->count_selected_rows()) {
|
||||
Gtk::TreeRow row = *(this->get_selection()->get_selected());
|
||||
row[col_type] = (type.empty() ? "<all>" : type);
|
||||
row[col_type_real] = type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void update_selected_row_params(const std::string& params)
|
||||
{
|
||||
if (this->get_selection()->count_selected_rows()) {
|
||||
@@ -125,7 +141,12 @@ class GscPreferencesDeviceOptionsTreeView : public Gtk::TreeView {
|
||||
{
|
||||
clear_all();
|
||||
for (device_option_map_t::const_iterator iter = devmap.begin(); iter != devmap.end(); ++iter) {
|
||||
this->add_new_row(iter->first, iter->second, false);
|
||||
std::vector<std::string> parts;
|
||||
hz::string_split(iter->first, "::", parts, 2);
|
||||
std::string dev = (parts.size() > 0 ? parts.at(0) : "");
|
||||
std::string type = (parts.size() > 1 ? parts.at(1) : "");
|
||||
std::string params = iter->second;
|
||||
this->add_new_row(dev, type, params, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,8 +158,16 @@ class GscPreferencesDeviceOptionsTreeView : public Gtk::TreeView {
|
||||
Gtk::TreeNodeChildren children = model->children();
|
||||
for (Gtk::TreeNodeChildren::iterator iter = children.begin(); iter != children.end(); ++iter) {
|
||||
Gtk::TreeModel::Row row = *iter;
|
||||
if (!row.get_value(col_device_real).empty() && devmap.find(row.get_value(col_device_real)) == devmap.end())
|
||||
devmap[row.get_value(col_device_real)] = row.get_value(col_parameters);
|
||||
std::string dev = row.get_value(col_device_real);
|
||||
if (!dev.empty()) {
|
||||
std::string par = row.get_value(col_type_real);
|
||||
if (!par.empty()) {
|
||||
dev += "::" + par;
|
||||
}
|
||||
if (devmap.find(dev) == devmap.end()) {
|
||||
devmap[dev] = row.get_value(col_parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return devmap;
|
||||
@@ -149,10 +178,11 @@ class GscPreferencesDeviceOptionsTreeView : public Gtk::TreeView {
|
||||
// callback
|
||||
void on_selection_changed()
|
||||
{
|
||||
std::string dev, par;
|
||||
std::string dev, type, par;
|
||||
if (this->get_selection()->count_selected_rows()) {
|
||||
Gtk::TreeRow row = *(this->get_selection()->get_selected());
|
||||
dev = row[col_device_real];
|
||||
type = row[col_type_real];
|
||||
par = row[col_parameters];
|
||||
preferences_window->device_widget_set_remove_possible(true);
|
||||
|
||||
@@ -160,7 +190,7 @@ class GscPreferencesDeviceOptionsTreeView : public Gtk::TreeView {
|
||||
preferences_window->device_widget_set_remove_possible(false);
|
||||
}
|
||||
|
||||
preferences_window->update_device_widgets(dev, par);
|
||||
preferences_window->update_device_widgets(dev, type, par);
|
||||
}
|
||||
|
||||
|
||||
@@ -168,8 +198,10 @@ class GscPreferencesDeviceOptionsTreeView : public Gtk::TreeView {
|
||||
Glib::RefPtr<Gtk::ListStore> model;
|
||||
|
||||
Gtk::TreeModelColumn<Glib::ustring> col_device;
|
||||
Gtk::TreeModelColumn<Glib::ustring> col_type;
|
||||
Gtk::TreeModelColumn<std::string> col_parameters;
|
||||
Gtk::TreeModelColumn<std::string> col_device_real;
|
||||
Gtk::TreeModelColumn<std::string> col_type_real;
|
||||
|
||||
GscPreferencesWindow* preferences_window;
|
||||
|
||||
@@ -210,15 +242,17 @@ GscPreferencesWindow::GscPreferencesWindow(BaseObjectType* gtkcobj, const app_ui
|
||||
|
||||
Gtk::Entry* device_options_device_entry = 0;
|
||||
APP_UI_RES_AUTO_CONNECT(device_options_device_entry, changed);
|
||||
Glib::ustring device_options_tooltip = "Format: <device name>::<type>, where \"::<type>\" part is optional. "
|
||||
" An example of device name would be %s. Type is an argument of smartctl -d option and can be "
|
||||
" used to specify a drive behind a RAID device, e.g. /dev/twa0::3ware,2";
|
||||
Glib::ustring device_options_tooltip = "Device name, e.g. %s.";
|
||||
#ifdef _WIN32
|
||||
device_options_tooltip = hz::string_sprintf(device_options_tooltip.c_str(), "\"pd0\" for the first physical drive");
|
||||
#else
|
||||
device_options_tooltip = hz::string_sprintf(device_options_tooltip.c_str(), "\"/dev/sda\"");
|
||||
#endif
|
||||
app_gtkmm_set_widget_tooltip(*device_options_device_entry, device_options_tooltip);
|
||||
Gtk::Label* device_options_device_label = lookup_widget<Gtk::Label*>("device_options_device_label");
|
||||
app_gtkmm_set_widget_tooltip(*device_options_device_label, device_options_tooltip);
|
||||
|
||||
Gtk::Entry* device_options_type_entry = 0;
|
||||
APP_UI_RES_AUTO_CONNECT(device_options_type_entry, changed);
|
||||
|
||||
Gtk::Entry* device_options_parameter_entry = 0;
|
||||
APP_UI_RES_AUTO_CONNECT(device_options_parameter_entry, changed);
|
||||
@@ -258,13 +292,16 @@ GscPreferencesWindow::GscPreferencesWindow(BaseObjectType* gtkcobj, const app_ui
|
||||
|
||||
|
||||
|
||||
void GscPreferencesWindow::update_device_widgets(const std::string& device, const std::string& params)
|
||||
void GscPreferencesWindow::update_device_widgets(const std::string& device, const std::string& type, const std::string& params)
|
||||
{
|
||||
Gtk::Entry* entry = 0;
|
||||
|
||||
if ((entry = this->lookup_widget<Gtk::Entry*>("device_options_device_entry")))
|
||||
entry->set_text(device);
|
||||
|
||||
if ((entry = this->lookup_widget<Gtk::Entry*>("device_options_type_entry")))
|
||||
entry->set_text(type);
|
||||
|
||||
if ((entry = this->lookup_widget<Gtk::Entry*>("device_options_parameter_entry")))
|
||||
entry->set_text(params);
|
||||
}
|
||||
@@ -480,18 +517,21 @@ void GscPreferencesWindow::on_device_options_remove_device_button_clicked()
|
||||
void GscPreferencesWindow::on_device_options_add_device_button_clicked()
|
||||
{
|
||||
Gtk::Entry* entry = 0;
|
||||
std::string dev, par;
|
||||
std::string dev, type, par;
|
||||
|
||||
if ((entry = this->lookup_widget<Gtk::Entry*>("device_options_device_entry")))
|
||||
dev = entry->get_text();
|
||||
|
||||
if ((entry = this->lookup_widget<Gtk::Entry*>("device_options_type_entry")))
|
||||
type = entry->get_text();
|
||||
|
||||
if ((entry = this->lookup_widget<Gtk::Entry*>("device_options_parameter_entry")))
|
||||
par = entry->get_text();
|
||||
|
||||
if (device_options_treeview->has_selected_row()) {
|
||||
device_options_treeview->add_new_row("", ""); // without this it would clone the existing.
|
||||
device_options_treeview->add_new_row("", "", ""); // without this it would clone the existing.
|
||||
} else {
|
||||
device_options_treeview->add_new_row(dev, par);
|
||||
device_options_treeview->add_new_row(dev, type, par);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -506,6 +546,15 @@ void GscPreferencesWindow::on_device_options_device_entry_changed()
|
||||
|
||||
|
||||
|
||||
void GscPreferencesWindow::on_device_options_type_entry_changed()
|
||||
{
|
||||
Gtk::Entry* entry = 0;
|
||||
if ((entry = this->lookup_widget<Gtk::Entry*>("device_options_type_entry")))
|
||||
device_options_treeview->update_selected_row_type(entry->get_text());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GscPreferencesWindow::on_device_options_parameter_entry_changed()
|
||||
{
|
||||
Gtk::Entry* entry = 0;
|
||||
|
||||
@@ -35,7 +35,7 @@ class GscPreferencesWindow : public AppUIResWidget<GscPreferencesWindow, true> {
|
||||
{ }
|
||||
|
||||
|
||||
void update_device_widgets(const std::string& device, const std::string& params);
|
||||
void update_device_widgets(const std::string& device, const std::string& type, const std::string& params);
|
||||
|
||||
void device_widget_set_remove_possible(bool b);
|
||||
|
||||
@@ -90,6 +90,8 @@ class GscPreferencesWindow : public AppUIResWidget<GscPreferencesWindow, true> {
|
||||
|
||||
void on_device_options_device_entry_changed();
|
||||
|
||||
void on_device_options_type_entry_changed();
|
||||
|
||||
void on_device_options_parameter_entry_changed();
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ libres_a_SOURCES =
|
||||
# List _all_ sources that may be compiled. This is basically the same list as
|
||||
# in configure.ac, but with .cpp extensions and without paths.
|
||||
EXTRA_libres_a_SOURCES = gsc_about_dialog.glade.cpp gsc_about_dialog.ui.cpp \
|
||||
gsc_executor_log_window.glade.cpp gsc_executor_log_window.ui.cpp \
|
||||
gsc_add_device_window.glade.cpp gsc_add_drive_window.ui.cpp \
|
||||
gsc_executor_log_window.glade.cpp gsc_executor_log_window.ui.cpp \
|
||||
gsc_help_window.glade.cpp gsc_help_window.ui.cpp \
|
||||
gsc_info_window.glade.cpp gsc_info_window.ui.cpp \
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0"?>
|
||||
<glade-interface>
|
||||
<requires-version lib="gtk+" version="2.20"/>
|
||||
<widget class="GtkWindow" id="gsc_add_device_window">
|
||||
<property name="title" translatable="yes">Add Device - GSmartControl</property>
|
||||
<property name="modal">True</property>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="orientation">GTK_ORIENTATION_VERTICAL</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="orientation">GTK_ORIENTATION_VERTICAL</property>
|
||||
<child>
|
||||
<widget class="GtkTable" id="table1">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="device_name_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Device name, e.g. /dev/sda or /dev/twa0</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Device _name:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="device_name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="device_name_browse_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="label" translatable="yes">_Browse...</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip_text">Smartctl -d option, e.g. 3ware,2 for a third drive behind a 3ware RAID controller</property>
|
||||
<property name="tooltip" translatable="yes">Smartctl -d option, e.g. 3ware,2 for a third drive behind a 3ware RAID controller</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Device _type:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Additional smartctl parameters</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Smartctl parameters:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="device_type_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="smartctl_params_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="window_cancel_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="label" translatable="yes">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="window_ok_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="label" translatable="yes">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
||||
@@ -123,47 +123,6 @@
|
||||
<property name="n_columns">2</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label7">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip_text">A path to smartctl binary. If the path is not absolute, the binary will be looked for in user's $PATH.</property>
|
||||
<property name="tooltip" translatable="yes">A path to smartctl binary. If the path is not absolute, the binary will be looked for in user's $PATH.</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">S_martctl binary:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label8">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip_text">Global parameters for smartctl. These parameters will be used every time the progam invokes smartctl.</property>
|
||||
<property name="tooltip" translatable="yes">Global parameters for smartctl. These parameters will be used every time the progam invokes smartctl.</property>
|
||||
<property name="label" translatable="yes">Smartctl parameters:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="smartctl_options_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text">Global parameters for smartctl. These parameters will be used every time the progam invokes smartctl. Must be shell-escaped.</property>
|
||||
<property name="tooltip" translatable="yes">Global parameters for smartctl. These parameters will be used every time the progam invokes smartctl. Must be shell-escaped.</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox4">
|
||||
<property name="visible">True</property>
|
||||
@@ -195,6 +154,47 @@
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="smartctl_options_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text">Global parameters for smartctl. These parameters will be used every time the progam invokes smartctl. Must be shell-escaped.</property>
|
||||
<property name="tooltip" translatable="yes">Global parameters for smartctl. These parameters will be used every time the progam invokes smartctl. Must be shell-escaped.</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label8">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip_text">Global parameters for smartctl. These parameters will be used every time the progam invokes smartctl.</property>
|
||||
<property name="tooltip" translatable="yes">Global parameters for smartctl. These parameters will be used every time the progam invokes smartctl.</property>
|
||||
<property name="label" translatable="yes">Smartctl parameters:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label7">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip_text">A path to smartctl binary. If the path is not absolute, the binary will be looked for in user's $PATH.</property>
|
||||
<property name="tooltip" translatable="yes">A path to smartctl binary. If the path is not absolute, the binary will be looked for in user's $PATH.</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">S_martctl binary:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
@@ -341,8 +341,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip" translatable="yes">Device list</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="reorderable">True</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
@@ -397,68 +396,15 @@
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label9">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes"><b>Drive Properties:</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label12">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip_text">Device name (for example, "/dev/sda")</property>
|
||||
<property name="tooltip" translatable="yes">Device name (for example, "/dev/sda")</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">De_vice:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label66">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip_text">Smartctl parameters for this device. For example, to use older smartctl versions with libata devices, use "-d ata".</property>
|
||||
<property name="tooltip" translatable="yes">Smartctl parameters for this device. For example, to use older smartctl versions with libata devices, use "-d ata".</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">_Type:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="device_options_device_entry">
|
||||
<widget class="GtkEntry" id="device_options_parameter_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="device_options_type_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text">Smartctl parameters for this device. For example, to use older smartctl versions with libata devices, use "-d ata". Must be shell-escaped.</property>
|
||||
<property name="tooltip" translatable="yes">Smartctl parameters for this device. For example, to use older smartctl versions with libata devices, use "-d ata". Must be shell-escaped.</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -476,17 +422,64 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="device_options_parameters_entry">
|
||||
<widget class="GtkEntry" id="device_options_type_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text">Smartctl parameters for this device. For example, to use older smartctl versions with libata devices, use "-d ata". Must be shell-escaped.</property>
|
||||
<property name="tooltip" translatable="yes">Smartctl parameters for this device. For example, to use older smartctl versions with libata devices, use "-d ata". Must be shell-escaped.</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="device_options_device_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label66">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip_text">Match only this type of device (as specified to -d smartctl parameter). Leave empty for all types. This can be used to specify a drive behind a RAID device, e.g. 3ware,2.</property>
|
||||
<property name="tooltip" translatable="yes">Match only this type of device (as specified to -d smartctl parameter). Leave empty for all types. This can be used to specify a drive behind a RAID device, e.g. 3ware,2.</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">_Type:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="device_options_device_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">De_vice:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label9">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes"><b>Drive Properties:</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
@@ -43,8 +43,16 @@
|
||||
<property name="spacing">6</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<widget class="GtkButton" id="save_as_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text">Saved displayed text as...</property>
|
||||
<property name="tooltip" translatable="yes">Saved displayed text as...</property>
|
||||
<property name="label" translatable="yes">gtk-save-as</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<accelerator key="S" signal="activate" modifiers="GDK_CONTROL_MASK"/>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
@@ -56,16 +64,8 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="save_as_button">
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text">Saved displayed text as...</property>
|
||||
<property name="tooltip" translatable="yes">Saved displayed text as...</property>
|
||||
<property name="label" translatable="yes">gtk-save-as</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<accelerator key="S" signal="activate" modifiers="GDK_CONTROL_MASK"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
|
||||
Reference in New Issue
Block a user