OSDN Git Service

added ShowRuler setting
authornaru <bottle@mikage.to>
Wed, 2 Apr 2003 08:11:21 +0000 (08:11 +0000)
committernaru <bottle@mikage.to>
Wed, 2 Apr 2003 08:11:21 +0000 (08:11 +0000)
bottleclient/BottleDef.pas
bottleclient/SettingForm.dfm
bottleclient/SettingForm.pas

index 806076a..cf04e6f 100755 (executable)
@@ -73,6 +73,7 @@ type
     FWarnYenTNotExist: boolean;
     FWarnScopeChangeInSynchronize: boolean;
     FNeedConfirmBeforeSend: boolean;
+    FShowRuler: boolean;
     procedure SetDblClkInsert(const Value: boolean);
     procedure SetDefaultScript(const Value: String);
     procedure SetIgnoreTimeCritical(const Value: boolean);
@@ -121,6 +122,7 @@ type
     procedure SetWarnScopeChangeInSynchronize(const Value: boolean);
     procedure SetWarnYenTNotExist(const Value: boolean);
     procedure SetNeedConfirmBeforeSend(const Value: boolean);
+    procedure SetShowRuler(const Value: boolean);
   public
     property NoSendGhostList: boolean read FNoSendGhostList write SetNoSendGhostList;
     property ConfirmOnExit: boolean read FConfirmOnExit write SetConfirmOnExit;
@@ -150,6 +152,7 @@ type
     property MarkErrorColor: TColor read FMarkErrorColor write SetMarkErrorColor;
     property BgColor: TColor read FBgColor write SetBgColor;
     property DefaultScript: String read GetDefaultScript write SetDefaultScript;
+    property ShowRuler: boolean read FShowRuler write SetShowRuler;
     property DblClkInsert: boolean read FDblClkInsert write SetDblClkInsert;
     property ShowToolBar: boolean read FShowToolBar write SetShowToolBar;
     property ShowConstBar: boolean read FShowConstBar write SetShowConstBar;
@@ -310,6 +313,7 @@ begin
     NoConfirm := FIni.ReadBool('System', 'NoConfirm', false);
     IgnoreTimeCritical := FIni.ReadBool('System', 'IgnoreTimeCritical', false);
     FDefaultScript.CommaText := FIni.ReadString('System', 'DefaultScript', '\t\h\s[0]|\e');
+    ShowRuler := FIni.ReadBool('System', 'ShowRuler', false);
     //
     try
       TalkColorH := StringToColor(FIni.ReadString('System', 'TalkColorH', 'clBlack'));
@@ -639,6 +643,7 @@ begin
   FIni.WriteBool('System', 'ShowToolBar', ShowToolBar);
   FIni.WriteBool('System', 'ShowConstBar', ShowConstBar);
   FIni.WriteString('System', 'DefaultScript', FDefaultScript.CommaText);
+  FIni.WriteBool('System', 'ShowRuler', ShowRuler);
   FIni.WriteInteger('System', 'WhenReturn', Ord(WhenReturn));
   FIni.WriteInteger('System', 'WhenShiftReturn', Ord(WhenShiftReturn));
   FIni.WriteInteger('System', 'WhenCtrlReturn', Ord(WhenCtrlReturn));
@@ -691,6 +696,11 @@ begin
   FNeedConfirmBeforeSend := Value;
 end;
 
+procedure TBottlePrefs.SetShowRuler(const Value: boolean);
+begin
+  FShowRuler := Value;
+end;
+
 { TChannelListItem }
 
 procedure TChannelListItem.SetGhost(const Value: String);
index a382bdd..14a099e 100755 (executable)
@@ -1,6 +1,6 @@
 object frmSetting: TfrmSetting
-  Left = 375
-  Top = 297
+  Left = 405
+  Top = 326
   Anchors = [akLeft, akTop, akRight, akBottom]
   BorderStyle = bsDialog
   Caption = #35373#23450
