// This file is a part of Simple Launcher
//
-// Copyright (C) 2006, Mikhail Sobolev
+// Copyright (C) 2006, 2007, Mikhail Sobolev
//
// Simple Launcher is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License version 2 as published by
#include <vector>
#include <map>
#include <string>
+#include <algorithm>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtkicontheme.h>
static GtkIconTheme *ourTheme;
};
-typedef struct {
+typedef struct LauncherItems {
typedef std::vector<std::string> Names;
typedef std::map<std::string, LauncherItem *> Items;
Items myItems;
bool exists(const std::string& name) {
- return myNames.find(name) != myNames.end();
+ return std::find(myNames.begin(), myNames.end(), name) != myNames.end();
}
size_t size() { return myNames.size(); }
myNames.resize(0);
myItems.clear();
}
-} LauncherItems;
+
+ LauncherItems& operator=(const LauncherItems& that) {
+ myNames = that.myNames;
+ myItems = that.myItems;
+
+ return *this;
+ }
+};
#endif