Kaydet (Commit) e9a361bc authored tarafından Mikhail Voitenko's avatar Mikhail Voitenko

react on actions

üst ce303590
......@@ -5,9 +5,9 @@
*
* $RCSfile: Settings.xdl,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: mav $ $Date: 2008-01-21 12:57:52 $
* last change: $Author: mav $ $Date: 2008-01-30 19:02:05 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
......@@ -47,6 +47,7 @@
</dlg:button>
<dlg:menulist dlg:id="WikiList" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="188" dlg:height="150" dlg:help-url="HID:31681" dlg:multiselection="true">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.UNO:ListStatus" script:language="UNO"/>
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.UNO:ListEdit" script:language="UNO"/>
</dlg:menulist>
</dlg:bulletinboard>
</dlg:window>
......@@ -4,9 +4,9 @@
*
* $RCSfile: Helper.java,v $
*
* $Revision: 1.12 $
* $Revision: 1.13 $
*
* last change: $Author: mav $ $Date: 2008-01-30 16:08:26 $
* last change: $Author: mav $ $Date: 2008-01-30 19:02:16 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
......@@ -1052,5 +1052,27 @@ public class Helper
return null;
}
protected static boolean AllowThreadUsage( XComponentContext xContext )
{
if ( xContext != null )
{
try
{
XMultiComponentFactory xFactory = xContext.getServiceManager();
if ( xFactory == null )
throw new com.sun.star.uno.RuntimeException();
Object oCheckCallback = xFactory.createInstanceWithContext( "com.sun.star.awt.AsyncCallback", xContext );
return ( oCheckCallback != null );
}
catch( Exception e )
{
e.printStackTrace();
}
}
return false;
}
}
......@@ -4,9 +4,9 @@
*
* $RCSfile: WikiArticle.java,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: mav $ $Date: 2008-01-29 11:01:28 $
* last change: $Author: mav $ $Date: 2008-01-30 19:02:16 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
......@@ -103,7 +103,7 @@ public class WikiArticle
while( bLogin && !bGotLogin && !Login() )
{
// TODO: be sure that this is no main thread
WikiEditSettingDialog wd = new WikiEditSettingDialog(m_xContext, "vnd.sun.star.script:WikiEditor.EditSetting?location=application", wikiSettings );
WikiEditSettingDialog wd = new WikiEditSettingDialog(m_xContext, "vnd.sun.star.script:WikiEditor.EditSetting?location=application", wikiSettings, false );
if ( aPropDialog != null )
aPropDialog.SetThrobberActive( false );
......
......@@ -4,9 +4,9 @@
*
* $RCSfile: WikiOptionsEventHandlerImpl.java,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: mav $ $Date: 2008-01-21 12:57:53 $
* last change: $Author: mav $ $Date: 2008-01-30 19:02:16 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
......@@ -61,6 +61,7 @@ public final class WikiOptionsEventHandlerImpl extends WeakBase
static final String sEdit = "Edit";
static final String sRemove = "Remove";
static final String sListStatus = "ListStatus";
static final String sListEdit = "ListEdit";
static final String sInitialize = "initialize";
static final String sOk = "ok";
static final String sBack = "back";
......@@ -158,7 +159,7 @@ public final class WikiOptionsEventHandlerImpl extends WeakBase
ex.printStackTrace();
}
WikiEditSettingDialog aSettingDialog = new WikiEditSettingDialog(m_xContext, "vnd.sun.star.script:WikiEditor.EditSetting?location=application", ht);
WikiEditSettingDialog aSettingDialog = new WikiEditSettingDialog(m_xContext, "vnd.sun.star.script:WikiEditor.EditSetting?location=application", ht, true );
if ( aSettingDialog.show() )
RefreshView();
}
......@@ -279,7 +280,7 @@ public final class WikiOptionsEventHandlerImpl extends WeakBase
{
AddSetting();
}
else if ( sMethod.equals( sEdit ) )
else if ( sMethod.equals( sEdit ) || sMethod.equals( sListEdit ) )
{
EditSetting();
}
......
......@@ -4,9 +4,9 @@
*
* $RCSfile: WikiPropDialog.java,v $
*
* $Revision: 1.8 $
* $Revision: 1.9 $
*
* last change: $Author: mav $ $Date: 2008-01-29 11:01:28 $
* last change: $Author: mav $ $Date: 2008-01-30 19:02:16 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
......@@ -244,25 +244,10 @@ public class WikiPropDialog extends WikiDialog{
final WikiPropDialog aThisDialog = this;
final XDialog xDialogToClose = xDialog;
boolean bAllowThreadUsage = false;
try
{
XMultiComponentFactory xFactory = m_xContext.getServiceManager();
if ( xFactory == null )
throw new com.sun.star.uno.RuntimeException();
Object oCheckCallback = xFactory.createInstanceWithContext( "com.sun.star.awt.AsyncCallback", m_xContext );
bAllowThreadUsage = ( oCheckCallback != null );
}
catch( Exception e )
{
e.printStackTrace();
}
// start spinning
SetThrobberActive( true );
if ( bAllowThreadUsage )
if ( Helper.AllowThreadUsage( m_xContext ) )
{
m_aSendingThread = new Thread( "com.sun.star.thread.WikiEditorSendingThread" )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment