Extend context menu of filebrowser with inspect entry (#5867)
This opens a popup inspector window at the current mouse position.
This commit is contained in:
parent
947f3dca00
commit
a449a01690
@ -151,6 +151,7 @@ FILEBROWSER_POPUPMOVEHEAD;Move to head of queue
|
||||
FILEBROWSER_POPUPMOVETO;Move to...
|
||||
FILEBROWSER_POPUPOPEN;Open
|
||||
FILEBROWSER_POPUPOPENINEDITOR;Open in Editor
|
||||
FILEBROWSER_POPUPINSPECT;Inspect
|
||||
FILEBROWSER_POPUPPROCESS;Put to queue
|
||||
FILEBROWSER_POPUPPROCESSFAST;Put to queue (Fast export)
|
||||
FILEBROWSER_POPUPPROFILEOPERATIONS;Processing profile operations
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "batchqueue.h"
|
||||
#include "clipboard.h"
|
||||
#include "inspector.h"
|
||||
#include "multilangmgr.h"
|
||||
#include "options.h"
|
||||
#include "paramsedited.h"
|
||||
@ -152,6 +153,8 @@ FileBrowser::FileBrowser () :
|
||||
pmenu = new Gtk::Menu ();
|
||||
pmenu->attach (*Gtk::manage(open = new Gtk::MenuItem (M("FILEBROWSER_POPUPOPEN"))), 0, 1, p, p + 1);
|
||||
p++;
|
||||
pmenu->attach (*Gtk::manage(inspect = new Gtk::MenuItem (M("FILEBROWSER_POPUPINSPECT"))), 0, 1, p, p + 1);
|
||||
p++;
|
||||
pmenu->attach (*Gtk::manage(develop = new MyImageMenuItem (M("FILEBROWSER_POPUPPROCESS"), "gears.png")), 0, 1, p, p + 1);
|
||||
p++;
|
||||
pmenu->attach (*Gtk::manage(developfast = new Gtk::MenuItem (M("FILEBROWSER_POPUPPROCESSFAST"))), 0, 1, p, p + 1);
|
||||
@ -405,6 +408,7 @@ FileBrowser::FileBrowser () :
|
||||
trash->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_Delete, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE);
|
||||
untrash->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_Delete, Gdk::SHIFT_MASK, Gtk::ACCEL_VISIBLE);
|
||||
open->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_Return, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE);
|
||||
inspect->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_F, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE);
|
||||
develop->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_B, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE);
|
||||
developfast->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_B, Gdk::CONTROL_MASK | Gdk::SHIFT_MASK, Gtk::ACCEL_VISIBLE);
|
||||
copyprof->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_C, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE);
|
||||
@ -416,6 +420,8 @@ FileBrowser::FileBrowser () :
|
||||
// Bind to event handlers
|
||||
open->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), open));
|
||||
|
||||
inspect->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), inspect));
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
rank[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), rank[i]));
|
||||
}
|
||||
@ -698,7 +704,6 @@ void FileBrowser::menuColorlabelActivated (Gtk::MenuItem* m)
|
||||
|
||||
void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
|
||||
{
|
||||
|
||||
std::vector<FileBrowserEntry*> mselected;
|
||||
|
||||
{
|
||||
@ -751,6 +756,8 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
|
||||
|
||||
if (m == open) {
|
||||
openRequested(mselected);
|
||||
} else if (m == inspect) {
|
||||
inspectRequested(mselected);
|
||||
} else if (m == remove) {
|
||||
tbl->deleteRequested (mselected, false, true);
|
||||
} else if (m == removeInclProc) {
|
||||
@ -2077,3 +2084,8 @@ void FileBrowser::openRequested( std::vector<FileBrowserEntry*> mselected)
|
||||
|
||||
tbl->openRequested (entries);
|
||||
}
|
||||
|
||||
void FileBrowser::inspectRequested(std::vector<FileBrowserEntry*> mselected)
|
||||
{
|
||||
getInspector()->showWindow(false, false);
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ protected:
|
||||
Gtk::MenuItem* remove;
|
||||
Gtk::MenuItem* removeInclProc;
|
||||
Gtk::MenuItem* open;
|
||||
Gtk::MenuItem* inspect;
|
||||
Gtk::MenuItem* selall;
|
||||
Gtk::MenuItem* copyTo;
|
||||
Gtk::MenuItem* moveTo;
|
||||
@ -136,6 +137,7 @@ protected:
|
||||
void requestColorLabel(int colorlabel);
|
||||
void notifySelectionListener ();
|
||||
void openRequested( std::vector<FileBrowserEntry*> mselected);
|
||||
void inspectRequested( std::vector<FileBrowserEntry*> mselected);
|
||||
ExportPanel* exportPanel;
|
||||
|
||||
type_trash_changed m_trash_changed;
|
||||
|
Loading…
x
Reference in New Issue
Block a user