aboutsummaryrefslogtreecommitdiff
path: root/src/Icon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Icon.cc')
-rw-r--r--src/Icon.cc61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/Icon.cc b/src/Icon.cc
deleted file mode 100644
index 7e3b53d..0000000
--- a/src/Icon.cc
+++ /dev/null
@@ -1,61 +0,0 @@
1// Icon.cc for Blackbox - an X11 Window manager
2// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE.
21
22//Use GNU extensions
23#ifndef _GNU_SOURCE
24#define _GNU_SOURCE
25#endif // _GNU_SOURCE
26
27#ifdef HAVE_CONFIG_H
28# include "../config.h"
29#endif // HAVE_CONFIG_H
30
31#include "i18n.hh"
32#include "Icon.hh"
33#include "Screen.hh"
34#include "Window.hh"
35
36
37Iconmenu::Iconmenu(BScreen *scrn) : Basemenu(scrn) {
38 setInternalMenu();
39
40 screen = scrn;
41 setLabel(I18n::instance()->getMessage(
42 FBNLS::IconSet, FBNLS::IconIcons,
43 "Icons"));
44 update();
45}
46
47
48void Iconmenu::itemSelected(int button, unsigned int index) {
49 if (button == 1) {
50 if (index < screen->getIconCount()) {
51 FluxboxWindow *win = screen->getIcon(index);
52
53 if (win)
54 win->deiconify();
55
56 }
57
58 if (! (screen->getWorkspacemenu()->isTorn() || isTorn()))
59 hide();
60 }
61}