summaryrefslogtreecommitdiff
path: root/sw/uiconfig
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-06-25 10:44:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-06-27 09:56:49 +0200
commitf5176ad2defbd6d77533976abb0045368c541e99 (patch)
tree8c354782db0bdf5eea0ec685e0bf770ccf42df26 /sw/uiconfig
parent0bbefaebc45a18dfe460de1b3e7bce61fd2bc9c7 (diff)
weld SwCustomizeAddressBlockDialog
a) use EditEngine instead of TextEngine as the former can be hosted in a foreign widget b) use a SfxGrabBagItem to hold the custom pseudo-field info inside the EditEngine c) use a proxy XDropTargetListener/XDropTarget to massage the treelist entry drag source into the textengine drop target destination Change-Id: I6bf1613ed91341c24b77564405f38b5dab0aacd7 Reviewed-on: https://gerrit.libreoffice.org/74699 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/uiconfig')
-rw-r--r--sw/uiconfig/swriter/ui/addressblockdialog.ui206
1 files changed, 125 insertions, 81 deletions
diff --git a/sw/uiconfig/swriter/ui/addressblockdialog.ui b/sw/uiconfig/swriter/ui/addressblockdialog.ui
index 3767fe9c7419..8eb073035615 100644
--- a/sw/uiconfig/swriter/ui/addressblockdialog.ui
+++ b/sw/uiconfig/swriter/ui/addressblockdialog.ui
@@ -1,12 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-forward</property>
+ </object>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-back</property>
+ </object>
+ <object class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-up</property>
+ </object>
+ <object class="GtkImage" id="image4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-down</property>
+ </object>
+ <object class="GtkImage" id="image5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes" context="addressblockdialog|image5|tooltip_text">Add to address</property>
+ <property name="stock">gtk-go-forward</property>
+ </object>
+ <object class="GtkImage" id="image6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-back</property>
+ </object>
+ <object class="GtkTreeStore" id="liststore1">
+ <columns>
+ <!-- column-name text -->
+ <column type="gchararray"/>
+ <!-- column-name id -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
<object class="GtkDialog" id="AddressBlockDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="addressblockdialog|AddressBlockDialog">New Address Block</property>
+ <property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">0</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -37,6 +82,7 @@
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@@ -58,6 +104,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
+ <property name="secondary">True</property>
</packing>
</child>
</object>
@@ -80,30 +127,55 @@
<object class="GtkLabel" id="addressesft">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="addressblockdialog|addressesft">Address _elements</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">addresses:border</property>
+ <property name="mnemonic_widget">addresses</property>
+ <property name="xalign">0</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="swuilo-DDListBox" id="addresses:border">
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection1"/>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="addresses">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="model">liststore1</property>
+ <property name="headers_visible">False</property>
+ <property name="reorderable">True</property>
+ <property name="search_column">0</property>
+ <property name="show_expanders">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Macro Library List-selection2"/>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn3">
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderer4"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
<property name="height">5</property>
</packing>
</child>
@@ -111,16 +183,14 @@
<object class="GtkLabel" id="addressdestft">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="addressblockdialog|addressdestft">1. Drag address elements here</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">addressdest:border</property>
+ <property name="mnemonic_widget">addressdest</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -142,8 +212,6 @@
<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>
@@ -157,8 +225,6 @@
<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>
@@ -172,8 +238,6 @@
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -187,8 +251,6 @@
<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>
<child>
@@ -210,40 +272,34 @@
<packing>
<property name="left_attach">3</property>
<property name="top_attach">1</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="xalign">0</property>
<property name="label" translatable="yes" context="addressblockdialog|label3">Preview</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">addrpreview:border</property>
+ <property name="mnemonic_widget">addrpreview</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="customft">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="addressblockdialog|customft">2. Customi_ze salutation</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">custom</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -251,8 +307,6 @@
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="has_entry">True</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
<child internal-child="entry">
<object class="GtkEntry" id="comboboxtext-entry">
<property name="can_focus">False</property>
@@ -262,37 +316,64 @@
<packing>
<property name="left_attach">2</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="swuilo-AddressMultiLineEdit" id="addressdest:border">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="accepts_tab">False</property>
+ <property name="border_width">0</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkDrawingArea" id="addressdest">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="swlo-SwAddressPreview" id="addrpreview:border">
+ <object class="GtkScrolledWindow" id="previewwin">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkDrawingArea" id="addrpreview">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -313,8 +394,6 @@
<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>
@@ -327,16 +406,12 @@
<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>
</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>
@@ -384,42 +459,11 @@
<action-widget response="-11">help</action-widget>
</action-widgets>
</object>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-go-forward</property>
- </object>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-go-back</property>
- </object>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-go-up</property>
- </object>
- <object class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-go-down</property>
- </object>
- <object class="GtkImage" id="image5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes" context="addressblockdialog|image5|tooltip_text">Add to address</property>
- <property name="stock">gtk-go-forward</property>
- </object>
- <object class="GtkImage" id="image6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-go-back</property>
- </object>
<object class="GtkSizeGroup" id="sizegroup1">
<property name="mode">both</property>
<widgets>
- <widget name="addressdest:border"/>
- <widget name="addrpreview:border"/>
+ <widget name="addressdest"/>
+ <widget name="addrpreview"/>
</widgets>
</object>
</interface>