[Libreoffice-commits] core.git: sd/source sd/uiconfig sd/UIConfig_sdraw.mk
Manal Alhassoun
malhassoun at kacst.edu.sa
Fri Dec 27 13:26:36 PST 2013
sd/UIConfig_sdraw.mk | 1
sd/source/ui/app/strings.src | 4 --
sd/source/ui/inc/strings.hrc | 2 -
sd/source/ui/view/drviews6.cxx | 9 ++----
sd/uiconfig/sdraw/ui/queryunlinkimagedialog.ui | 35 +++++++++++++++++++++++++
5 files changed, 40 insertions(+), 11 deletions(-)
New commits:
commit 6cbccc8efa49dbf4ff21cabbfb9e74059d67b170
Author: Manal Alhassoun <malhassoun at kacst.edu.sa>
Date: Thu Dec 26 13:16:51 2013 +0300
convert unlink image querybox to .ui
Change-Id: I46458d497757162be283effb624a7c769aeb5354
Reviewed-on: https://gerrit.libreoffice.org/7200
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk
index 5f8ce22..cb2c84b 100644
--- a/sd/UIConfig_sdraw.mk
+++ b/sd/UIConfig_sdraw.mk
@@ -80,6 +80,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\
sd/uiconfig/sdraw/ui/namedesign \
sd/uiconfig/sdraw/ui/paranumberingtab \
sd/uiconfig/sdraw/ui/printeroptions \
+ sd/uiconfig/sdraw/ui/queryunlinkimagedialog \
sd/uiconfig/sdraw/ui/tabledesigndialog \
sd/uiconfig/sdraw/ui/vectorize \
))
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index b7f916c..b8b5237 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -798,10 +798,6 @@ String STR_FILEFORMAT_NAME
{
Text [ en-US ] = "File name without extension" ;
};
-String STR_RELEASE_GRAPHICLINK
-{
- Text [ en-US ] = "This image is linked to a document. Do you want to unlink the image in order to edit it?" ;
-};
String STR_NEW_CUSTOMSHOW
{
Text [ en-US ] = "New Custom Slide Show" ;
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index 819d31d..dcc6042 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -284,8 +284,6 @@
#define STR_FILEFORMAT_PATH (RID_APP_START+509)
#define STR_FILEFORMAT_NAME (RID_APP_START+510)
-#define STR_RELEASE_GRAPHICLINK (RID_APP_START+511)
-
#define STR_NEW_CUSTOMSHOW (RID_APP_START+512)
#define STR_COPY_CUSTOMSHOW (RID_APP_START+513)
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 6aa6238..14f7e6c 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -301,19 +301,18 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
if ( pObj && !mpDrawView->IsTextEdit() )
{
SdrGrafObj* pNewObj = (SdrGrafObj*) pObj->Clone();
- sal_Bool bCont = sal_True;
+ bool bCont = true;
if( pNewObj->IsLinkedGraphic() )
{
- QueryBox aQBox( (Window*) GetActiveWindow(), WB_YES_NO | WB_DEF_YES,
- SD_RESSTR( STR_RELEASE_GRAPHICLINK ) );
+ MessageDialog aQueryBox( (Window*) GetActiveWindow(),"QueryUnlinkImageDialog","modules/sdraw/ui/queryunlinkimagedialog.ui");
- if( RET_YES == aQBox.Execute() )
+ if (RET_YES == aQueryBox.Execute())
pNewObj->ReleaseGraphicLink();
else
{
delete pNewObj;
- bCont = sal_False;
+ bCont = false;
}
}
diff --git a/sd/uiconfig/sdraw/ui/queryunlinkimagedialog.ui b/sd/uiconfig/sdraw/ui/queryunlinkimagedialog.ui
new file mode 100644
index 0000000..c372e2b
--- /dev/null
+++ b/sd/uiconfig/sdraw/ui/queryunlinkimagedialog.ui
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkMessageDialog" id="QueryUnlinkImageDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Release image's link?</property>
+ <property name="resizable">False</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="message_type">question</property>
+ <property name="buttons">yes-no</property>
+ <property name="text" translatable="yes">This image is linked to a document.</property>
+ <property name="secondary_text" translatable="yes"> Do you want to unlink the image in order to edit it?</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="messagedialog-vbox4">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">24</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="messagedialog-action_area4">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ </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>
+ </object>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list