X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=launcher-item.h;h=3d399c780eee9227366ca4cdbf8e285c862cd56f;hb=e7014881d2c994dd0e60427078c0c4bf6f4d1cdf;hp=220c20a1875f2c0ec5100b7a6c0ea3fda4ea4efc;hpb=85316b921c4f287b14abfd42a98c6bdca2d1f178;p=simple-launcher diff --git a/launcher-item.h b/launcher-item.h index 220c20a..3d399c7 100644 --- a/launcher-item.h +++ b/launcher-item.h @@ -33,6 +33,8 @@ public: bool load(const std::string&); + bool valid() const { return myIsGood; } + GdkPixbuf *getIcon(int icon_size) const; const std::string& getFileName() const { return myFileName; } @@ -43,7 +45,7 @@ public: bool isEnabled(void) const { return myEnabled; } - void enable() { myEnabled = checkSanity(); } + void enable() { myEnabled = valid() && checkSanity(); } void disable() { myEnabled = false; } void toggle() { if (myEnabled) { @@ -59,6 +61,8 @@ private: bool checkSanity(void) { return !myName.empty() && (!myService.empty() || !myExec.empty()); } private: + bool myIsGood; + std::string myFileName, myName, myComment, myIcon, myService, myExec, myTextDomain; bool myEnabled;