modern-gtk2: Use Gtk::Widget::set_tooltip_text() (!17)
GParted was using Gtk::Tooltips widgets for tooltips, but they were deprecated in gtkmm 2.12 in favour of Gtk::Tooltip widgets. (Note the spelling difference, with and without a trailing 's'). As GParted's tooltips are all text only continue to use the shortcut, which is now Gtk::Widget::set_tooltip_text(). References: https://developer.gnome.org/gtkmm/2.24/classGtk_1_1Tooltips.html#details https://developer.gnome.org/gtkmm/2.24/classGtk_1_1Tooltip.html#details https://gitlab.gnome.org/GNOME/gtkmm/blob/2.20.0/NEWS#L740 Closes !17 - Gtk2 modernisation
This commit is contained in:
parent
6a80ca8f7d
commit
430ac9240c
|
@ -28,7 +28,6 @@
|
|||
#include <gtkmm/spinbutton.h>
|
||||
#include <gtkmm/table.h>
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/tooltips.h>
|
||||
#include <gtkmm/optionmenu.h>
|
||||
|
||||
namespace GParted
|
||||
|
|
|
@ -226,7 +226,6 @@ private:
|
|||
Gtk::Statusbar statusbar;
|
||||
Gtk::Image *image ;
|
||||
Gtk::ScrolledWindow *scrollwindow;
|
||||
Gtk::Tooltips tooltips ;
|
||||
Gtk::Table *table ;
|
||||
Gtk::ProgressBar pulsebar ;
|
||||
Gtk::TreeRow treerow;
|
||||
|
|
|
@ -244,12 +244,12 @@ void Win_GParted::init_toolbar()
|
|||
toolbutton ->signal_clicked() .connect( sigc::mem_fun( *this, &Win_GParted::activate_new ) );
|
||||
toolbar_main .append( *toolbutton );
|
||||
TOOLBAR_NEW = index++ ;
|
||||
toolbutton ->set_tooltip(tooltips, _("Create a new partition in the selected unallocated space") );
|
||||
toolbutton->set_tooltip_text(_("Create a new partition in the selected unallocated space"));
|
||||
toolbutton = Gtk::manage(new Gtk::ToolButton(Gtk::Stock::DELETE));
|
||||
toolbutton ->signal_clicked().connect( sigc::mem_fun(*this, &Win_GParted::activate_delete) );
|
||||
toolbar_main.append(*toolbutton);
|
||||
TOOLBAR_DEL = index++ ;
|
||||
toolbutton ->set_tooltip(tooltips, _("Delete the selected partition") );
|
||||
toolbutton->set_tooltip_text(_("Delete the selected partition"));
|
||||
toolbar_main.append( *(Gtk::manage(new Gtk::SeparatorToolItem)) );
|
||||
index++ ;
|
||||
|
||||
|
@ -271,7 +271,7 @@ void Win_GParted::init_toolbar()
|
|||
toolbutton ->signal_clicked().connect( sigc::mem_fun(*this, &Win_GParted::activate_resize) );
|
||||
toolbar_main.append(*toolbutton);
|
||||
TOOLBAR_RESIZE_MOVE = index++ ;
|
||||
toolbutton ->set_tooltip(tooltips, _("Resize/Move the selected partition") );
|
||||
toolbutton->set_tooltip_text(_("Resize/Move the selected partition"));
|
||||
toolbar_main.append( *(Gtk::manage(new Gtk::SeparatorToolItem)) );
|
||||
index++ ;
|
||||
|
||||
|
@ -280,12 +280,12 @@ void Win_GParted::init_toolbar()
|
|||
toolbutton ->signal_clicked().connect( sigc::mem_fun(*this, &Win_GParted::activate_copy) );
|
||||
toolbar_main.append(*toolbutton);
|
||||
TOOLBAR_COPY = index++ ;
|
||||
toolbutton ->set_tooltip(tooltips, _("Copy the selected partition to the clipboard") );
|
||||
toolbutton->set_tooltip_text(_("Copy the selected partition to the clipboard"));
|
||||
toolbutton = Gtk::manage(new Gtk::ToolButton(Gtk::Stock::PASTE));
|
||||
toolbutton ->signal_clicked().connect( sigc::mem_fun(*this, &Win_GParted::activate_paste) );
|
||||
toolbar_main.append(*toolbutton);
|
||||
TOOLBAR_PASTE = index++ ;
|
||||
toolbutton ->set_tooltip(tooltips, _("Paste the partition from the clipboard") );
|
||||
toolbutton->set_tooltip_text(_("Paste the partition from the clipboard"));
|
||||
toolbar_main.append( *(Gtk::manage(new Gtk::SeparatorToolItem)) );
|
||||
index++ ;
|
||||
|
||||
|
@ -297,7 +297,7 @@ void Win_GParted::init_toolbar()
|
|||
toolbar_main.append(*toolbutton);
|
||||
TOOLBAR_UNDO = index++ ;
|
||||
toolbutton ->set_sensitive( false );
|
||||
toolbutton ->set_tooltip(tooltips, _("Undo Last Operation") );
|
||||
toolbutton->set_tooltip_text(_("Undo Last Operation"));
|
||||
}
|
||||
|
||||
toolbutton = Gtk::manage(new Gtk::ToolButton(Gtk::Stock::APPLY));
|
||||
|
@ -305,8 +305,8 @@ void Win_GParted::init_toolbar()
|
|||
toolbar_main.append(*toolbutton);
|
||||
TOOLBAR_APPLY = index++ ;
|
||||
toolbutton ->set_sensitive( false );
|
||||
toolbutton ->set_tooltip(tooltips, _("Apply All Operations") );
|
||||
|
||||
toolbutton->set_tooltip_text(_("Apply All Operations"));
|
||||
|
||||
//initialize and pack combo_devices
|
||||
liststore_devices = Gtk::ListStore::create( treeview_devices_columns ) ;
|
||||
combo_devices .set_model( liststore_devices ) ;
|
||||
|
|
Loading…
Reference in New Issue