summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManal Alhassoun <malhassoun@kacst.edu.sa>2013-08-01 13:56:03 +0300
committerCaolán McNamara <caolanm@redhat.com>2013-08-02 12:59:40 +0000
commit1e91ddc06159806620d93385c900cd3d98b14814 (patch)
tree500b86626d2081234695afe8d2a9c8a825be8b00
parent3d5a27bf5a50870adce0bd43f9f71211e9caaac2 (diff)
Convert ImageMap Properties to Widget UI
Change-Id: I619b2dab67b22d75839b9968e7e784b5dd5268ad Reviewed-on: https://gerrit.libreoffice.org/5226 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--cui/AllLangResTarget_cui.mk1
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/dialogs/cuiimapdlg.hrc38
-rw-r--r--cui/source/dialogs/cuiimapdlg.src147
-rw-r--r--cui/source/dialogs/cuiimapwnd.cxx37
-rw-r--r--cui/source/inc/cuiimapwnd.hxx29
-rw-r--r--cui/uiconfig/ui/cuiimapdlg.ui269
7 files changed, 293 insertions, 229 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 3d1d8de17cc9..45818b963d36 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -29,7 +29,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/customize/macropg.src \
cui/source/dialogs/colorpicker.src \
cui/source/dialogs/commonlingui.src \
- cui/source/dialogs/cuiimapdlg.src \
cui/source/dialogs/cuires.src \
cui/source/dialogs/fmsearch.src \
cui/source/dialogs/gallery.src \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index a3f8efdc250f..1401bb89152a 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/colorpage \
cui/uiconfig/ui/comment \
+ cui/uiconfig/ui/cuiimapdlg \
cui/uiconfig/ui/formatnumberdialog \
cui/uiconfig/ui/gradientpage \
cui/uiconfig/ui/colorconfigwin \
diff --git a/cui/source/dialogs/cuiimapdlg.hrc b/cui/source/dialogs/cuiimapdlg.hrc
index 8d2fcf40ab6b..e69de29bb2d1 100644
--- a/cui/source/dialogs/cuiimapdlg.hrc
+++ b/cui/source/dialogs/cuiimapdlg.hrc
@@ -1,38 +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 <cuires.hrc>
-
-// ImapDlg-Dialoge
-
-#define FT_URLDESCRIPTION 1
-#define FT_URL1 2
-#define FT_TARGET 3
-#define FT_NAME 4
-#define FT_DESCRIPTION 5
-#define EDT_URLDESCRIPTION 1
-#define EDT_URL 2
-#define EDT_NAME 3
-#define EDT_DESCRIPTION 4
-#define BTN_HELP1 1
-#define BTN_OK1 2
-#define BTN_CANCEL1 3
-#define FL_URL 1
-#define CBB_TARGETS 1
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/cuiimapdlg.src b/cui/source/dialogs/cuiimapdlg.src
index 660077e0a975..e69de29bb2d1 100644
--- a/cui/source/dialogs/cuiimapdlg.src
+++ b/cui/source/dialogs/cuiimapdlg.src
@@ -1,147 +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 "helpid.hrc"
-#include "cuiimapdlg.hrc"
-
-ModalDialog RID_SVXDLG_IMAPURL
-{
- HelpID = "cui:ModalDialog:RID_SVXDLG_IMAPURL";
- SVLook = TRUE ;
- OutputSize = TRUE ;
- Closeable = TRUE ;
- Moveable = TRUE ;
- Size = MAP_APPFONT ( 214 , 188 ) ;
- Text [ en-US ] = "Properties" ;
-
- FixedText FT_URL1
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 202 , 8 ) ;
- Text [ en-US ] = "~URL" ;
- };
- Edit EDT_URL
- {
- HelpID = "cui:Edit:RID_SVXDLG_IMAPURL:EDT_URL";
- Border = TRUE ;
- TabStop = TRUE ;
- Left = TRUE ;
- Pos = MAP_APPFONT ( 6 , 17 ) ;
- Size = MAP_APPFONT ( 202 , 12 ) ;
- };
-
- FixedText FT_TARGET
- {
- Pos = MAP_APPFONT ( 6 , 32 ) ;
- Size = MAP_APPFONT ( 202 , 8 ) ;
- Text [ en-US ] = "F~rame" ;
- };
- ComboBox CBB_TARGETS
- {
- HelpID = "cui:ComboBox:RID_SVXDLG_IMAPURL:CBB_TARGETS";
- Border = TRUE ;
- Sort = TRUE ;
- Pos = MAP_APPFONT ( 6 , 43 ) ;
- Size = MAP_APPFONT ( 101 , 50 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- HScroll = TRUE ;
- };
-
- FixedText FT_NAME
- {
- Pos = MAP_APPFONT ( 6 , 59 ) ;
- Size = MAP_APPFONT ( 202 , 8 ) ;
- Text [ en-US ] = "~Name" ;
- };
- Edit EDT_NAME
- {
- HelpID = "cui:Edit:RID_SVXDLG_IMAPURL:EDT_NAME";
- Border = TRUE ;
- TabStop = TRUE ;
- Left = TRUE ;
- Pos = MAP_APPFONT ( 6 , 70 ) ;
- Size = MAP_APPFONT ( 202 , 12 ) ;
- };
-
- FixedText FT_URLDESCRIPTION
- {
- Pos = MAP_APPFONT ( 6 , 85 ) ;
- Size = MAP_APPFONT ( 202 , 8 ) ;
- Text [ en-US ] = "Alternative ~text" ;
- };
-
- Edit EDT_URLDESCRIPTION
- {
- HelpID = "cui:Edit:RID_SVXDLG_IMAPURL:EDT_URLDESCRIPTION";
- Border = TRUE ;
- TabStop = TRUE ;
- Left = TRUE ;
- Pos = MAP_APPFONT ( 6 , 96 ) ;
- Size = MAP_APPFONT ( 202 , 12 ) ;
- };
- FixedText FT_DESCRIPTION
- {
- Pos = MAP_APPFONT ( 6 , 111 ) ;
- Size = MAP_APPFONT ( 202 , 8 ) ;
- Text [ en-US ] = "~Description" ;
- };
-
- MultiLineEdit EDT_DESCRIPTION
- {
- HelpID = "cui:MultiLineEdit:RID_SVXDLG_IMAPURL:EDT_DESCRIPTION";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 122 ) ;
- Size = MAP_APPFONT ( 202 , 34 ) ;
- TabStop = TRUE ;
- IgnoreTab = TRUE;
- VScroll = TRUE;
- };
-
- FixedLine FL_URL
- {
- Pos = MAP_APPFONT ( 0 , 160 ) ;
- Size = MAP_APPFONT ( 214 , 4 ) ;
- };
-
- // Buttons
- HelpButton BTN_HELP1
- {
- Pos = MAP_APPFONT ( 6, 168 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-
- OKButton BTN_OK1
- {
- TabStop = TRUE ;
- DefButton = TRUE ;
- Pos = MAP_APPFONT ( 107 , 168 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
-
- CancelButton BTN_CANCEL1
- {
- TabStop = TRUE ;
- Pos = MAP_APPFONT ( 160 , 168 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/cuiimapwnd.cxx b/cui/source/dialogs/cuiimapwnd.cxx
index ceb24716263a..4d16cb8cd160 100644
--- a/cui/source/dialogs/cuiimapwnd.cxx
+++ b/cui/source/dialogs/cuiimapwnd.cxx
@@ -29,7 +29,6 @@
#include <svx/xoutbmp.hxx>
#include <dialmgr.hxx>
#include <cuires.hrc>
-#include <cuiimapdlg.hrc>
#include <cuiimapwnd.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdorect.hxx>
@@ -50,36 +49,26 @@
\************************************************************************/
URLDlg::URLDlg( Window* pWindow, const String& rURL, const String& rAlternativeText, const String& rDescription, const String& rTarget, const String& rName, TargetList& rTargetList )
-: ModalDialog( pWindow, CUI_RES( RID_SVXDLG_IMAPURL ) )
-, maFtURL( this, CUI_RES( FT_URL1 ) )
-, maEdtURL( this, CUI_RES( EDT_URL ) )
-, maFtTarget( this, CUI_RES( FT_TARGET ) )
-, maCbbTargets( this, CUI_RES( CBB_TARGETS ) )
-, maFtName( this, CUI_RES( FT_NAME ) )
-, maEdtName( this, CUI_RES( EDT_NAME ) )
-, maFtAlternativeText( this, CUI_RES( FT_URLDESCRIPTION ) )
-, maEdtAlternativeText( this, CUI_RES( EDT_URLDESCRIPTION ) )
-, maFtDescription( this, CUI_RES( FT_DESCRIPTION ) )
-, maEdtDescription( this, CUI_RES( EDT_DESCRIPTION ) )
-, maFlURL( this, CUI_RES( FL_URL ) )
-, maBtnHelp( this, CUI_RES( BTN_HELP1 ) )
-, maBtnOk( this, CUI_RES( BTN_OK1 ) )
-, maBtnCancel( this, CUI_RES( BTN_CANCEL1 ) )
+: ModalDialog(pWindow, "IMapDialog", "cui/ui/cuiimapdlg.ui")
{
- FreeResource();
+ get(m_pEdtURL, "urlentry");
+ get(m_pCbbTargets, "frameCB");
+ get(m_pEdtName, "nameentry");
+ get(m_pEdtAlternativeText, "textentry");
+ get(m_pEdtDescription, "descTV");
- maEdtURL.SetText( rURL );
- maEdtAlternativeText.SetText( rAlternativeText );
- maEdtDescription.SetText( rDescription );
- maEdtName.SetText( rName );
+ m_pEdtURL->SetText( rURL );
+ m_pEdtAlternativeText->SetText( rAlternativeText );
+ m_pEdtDescription->SetText( rDescription );
+ m_pEdtName->SetText( rName );
for( size_t i = 0, n = rTargetList.size(); i < n; ++i )
- maCbbTargets.InsertEntry( *rTargetList[ i ] );
+ m_pCbbTargets->InsertEntry( *rTargetList[ i ] );
if( !rTarget.Len() )
- maCbbTargets.SetText( OUString("_self") );
+ m_pCbbTargets->SetText( OUString("_self") );
else
- maCbbTargets.SetText( rTarget );
+ m_pCbbTargets->SetText( rTarget );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuiimapwnd.hxx b/cui/source/inc/cuiimapwnd.hxx
index a51bf786e62c..cf8ec1946ead 100644
--- a/cui/source/inc/cuiimapwnd.hxx
+++ b/cui/source/inc/cuiimapwnd.hxx
@@ -33,20 +33,11 @@
class URLDlg : public ModalDialog
{
- FixedText maFtURL;
- Edit maEdtURL;
- FixedText maFtTarget;
- ComboBox maCbbTargets;
- FixedText maFtName;
- Edit maEdtName;
- FixedText maFtAlternativeText;
- Edit maEdtAlternativeText;
- FixedText maFtDescription;
- MultiLineEdit maEdtDescription;
- FixedLine maFlURL;
- HelpButton maBtnHelp;
- OKButton maBtnOk;
- CancelButton maBtnCancel;
+ Edit* m_pEdtURL;
+ ComboBox* m_pCbbTargets;
+ Edit* m_pEdtName;
+ Edit* m_pEdtAlternativeText;
+ VclMultiLineEdit* m_pEdtDescription;
public:
@@ -55,11 +46,11 @@ public:
const String& rTarget, const String& rName,
TargetList& rTargetList );
- String GetURL() const { return maEdtURL.GetText(); }
- String GetAltText() const { return maEdtAlternativeText.GetText(); }
- String GetDesc() const { return maEdtDescription.GetText(); }
- String GetTarget() const { return maCbbTargets.GetText(); }
- String GetName() const { return maEdtName.GetText(); }
+ String GetURL() const { return m_pEdtURL->GetText(); }
+ String GetAltText() const { return m_pEdtAlternativeText->GetText(); }
+ String GetDesc() const { return m_pEdtDescription->GetText(); }
+ String GetTarget() const { return m_pCbbTargets->GetText(); }
+ String GetName() const { return m_pEdtName->GetText(); }
};
#endif
diff --git a/cui/uiconfig/ui/cuiimapdlg.ui b/cui/uiconfig/ui/cuiimapdlg.ui
new file mode 100644
index 000000000000..fb036a26fa3b
--- /dev/null
+++ b/cui/uiconfig/ui/cuiimapdlg.ui
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="IMapDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Properties</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">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</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_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <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_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
+ <property name="secondary">True</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="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_URL</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">urlentry</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="urlentry">
+ <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="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">F_rame</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">frameCB</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="frameCB">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has_entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="combobox-entry">
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Name</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">nameentry</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="nameentry">
+ <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="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Alternative _text</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">textentry</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="textentry">
+ <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="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Description</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">descTV</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="height_request">100</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vscrollbar_policy">always</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="descTV">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="hscroll_policy">natural</property>
+ <property name="vscroll_policy">natural</property>
+ <property name="wrap_mode">word</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">9</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="0">help</action-widget>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="label1"/>
+ <widget name="label2"/>
+ <widget name="label3"/>
+ <widget name="label4"/>
+ <widget name="label5"/>
+ </widgets>
+ </object>
+</interface>