From 5c15a5ef265f5af24d9e138ca6f76ce8e7fc5563 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 16 Feb 2014 18:29:23 +0100 Subject: [PATCH] add virtual plugin type 'not game' the only maybe useful distinction between plugin types is game / others, so add a 'virtual' plugin type which represents everything but games Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/44cd36c4122be61e897fa5bb5dde728074a7c28a Author: Stefan Seyfried Date: 2014-02-16 (Sun, 16 Feb 2014) ------------------ This commit was generated by Migit --- src/gui/plugins.cpp | 11 ++--------- src/gui/plugins.h | 3 ++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index 8e5f27a0b..8d1d7ab8d 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -4,13 +4,7 @@ Copyright (C) 2001 Steffen Hehn 'McClean' Homepage: http://dbox.cyberphoria.org/ - Kommentar: - - Diese GUI wurde von Grund auf neu programmiert und sollte nun vom - Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert - auf der Client-Server Idee, diese GUI ist also von der direkten DBox- - Steuerung getrennt. Diese wird dann von Daemons uebernommen. - + Copyright (C) 2011-2014 Stefan Seyfried License: GPL @@ -139,7 +133,6 @@ void CPlugins::scanDir(const char *dir) // already exists in the list. // This behavior is used to make sure plugins can be disabled // by creating a .cfg in PLUGINDIR_VAR (PLUGINDIR often is read only). - if (!plugin_exists(new_plugin.filename)) { plugin_list.push_back(new_plugin); @@ -625,7 +618,7 @@ bool CPlugins::hasPlugin(CPlugins::p_type_t type) for (std::vector::iterator it=plugin_list.begin(); it!=plugin_list.end(); ++it) { - if (it->type == type && !it->hide) + if ((it->type & type) && !it->hide) return true; } return false; diff --git a/src/gui/plugins.h b/src/gui/plugins.h index 1bd6c614f..787ff98ca 100644 --- a/src/gui/plugins.h +++ b/src/gui/plugins.h @@ -52,7 +52,8 @@ class CPlugins P_TYPE_GAME = 0x2, P_TYPE_TOOL = 0x4, P_TYPE_SCRIPT = 0x8, - P_TYPE_LUA = 0x10 + P_TYPE_LUA = 0x10, + P_TYPE_NO_GAME = P_TYPE_TOOL|P_TYPE_SCRIPT|P_TYPE_LUA } p_type_t;