mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Run icon action via menu 'Open'
This commit is contained in:
parent
e147228f53
commit
b6d080e414
@ -54,11 +54,12 @@ EDELIB_NS_USING(ICON_SIZE_TINY)
|
|||||||
EDELIB_NS_USING(input)
|
EDELIB_NS_USING(input)
|
||||||
EDELIB_NS_USING(run_async)
|
EDELIB_NS_USING(run_async)
|
||||||
|
|
||||||
|
static void open_cb(Fl_Widget*, void* d);
|
||||||
static void rename_cb(Fl_Widget*, void* d);
|
static void rename_cb(Fl_Widget*, void* d);
|
||||||
static void props_cb(Fl_Widget*, void* d);
|
static void props_cb(Fl_Widget*, void* d);
|
||||||
|
|
||||||
static MenuItem icon_menu[] = {
|
static MenuItem icon_menu[] = {
|
||||||
{_("&Open"), 0, 0},
|
{_("&Open"), 0, open_cb, 0},
|
||||||
{_("&Rename"), 0, rename_cb, 0},
|
{_("&Rename"), 0, rename_cb, 0},
|
||||||
{_("&Delete"), 0, 0, 0, FL_MENU_DIVIDER},
|
{_("&Delete"), 0, 0, 0, FL_MENU_DIVIDER},
|
||||||
{_("&Properties"), 0, props_cb, 0},
|
{_("&Properties"), 0, props_cb, 0},
|
||||||
@ -72,6 +73,13 @@ static MenuItem icon_trash_menu[] = {
|
|||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void open_cb(Fl_Widget*, void* d) {
|
||||||
|
DesktopIcon* di = (DesktopIcon*)d;
|
||||||
|
IconSettings* s = di->get_settings();
|
||||||
|
|
||||||
|
run_async("ede-launch %s", s->cmd.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
static void rename_cb(Fl_Widget*, void* d) {
|
static void rename_cb(Fl_Widget*, void* d) {
|
||||||
DesktopIcon* di = (DesktopIcon*)d;
|
DesktopIcon* di = (DesktopIcon*)d;
|
||||||
|
|
||||||
|
@ -57,6 +57,8 @@ public:
|
|||||||
int drag_icon_x(void);
|
int drag_icon_x(void);
|
||||||
int drag_icon_y(void);
|
int drag_icon_y(void);
|
||||||
|
|
||||||
|
IconSettings* get_settings(void) { return settings; }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is 'enhanced' (in some sense) redraw(). Redrawing
|
* This is 'enhanced' (in some sense) redraw(). Redrawing
|
||||||
* icon will not fully redraw label nor focus box, which laid outside
|
* icon will not fully redraw label nor focus box, which laid outside
|
||||||
|
Loading…
x
Reference in New Issue
Block a user