Kaydet (Commit) e56f9da4 authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Caolán McNamara

MD_DDE_LINKEDIT conversion to .ui

Change-Id: Id058400bad5a8b100ef5a07060ea1c5013c6e6d6
Reviewed-on: https://gerrit.libreoffice.org/10146Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst d1fc4779
......@@ -36,7 +36,6 @@ $(eval $(call gb_SrsTarget_set_include,sfx/res,\
$(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/appl/app.src \
sfx2/source/appl/dde.src \
sfx2/source/appl/newhelp.src \
sfx2/source/appl/sfx.src \
sfx2/source/bastyp/fltfnc.src \
......
......@@ -28,6 +28,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/helpsearchpage \
sfx2/uiconfig/ui/inputdialog \
sfx2/uiconfig/ui/licensedialog \
sfx2/uiconfig/ui/linkeditdialog \
sfx2/uiconfig/ui/loadtemplatedialog \
sfx2/uiconfig/ui/managestylepage \
sfx2/uiconfig/ui/newstyle \
......
......@@ -132,7 +132,6 @@
#define RID_SVXSTR_INCORRECT_PASSWORD (RID_SFX_APP_START + 213)
#define RID_SVXSTR_FORWARD_ERRMSSG (RID_SFX_APP_START + 214)
#define MD_DDE_LINKEDIT (RID_SFX_APP_START + 1)
#endif // #ifndef _SFX_APP_HRC
......
/* -*- 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 _SFX_DDE_HRC
#define _SFX_DDE_HRC
#include "app.hrc"
#define ED_DDE_APP 50
#define ED_DDE_TOPIC 51
#define ED_DDE_ITEM 52
#define FT_DDE_APP 53
#define FT_DDE_TOPIC 54
#define FT_DDE_ITEM 55
#define GROUP_DDE_CHG 56
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 "dde.hrc"
ModalDialog MD_DDE_LINKEDIT
{
HelpID = "sfx2:ModalDialog:MD_DDE_LINKEDIT";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 223 , 74 ) ;
Text [ en-US ] = "Modify Link" ;
Moveable = TRUE ;
FixedText FT_DDE_APP
{
Pos = MAP_APPFONT ( 12 , 16 ) ;
Size = MAP_APPFONT ( 40 , 8 ) ;
Text [ en-US ] = "~Application:" ;
};
Edit ED_DDE_APP
{
HelpID = "sfx2:Edit:MD_DDE_LINKEDIT:ED_DDE_APP";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 14 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
};
FixedText FT_DDE_TOPIC
{
Pos = MAP_APPFONT ( 12 , 34 ) ;
Size = MAP_APPFONT ( 40 , 8 ) ;
Text [ en-US ] = "~File:" ;
};
Edit ED_DDE_TOPIC
{
HelpID = "sfx2:Edit:MD_DDE_LINKEDIT:ED_DDE_TOPIC";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 32 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
};
FixedText FT_DDE_ITEM
{
Pos = MAP_APPFONT ( 12 , 52 ) ;
Size = MAP_APPFONT ( 40 , 8 ) ;
Text [ en-US ] = "~Category:" ;
};
Edit ED_DDE_ITEM
{
HelpID = "sfx2:Edit:MD_DDE_LINKEDIT:ED_DDE_ITEM";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 50 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
};
FixedLine GROUP_DDE_CHG
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 155 , 8 ) ;
Text [ en-US ] = "Modify link" ;
};
OKButton 1
{
Pos = MAP_APPFONT ( 167 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
};
CancelButton 1
{
Pos = MAP_APPFONT ( 167 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -35,7 +35,6 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
#include "dde.hrc"
#include <sfx2/lnkbase.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/sfxresid.hxx>
......@@ -58,15 +57,10 @@ namespace sfx2
class SvDDELinkEditDialog : public ModalDialog
{
FixedText aFtDdeApp;
Edit aEdDdeApp;
FixedText aFtDdeTopic;
Edit aEdDdeTopic;
FixedText aFtDdeItem;
Edit aEdDdeItem;
FixedLine aGroupDdeChg;
OKButton aOKButton1;
CancelButton aCancelButton1;
Edit *m_pEdDdeApp;
Edit *m_pEdDdeTopic;
Edit *m_pEdDdeItem;
OKButton *m_pOKButton;
DECL_STATIC_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit* );
public:
......@@ -75,46 +69,40 @@ public:
};
SvDDELinkEditDialog::SvDDELinkEditDialog( Window* pParent, SvBaseLink* pLink )
: ModalDialog( pParent, SfxResId( MD_DDE_LINKEDIT ) ),
aFtDdeApp( this, SfxResId( FT_DDE_APP ) ),
aEdDdeApp( this, SfxResId( ED_DDE_APP ) ),
aFtDdeTopic( this, SfxResId( FT_DDE_TOPIC ) ),
aEdDdeTopic( this, SfxResId( ED_DDE_TOPIC ) ),
aFtDdeItem( this, SfxResId( FT_DDE_ITEM ) ),
aEdDdeItem( this, SfxResId( ED_DDE_ITEM ) ),
aGroupDdeChg( this, SfxResId( GROUP_DDE_CHG ) ),
aOKButton1( this, SfxResId( 1 ) ),
aCancelButton1( this, SfxResId( 1 ) )
: ModalDialog( pParent, "LinkEditDialog", "sfx/ui/linkeditdialog.ui" )
{
FreeResource();
get(m_pOKButton, "ok");
get(m_pEdDdeApp, "app");
get(m_pEdDdeTopic, "file");
get(m_pEdDdeItem, "category");
OUString sServer, sTopic, sItem;
pLink->GetLinkManager()->GetDisplayNames( pLink, &sServer, &sTopic, &sItem );
aEdDdeApp.SetText( sServer );
aEdDdeTopic.SetText( sTopic );
aEdDdeItem.SetText( sItem );
m_pEdDdeApp->SetText( sServer );
m_pEdDdeTopic->SetText( sTopic );
m_pEdDdeItem->SetText( sItem );
aEdDdeApp.SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
aEdDdeTopic.SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
aEdDdeItem.SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
m_pEdDdeApp->SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
m_pEdDdeTopic->SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
m_pEdDdeItem->SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
aOKButton1.Enable( !sServer.isEmpty() && !sTopic.isEmpty() && !sItem.isEmpty() );
m_pOKButton->Enable( !sServer.isEmpty() && !sTopic.isEmpty() && !sItem.isEmpty() );
}
OUString SvDDELinkEditDialog::GetCmd() const
{
OUString sCmd( aEdDdeApp.GetText() ), sRet;
::sfx2::MakeLnkName( sRet, &sCmd, aEdDdeTopic.GetText(), aEdDdeItem.GetText() );
OUString sCmd( m_pEdDdeApp->GetText() ), sRet;
::sfx2::MakeLnkName( sRet, &sCmd, m_pEdDdeTopic->GetText(), m_pEdDdeItem->GetText() );
return sRet;
}
IMPL_STATIC_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit *, pEdit )
{
(void)pEdit; // unused variable
pThis->aOKButton1.Enable( !pThis->aEdDdeApp.GetText().isEmpty() &&
!pThis->aEdDdeTopic.GetText().isEmpty() &&
!pThis->aEdDdeItem.GetText().isEmpty() );
pThis->m_pOKButton->Enable( !pThis->m_pEdDdeApp->GetText().isEmpty() &&
!pThis->m_pEdDdeTopic->GetText().isEmpty() &&
!pThis->m_pEdDdeItem->GetText().isEmpty() );
return 0;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="LinkEditDialog">
<property name="can_focus">False</property>
<property name="border_width">6</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">6</property>
<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="ok">
<property name="label">gtk-ok</property>
<property name="use_action_appearance">False</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="cancel">
<property name="label">gtk-cancel</property>
<property name="use_action_appearance">False</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">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="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</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="hexpand">True</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_Application:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">app</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_File:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">file</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_Category:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">category</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="app">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="file">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="category">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</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">Modify Link</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
</action-widgets>
</object>
</interface>
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