@@ -27,7 +27,7 @@ object frmSetting: TfrmSetting
     Top = 8
     Width = 379
     Height = 306
-    ActivePage = tstColor
+    ActivePage = tstGeneral
     Anchors = [akLeft, akTop, akRight, akBottom]
     TabOrder = 0
     object tstGeneral: TTabSheet
@@ -42,7 +42,7 @@ object frmSetting: TfrmSetting
       end
       object lblGhostDropDownCount: TLabel
         Left = 16
-        Top = 200
+        Top = 208
         Width = 159
         Height = 12
         Caption = 'IfGhost'#26368#22823#12489#12525#12483#12503#12480#12454#12531#25968'(&N)'
@@ -65,9 +65,9 @@ object frmSetting: TfrmSetting
       end
       object grpLocalConfirm: TGroupBox
         Left = 8
-        Top = 80
+        Top = 112
         Width = 353
-        Height = 49
+        Height = 41
         Caption = #12525#12540#12459#12523#30906#35469
         TabOrder = 1
         object cbxIgnoreTimeCritical: TCheckBox
@@ -84,9 +84,9 @@ object frmSetting: TfrmSetting
       end
       object rgpTabPosition: TRadioGroup
         Left = 8
-        Top = 136
+        Top = 160
         Width = 353
-        Height = 49
+        Height = 41
         Hint = #12481#12515#12531#12493#12523#12479#12502#12398#20301#32622#12434#22793#26356
         Caption = #12481#12515#12531#12493#12523#12479#12502#12398#20301#32622
         Columns = 2
@@ -115,7 +115,7 @@ object frmSetting: TfrmSetting
       end
       object spnGhostDropDownCount: TSpinEdit
         Left = 184
-        Top = 195
+        Top = 203
         Width = 65
         Height = 21
         MaxValue = 100
@@ -123,13 +123,21 @@ object frmSetting: TfrmSetting
         TabOrder = 3
         Value = 40
       end
+      object cbxShowRuler: TCheckBox
+        Left = 8
+        Top = 80
+        Width = 209
+        Height = 17
+        Caption = #12523#12540#12521#12540#12434#34920#31034#12377#12427'(&R)'
+        TabOrder = 6
+      end
     end
     object tstColor: TTabSheet
       Caption = #33394#20998#12369
       ImageIndex = 1
       object gbxColor: TGroupBox
         Left = 8
-        Top = 16
+        Top = 8
         Width = 353
         Height = 153
         Caption = #33394'(&O)'
index af1c3b8..cf1e701 100755 (executable)
@@ -52,6 +52,7 @@ type
     btnUseCurrentJoinChannels: TButton;
     Label6: TLabel;
     ImageList: TImageList;
+    cbxShowRuler: TCheckBox;
     procedure FormClose(Sender: TObject; var Action: TCloseAction);
     procedure edtProxyPortKeyPress(Sender: TObject; var Key: Char);
     procedure ctvBottleNodeChecked(Sender: TObject;
@@ -84,6 +85,7 @@ procedure TfrmSetting.Execute;
 begin
   PageControl.ActivePage := tstGeneral;
   memDefaultScript.Text := Pref.DefaultScript;
+  cbxShowRuler.Checked := Pref.ShowRuler;
   cbxIgnoreTimeCritical.Checked := Pref.IgnoreTimeCritical;
   cbxNoSendGhostList.Checked := Pref.NoSendGhostList;
   cbxConfirmOnExit.Checked := Pref.ConfirmOnExit;
@@ -142,6 +144,7 @@ end;
 procedure TfrmSetting.FormClose(Sender: TObject; var Action: TCloseAction);
 begin
   Pref.DefaultScript := memDefaultScript.Text;
+  Pref.ShowRuler := cbxShowRuler.Checked;
   Pref.IgnoreTimeCritical := cbxIgnoreTimeCritical.Checked;
   Pref.NoSendGhostList := cbxNoSendGhostList.Checked;
   Pref.ConfirmOnExit := cbxConfirmOnExit.Checked;