Skip to content

Commit

Permalink
新增一个已禁用插件的图标,插件管理对话框中已禁用插件显示为已禁用图标
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongyang219 committed Jan 20, 2025
1 parent 6c05177 commit 994ecce
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 65 deletions.
7 changes: 6 additions & 1 deletion TrafficMonitor/PluginManagerDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ BOOL CPluginManagerDlg::OnInitDialog()
hIcon = (HICON)plugin.plugin->GetPluginIcon();
}
if (hIcon == nullptr)
hIcon = theApp.GetMenuIcon(IDI_PLUGINS);
{
if (plugin.state == CPluginManager::PluginState::PS_DISABLE)
hIcon = theApp.GetMenuIcon(IDI_PLUGIN_DISABLED);
else
hIcon = theApp.GetMenuIcon(IDI_PLUGINS);
}
m_plugin_icon_list.Add(hIcon);
}
m_list_ctrl.SetImageList(&m_plugin_icon_list, LVSIL_SMALL);
Expand Down
Binary file modified TrafficMonitor/TrafficMonitor.rc
Binary file not shown.
1 change: 1 addition & 0 deletions TrafficMonitor/TrafficMonitor.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@
<Image Include="res\menu_icon\notify.ico" />
<Image Include="res\menu_icon\pin.ico" />
<Image Include="res\menu_icon\plugins.ico" />
<Image Include="res\menu_icon\plugin_disabled.ico" />
<Image Include="res\menu_icon\setting.ico" />
<Image Include="res\menu_icon\skn.ico" />
<Image Include="res\menu_icon\statistics.ico" />
Expand Down
135 changes: 72 additions & 63 deletions TrafficMonitor/TrafficMonitor.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@
<Filter Include="源文件和头文件\公共的类\FileDialogEx">
<UniqueIdentifier>{0745b192-f366-4a31-b238-d372d5b62492}</UniqueIdentifier>
</Filter>
<Filter Include="资源文件\icons">
<UniqueIdentifier>{830bdf63-7703-45a3-9e5d-a87cc2f2bb70}</UniqueIdentifier>
</Filter>
<Filter Include="资源文件\bitmaps">
<UniqueIdentifier>{322d1b74-5d71-43bd-ae50-b33f24b1b31c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
Expand Down Expand Up @@ -755,101 +761,104 @@
<None Include="..\LICENSE_CN" />
</ItemGroup>
<ItemGroup>
<Image Include="res\TrafficMonitor.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\close.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\about_background.bmp">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\connection.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\donate.bmp">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\exit.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\notifyicon.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\function.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\about_background_hd.bmp">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\help.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\notifyicon2.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\info.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\notifyicon3.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\item.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\notify_preview.bmp">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\lock.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\notifyicon4.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\main_window.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\notify_preview_light.bmp">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\more.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\donate_wechart.bmp">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\mouse.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\bitmap3.bmp">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\notify.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\exit.ico">
<Filter>资源文件</Filter>
<Image Include="res\notifyicon.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\help.ico">
<Filter>资源文件</Filter>
<Image Include="res\notifyicon2.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\info.ico">
<Filter>资源文件</Filter>
<Image Include="res\notifyicon3.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\lock.ico">
<Filter>资源文件</Filter>
<Image Include="res\notifyicon4.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\setting.ico">
<Filter>资源文件</Filter>
<Image Include="res\notifyicon5.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\statistics.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\pin.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\close.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\plugin_disabled.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\pin.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\plugins.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\skn.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\setting.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\connection.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\skn.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\mouse.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\statistics.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\main_window.ico">
<Filter>资源文件</Filter>
<Image Include="res\menu_icon\task_manager.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\taskbar_window.ico">
<Filter>资源文件</Filter>
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\notify.ico">
<Filter>资源文件</Filter>
<Image Include="res\TrafficMonitor.ico">
<Filter>资源文件\icons</Filter>
</Image>
<Image Include="res\menu_icon\more.ico">
<Filter>资源文件</Filter>
<Image Include="res\about_background.bmp">
<Filter>资源文件\bitmaps</Filter>
</Image>
<Image Include="res\menu_icon\item.ico">
<Filter>资源文件</Filter>
<Image Include="res\about_background_hd.bmp">
<Filter>资源文件\bitmaps</Filter>
</Image>
<Image Include="res\menu_icon\function.ico">
<Filter>资源文件</Filter>
<Image Include="res\bitmap3.bmp">
<Filter>资源文件\bitmaps</Filter>
</Image>
<Image Include="res\notifyicon5.ico">
<Filter>资源文件</Filter>
<Image Include="res\donate.bmp">
<Filter>资源文件\bitmaps</Filter>
</Image>
<Image Include="res\menu_icon\plugins.ico">
<Filter>资源文件</Filter>
<Image Include="res\donate_wechart.bmp">
<Filter>资源文件\bitmaps</Filter>
</Image>
<Image Include="res\menu_icon\task_manager.ico">
<Filter>资源文件</Filter>
<Image Include="res\notify_preview.bmp">
<Filter>资源文件\bitmaps</Filter>
</Image>
<Image Include="res\notify_preview_light.bmp">
<Filter>资源文件\bitmaps</Filter>
</Image>
</ItemGroup>
</Project>
Binary file added TrafficMonitor/res/menu_icon/plugin_disabled.ico
Binary file not shown.
4 changes: 3 additions & 1 deletion TrafficMonitor/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@
#define IDD_SKIN_AUTO_ADAPT_DLG 341
#define IDS_DOTNET_NOT_INSTALLED_TIP 342
#define IDS_VERSION_UPDATE 343
#define IDI_ICON1 343
#define IDI_PLUGIN_DISABLED 343
#define IDS_AVREAGE_TEMPERATURE 344
#define IDS_HARDWARE_MONITOR_WARNING 345
#define IDS_HARDWARE_MONITOR_WARNING2 346
Expand Down Expand Up @@ -641,7 +643,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 343
#define _APS_NEXT_RESOURCE_VALUE 344
#define _APS_NEXT_COMMAND_VALUE 33665
#define _APS_NEXT_CONTROL_VALUE 1178
#define _APS_NEXT_SYMED_VALUE 101
Expand Down

0 comments on commit 994ecce

Please sign in to comment.