+ActivateFocusPolicy::ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y)
+ : BC_CheckBox(x, y, (pwindow->thread->preferences->textbox_focus_policy & CLICK_ACTIVATE) != 0,
+ _("Click to activate text focus"))
+{
+ this->pwindow = pwindow;
+}
+
+int ActivateFocusPolicy::handle_event()
+{
+ if( get_value() )
+ pwindow->thread->preferences->textbox_focus_policy |= CLICK_ACTIVATE;
+ else
+ pwindow->thread->preferences->textbox_focus_policy &= ~CLICK_ACTIVATE;
+ return 1;
+}
+
+DeactivateFocusPolicy::DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y)
+ : BC_CheckBox(x, y, (pwindow->thread->preferences->textbox_focus_policy & CLICK_DEACTIVATE) != 0,
+ _("Click to deactivate text focus"))
+{
+ this->pwindow = pwindow;
+}
+
+int DeactivateFocusPolicy::handle_event()
+{
+ if( get_value() )
+ pwindow->thread->preferences->textbox_focus_policy |= CLICK_DEACTIVATE;
+ else
+ pwindow->thread->preferences->textbox_focus_policy &= ~CLICK_DEACTIVATE;
+ return 1;
+}
+
+