Skip to content
This repository

peripherals: refresh settings on device addition/deletion #1203

Merged
1 commit merged into from almost 2 years ago

3 participants

Michal Piechowiak Matthias Kortstiege Lars Op den Kamp
Michal Piechowiak
Collaborator
pieh commented

peripherals manager in settings window is disabled if there are no peripherals - this will automaticly enable it without need to leave and re-enter window (and disable it if last peripheral was removed)

this is something I noticed when I was going through our GUIWindow subclasses, not really important (for me) but thought I could "fix" it when I discovered it

Matthias Kortstiege
Collaborator

+1. no-brainer?

Lars Op den Kamp
Collaborator

+1 indeed, thanks

Deleted user ghost merged commit c584811 into from
Deleted user ghost closed this
Tobias Hieta tru referenced this pull request from a commit in plexinc/plex-home-theater-public
Tobias Hieta tru Single item videos played from the API should create a PQ
“everything is a PlayQueue”

Related to #1203
1d627c6
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jul 22, 2012
Michal Piechowiak pieh peripherals: refresh settings on device addition/deletion, peripheral…
… manager could be now enabled/disabled
9bed4de
This page is out of date. Refresh to see the latest.
9 xbmc/peripherals/Peripherals.cpp
@@ -40,6 +40,7 @@
40 40 #include "guilib/GUIWindowManager.h"
41 41 #include "guilib/LocalizeStrings.h"
42 42 #include "dialogs/GUIDialogKaiToast.h"
  43 +#include "GUIUserMessages.h"
43 44 #include "utils/StringUtils.h"
44 45 #include "Util.h"
45 46 #include "guilib/Key.h"
@@ -311,6 +312,10 @@ void CPeripherals::OnDeviceAdded(const CPeripheralBus &bus, const CPeripheral &p
311 312 if (dialog && dialog->IsActive())
312 313 dialog->Update();
313 314
  315 + // refresh settings (peripherals manager could be enabled now)
  316 + CGUIMessage msg(GUI_MSG_UPDATE, WINDOW_SETTINGS_SYSTEM, 0);
  317 + g_windowManager.SendThreadMessage(msg, WINDOW_SETTINGS_SYSTEM);
  318 +
314 319 CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(35005), peripheral.DeviceName());
315 320 }
316 321
@@ -320,6 +325,10 @@ void CPeripherals::OnDeviceDeleted(const CPeripheralBus &bus, const CPeripheral
320 325 if (dialog && dialog->IsActive())
321 326 dialog->Update();
322 327
  328 + // refresh settings (peripherals manager could be disabled now)
  329 + CGUIMessage msg(GUI_MSG_UPDATE, WINDOW_SETTINGS_SYSTEM, 0);
  330 + g_windowManager.SendThreadMessage(msg, WINDOW_SETTINGS_SYSTEM);
  331 +
323 332 CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(35006), peripheral.DeviceName());
324 333 }
325 334
3  xbmc/settings/GUIWindowSettingsCategory.cpp
@@ -233,6 +233,9 @@ bool CGUIWindowSettingsCategory::OnMessage(CGUIMessage &message)
233 233 m_delayedSetting = NULL;
234 234 return true;
235 235 }
  236 + case GUI_MSG_UPDATE:
  237 + if (HasID(message.GetSenderId()))
  238 + UpdateSettings();
236 239 break;
237 240 case GUI_MSG_NOTIFY_ALL:
238 241 {

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.