aboutsummaryrefslogtreecommitdiff
path: root/src/Icon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Icon.cc')
-rw-r--r--src/Icon.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/Icon.cc b/src/Icon.cc
index 6578bc8..7e3b53d 100644
--- a/src/Icon.cc
+++ b/src/Icon.cc
@@ -19,8 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// stupid macros needed to access some functions in version 2 of the GNU C 22//Use GNU extensions
23// library
24#ifndef _GNU_SOURCE 23#ifndef _GNU_SOURCE
25#define _GNU_SOURCE 24#define _GNU_SOURCE
26#endif // _GNU_SOURCE 25#endif // _GNU_SOURCE
@@ -40,25 +39,20 @@ Iconmenu::Iconmenu(BScreen *scrn) : Basemenu(scrn) {
40 39
41 screen = scrn; 40 screen = scrn;
42 setLabel(I18n::instance()->getMessage( 41 setLabel(I18n::instance()->getMessage(
43#ifdef NLS 42 FBNLS::IconSet, FBNLS::IconIcons,
44 IconSet, IconIcons, 43 "Icons"));
45#else // !NLS
46 0, 0,
47#endif // NLS
48 "Icons"));
49 update(); 44 update();
50} 45}
51 46
52 47
53void Iconmenu::itemSelected(int button, int index) { 48void Iconmenu::itemSelected(int button, unsigned int index) {
54 if (button == 1) { 49 if (button == 1) {
55 if (index >= 0 && index < screen->getIconCount()) { 50 if (index < screen->getIconCount()) {
56 FluxboxWindow *win = screen->getIcon(index); 51 FluxboxWindow *win = screen->getIcon(index);
57 52
58 if (win) { 53 if (win)
59 win->deiconify(); 54 win->deiconify();
60 win->setInputFocus(); 55
61 }
62 } 56 }
63 57
64 if (! (screen->getWorkspacemenu()->isTorn() || isTorn())) 58 if (! (screen->getWorkspacemenu()->isTorn() || isTorn()))