ApplyConfig() public method

public ApplyConfig ( Smuxi.Engine.UserConfig config ) : void
config Smuxi.Engine.UserConfig
return void
Ejemplo n.º 1
0
        public void ApplyConfig(UserConfig userConfig)
        {
            Trace.Call(userConfig);

            if (userConfig == null)
            {
                throw new ArgumentNullException("userConfig");
            }

            string modeStr = (string)userConfig["Interface/Notification/NotificationAreaIconMode"];
            NotificationAreaIconMode mode = (NotificationAreaIconMode)Enum.Parse(
                typeof(NotificationAreaIconMode),
                modeStr
                );

            NotificationAreaIconMode = mode;

            MenuWidget.OpenLogAction.Visible     = Frontend.IsLocalEngine;
            MenuWidget.OpenLogToolAction.Visible = Frontend.IsLocalEngine;

#if GTK_SHARP_2_10
            StatusIconManager.ApplyConfig(userConfig);
#endif
#if INDICATE_SHARP || MESSAGING_MENU_SHARP
            IndicateManager.ApplyConfig(userConfig);
#endif
#if NOTIFY_SHARP
            NotifyManager.ApplyConfig(userConfig);
#endif
            Entry.ApplyConfig(userConfig);
            Notebook.ApplyConfig(userConfig);
            ChatTreeView.ApplyConfig(userConfig);
            ChatViewManager.ApplyConfig(userConfig);
            MenuWidget.JoinWidget.ApplyConfig(userConfig);
        }
Ejemplo n.º 2
0
        public void ApplyConfig(UserConfig userConfig)
        {
            Trace.Call(userConfig);

            if (userConfig == null)
            {
                throw new ArgumentNullException("userConfig");
            }

            string modeStr = (string)userConfig["Interface/Notification/NotificationAreaIconMode"];
            NotificationAreaIconMode mode = (NotificationAreaIconMode)Enum.Parse(
                typeof(NotificationAreaIconMode),
                modeStr
                );

            _NotificationAreaIconMode = mode;

            _OpenLogChatMenuItem.Visible = Frontend.IsLocalEngine;

#if GTK_SHARP_2_10
            _StatusIconManager.ApplyConfig(userConfig);
#endif
#if INDICATE_SHARP
            _IndicateManager.ApplyConfig(userConfig);
#endif
#if NOTIFY_SHARP
            _NotifyManager.ApplyConfig(userConfig);
#endif
            _Entry.ApplyConfig(userConfig);
            _Notebook.ApplyConfig(userConfig);
            _ChatViewManager.ApplyConfig(userConfig);
        }