summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-08-12 13:53:09 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-09-02 18:16:58 +0200
commit8a1e19f4ff627d9ac15bbdf7ef04d27158b45569 (patch)
tree367e8ce733814024e545bde64428a6ace3e3755c /basctl
parent6cb452f36649762e3cc0e477d0a543eeff741bbd (diff)
GSOC work, Tool/Options/Basic IDE Options created
Created a new tab in Tools/Options/Basic IDE options instead of the ModalDialog. The original dialog under Basic IDE/View/IDE Options was removed. Tab page is disabled when experimetal flag is off, entry node in the treebox is visible. Change-Id: Iaad1ea5fadc3f05ca81f2240dceb513f25be35b9
Diffstat (limited to 'basctl')
-rw-r--r--basctl/Library_basctl.mk1
-rw-r--r--basctl/UIConfig_basicide.mk1
-rw-r--r--basctl/sdi/baside.sdi6
-rw-r--r--basctl/source/basicide/basicideoptionsdlg.cxx111
-rw-r--r--basctl/source/basicide/basicideoptionsdlg.hxx59
-rw-r--r--basctl/source/basicide/baside2.cxx16
-rw-r--r--basctl/uiconfig/basicide/menubar/menubar.xml1
-rw-r--r--basctl/uiconfig/basicide/ui/basicideoptionsdialog.ui279
8 files changed, 0 insertions, 474 deletions
diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk
index 9e4b94e36719..cff14f708498 100644
--- a/basctl/Library_basctl.mk
+++ b/basctl/Library_basctl.mk
@@ -90,7 +90,6 @@ $(eval $(call gb_Library_add_exception_objects,basctl,\
basctl/source/basicide/linenumberwindow \
basctl/source/basicide/localizationmgr \
basctl/source/basicide/macrodlg \
- basctl/source/basicide/basicideoptionsdlg \
basctl/source/basicide/moduldl2 \
basctl/source/basicide/moduldlg \
basctl/source/basicide/objdlg \
diff --git a/basctl/UIConfig_basicide.mk b/basctl/UIConfig_basicide.mk
index 4be0d4d38b78..013df6e2c99c 100644
--- a/basctl/UIConfig_basicide.mk
+++ b/basctl/UIConfig_basicide.mk
@@ -30,7 +30,6 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/BasicIDE,\
$(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\
basctl/uiconfig/basicide/ui/basicmacrodialog \
- basctl/uiconfig/basicide/ui/basicideoptionsdialog \
))
# vim: set noet sw=4 ts=4:
diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index b00b65ec9e3e..271441c6b499 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -36,12 +36,6 @@ shell basctl_Shell
ExecMethod = ExecuteCurrent;
]
- SID_BASICIDE_IDEOPTIONS
- [
- StateMethod = GetState;
- ExecMethod = ExecuteCurrent;
- ]
-
SID_BASICIDE_HIDECURPAGE
[
ExecMethod = ExecuteCurrent;
diff --git a/basctl/source/basicide/basicideoptionsdlg.cxx b/basctl/source/basicide/basicideoptionsdlg.cxx
deleted file mode 100644
index 765cffa3ca84..000000000000
--- a/basctl/source/basicide/basicideoptionsdlg.cxx
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "basicideoptionsdlg.hxx"
-#include <basic/codecompletecache.hxx>
-#include <svtools/miscopt.hxx>
-#include <basidesh.hrc>
-#include <iostream>
-#include <officecfg/Office/BasicIDE.hxx>
-#include <boost/shared_ptr.hpp>
-
-namespace basctl
-{
-
-BasicIDEOptionsDlg::BasicIDEOptionsDlg( Window* pWindow )
-: ModalDialog(pWindow, "BasicIDEOptionsDlg", "modules/BasicIDE/ui/basicideoptionsdialog.ui")
-{
- get(pCancelBtn, "cancel");
- get(pOkBtn, "ok");
-
- get(pCodeCompleteChk, "codecomplete_enable");
- get(pAutocloseProcChk, "autoclose_proc");
- get(pAutocloseParenChk, "autoclose_paren");
- get(pAutocloseQuotesChk, "autoclose_quotes");
- get(pAutoCorrectKeywordsChk, "autocorrect_keywords");
- get(pUseExtendedTypesChk, "extendedtypes_enable");
-
- pOkBtn->SetClickHdl( LINK( this, BasicIDEOptionsDlg, OkHdl ) );
- pCancelBtn->SetClickHdl( LINK( this, BasicIDEOptionsDlg, CancelHdl ) );
-
- LoadConfig();
-
-}
-
-BasicIDEOptionsDlg::~BasicIDEOptionsDlg()
-{
-}
-
-IMPL_LINK_NOARG(BasicIDEOptionsDlg, OkHdl)
-{
- CodeCompleteOptions::SetCodeCompleteOn( pCodeCompleteChk->IsChecked() );
- CodeCompleteOptions::SetProcedureAutoCompleteOn( pAutocloseProcChk->IsChecked() );
- CodeCompleteOptions::SetAutoCloseQuotesOn( pAutocloseQuotesChk->IsChecked() );
- CodeCompleteOptions::SetAutoCloseParenthesisOn( pAutocloseParenChk->IsChecked() );
- CodeCompleteOptions::SetAutoCorrectKeywordsOn( pAutoCorrectKeywordsChk->IsChecked() );
- CodeCompleteOptions::SetExtendedTypeDeclaration( pUseExtendedTypesChk->IsChecked() );
-
- SaveConfig();
- Close();
- return 0;
-}
-
-IMPL_LINK_NOARG(BasicIDEOptionsDlg, CancelHdl)
-{
- Close();
- return 0;
-}
-
-short BasicIDEOptionsDlg::Execute()
-{
- return ModalDialog::Execute();
-}
-
-void BasicIDEOptionsDlg::LoadConfig()
-{
- bool bProcClose = officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::get();
- bool bExtended = officecfg::Office::BasicIDE::Autocomplete::UseExtended::get();
- bool bCodeCompleteOn = officecfg::Office::BasicIDE::Autocomplete::CodeComplete::get();
- bool bParenClose = officecfg::Office::BasicIDE::Autocomplete::AutocloseParenthesis::get();
- bool bQuoteClose = officecfg::Office::BasicIDE::Autocomplete::AutocloseDoubleQuotes::get();
- bool bCorrect = officecfg::Office::BasicIDE::Autocomplete::AutoCorrectKeywords::get();
-
- pCodeCompleteChk->Check( bCodeCompleteOn );
- pAutocloseProcChk->Check( bProcClose );
- pAutocloseQuotesChk->Check( bQuoteClose );
- pAutocloseParenChk->Check( bParenClose );
- pAutoCorrectKeywordsChk->Check( bCorrect );
- pUseExtendedTypesChk->Check( bExtended );
-}
-
-void BasicIDEOptionsDlg::SaveConfig()
-{
- boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() );
- officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::set( pAutocloseProcChk->IsChecked(), batch );
- officecfg::Office::BasicIDE::Autocomplete::CodeComplete::set( pCodeCompleteChk->IsChecked(), batch );
- officecfg::Office::BasicIDE::Autocomplete::UseExtended::set( pUseExtendedTypesChk->IsChecked(), batch );
- officecfg::Office::BasicIDE::Autocomplete::AutocloseParenthesis::set( pAutocloseParenChk->IsChecked(), batch );
- officecfg::Office::BasicIDE::Autocomplete::AutocloseDoubleQuotes::set( pAutocloseQuotesChk->IsChecked(), batch );
- officecfg::Office::BasicIDE::Autocomplete::AutoCorrectKeywords::set( pAutoCorrectKeywordsChk->IsChecked(), batch );
- batch->commit();
-}
-
-} // namespace basctl
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/basicideoptionsdlg.hxx b/basctl/source/basicide/basicideoptionsdlg.hxx
deleted file mode 100644
index 1d3970daa314..000000000000
--- a/basctl/source/basicide/basicideoptionsdlg.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef BASCTL_BASICIDEOPTIONSDLG_HXX
-#define BASCTL_BASICIDEOPTIONSDLG_HXX
-
-#include <vcl/button.hxx>
-#include <vcl/dialog.hxx>
-
-namespace basctl
-{
-
-class BasicIDEOptionsDlg: public ModalDialog
-{
-private:
- CancelButton* pCancelBtn;
- OKButton* pOkBtn;
-
- CheckBox* pCodeCompleteChk;
- CheckBox* pAutocloseProcChk;
- CheckBox* pAutocloseParenChk;
- CheckBox* pAutocloseQuotesChk;
- CheckBox* pAutoCorrectKeywordsChk;
- CheckBox* pUseExtendedTypesChk;
-
- DECL_LINK(OkHdl, void*);
- DECL_LINK(CancelHdl, void*);
-
- void LoadConfig();
- void SaveConfig();
-
-public:
- BasicIDEOptionsDlg( Window* pWindow );
- ~BasicIDEOptionsDlg();
-
- virtual short Execute();
-};
-
-} // namespace basctl
-
-#endif //BASCTL_BASICIDEOPTIONSDLG_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index ae17932dc48f..667bae507239 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -54,7 +54,6 @@
#include <cassert>
#include <basic/codecompletecache.hxx>
#include <svtools/miscopt.hxx>
-#include "basicideoptionsdlg.hxx"
namespace basctl
{
@@ -1012,12 +1011,6 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
rLayout.BasicRemoveWatch();
}
break;
- case SID_BASICIDE_IDEOPTIONS:
- {
- boost::scoped_ptr< BasicIDEOptionsDlg > pDlg( new BasicIDEOptionsDlg( this ) );
- pDlg->Execute();
- }
- break;
case SID_CUT:
{
if ( !IsReadOnly() )
@@ -1164,15 +1157,6 @@ void ModulWindow::GetState( SfxItemSet &rSet )
rSet.Put(SfxBoolItem(nWh, bSourceLinesEnabled));
break;
}
- case SID_BASICIDE_IDEOPTIONS:
- {
- SvtMiscOptions aMiscOptions;
- if( !aMiscOptions.IsExperimentalMode() )
- {
- rSet.Put( SfxVisibilityItem(nWh, false) );
- }
- }
- break;
}
}
}
diff --git a/basctl/uiconfig/basicide/menubar/menubar.xml b/basctl/uiconfig/basicide/menubar/menubar.xml
index 34288e2786fd..2c12262e28c1 100644
--- a/basctl/uiconfig/basicide/menubar/menubar.xml
+++ b/basctl/uiconfig/basicide/menubar/menubar.xml
@@ -61,7 +61,6 @@
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
<menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
<menu:menuitem menu:id=".uno:ShowLines"/>
- <menu:menuitem menu:id=".uno:BasicIDEOptionsDialog"/>
<menu:menuitem menu:id=".uno:GotoLine"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:FullScreen"/>
diff --git a/basctl/uiconfig/basicide/ui/basicideoptionsdialog.ui b/basctl/uiconfig/basicide/ui/basicideoptionsdialog.ui
deleted file mode 100644
index e293ccd43f63..000000000000
--- a/basctl/uiconfig/basicide/ui/basicideoptionsdialog.ui
+++ /dev/null
@@ -1,279 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkDialog" id="BasicIDEOptionsDlg">
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="title" translatable="yes">IDE Options</property>
- <property name="resizable">False</property>
- <property name="modal">True</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkCheckButton" id="extendedtypes_enable">
- <property name="label" translatable="yes">Use extended types</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Language Features</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- <property name="image_position">right</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkBox" id="box3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkCheckButton" id="codecomplete_enable">
- <property name="label" translatable="yes">Enable Code Completition</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Code Completition</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkBox" id="box4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkCheckButton" id="autoclose_proc">
- <property name="label" translatable="yes">Autoclose Procedures</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="autoclose_paren">
- <property name="label" translatable="yes">Autoclose Parenthesis</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="autoclose_quotes">
- <property name="label" translatable="yes">Autoclose Quotes</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="autocorrect_keywords">
- <property name="label" translatable="yes">Autocorrect Keywords</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Code Suggestion</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-1">cancel</action-widget>
- <action-widget response="0">ok</action-widget>
- </action-widgets>
- </object>
-</interface>