convert gallery apply progress dialog to .ui
Change-Id: I1fd2f2f1faa51346eb68445688fb5e1ef85b7124
This commit is contained in:
parent
5bd78e4c5c
commit
6ba8668e08
8 changed files with 115 additions and 84 deletions
|
@ -56,6 +56,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
|
|||
cui/uiconfig/ui/effectspage \
|
||||
cui/uiconfig/ui/eventsconfigpage \
|
||||
cui/uiconfig/ui/formatcellsdialog \
|
||||
cui/uiconfig/ui/galleryapplyprogress \
|
||||
cui/uiconfig/ui/galleryfilespage \
|
||||
cui/uiconfig/ui/gallerygeneralpage \
|
||||
cui/uiconfig/ui/gallerysearchprogress \
|
||||
|
|
|
@ -334,40 +334,30 @@ void TakeThread::execute()
|
|||
Application::PostUserEvent( LINK( mpProgress, TakeProgress, CleanUpHdl ) );
|
||||
}
|
||||
|
||||
|
||||
// - TakeProgress -
|
||||
|
||||
|
||||
TakeProgress::TakeProgress( Window* pWindow ) :
|
||||
ModalDialog ( pWindow, CUI_RES( RID_SVXDLG_GALLERY_TAKE_PROGRESS ) ),
|
||||
aFtTakeFile ( this, CUI_RES( FT_TAKE_FILE ) ),
|
||||
aFLTakeProgress( this, CUI_RES( FL_TAKE_PROGRESS ) ),
|
||||
aBtnCancel ( this, CUI_RES( BTN_CANCEL ) ),
|
||||
window_(pWindow)
|
||||
TakeProgress::TakeProgress(Window* pWindow)
|
||||
: ModalDialog(pWindow, "GalleryApplyProgress",
|
||||
"cui/ui/galleryapplyprogress.ui")
|
||||
, window_(pWindow)
|
||||
{
|
||||
FreeResource();
|
||||
aBtnCancel.SetClickHdl( LINK( this, TakeProgress, ClickCancelBtn ) );
|
||||
get(m_pFtTakeFile, "file");
|
||||
get(m_pBtnCancel, "cancel");
|
||||
|
||||
m_pBtnCancel->SetClickHdl( LINK( this, TakeProgress, ClickCancelBtn ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void TakeProgress::Terminate()
|
||||
{
|
||||
if (maTakeThread.is())
|
||||
maTakeThread->terminate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
IMPL_LINK_NOARG(TakeProgress, ClickCancelBtn)
|
||||
{
|
||||
Terminate();
|
||||
return 0L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
IMPL_LINK_NOARG(TakeProgress, CleanUpHdl)
|
||||
{
|
||||
if (maTakeThread.is())
|
||||
|
|
|
@ -22,38 +22,6 @@
|
|||
#include "gallery.hrc"
|
||||
#include <svx/exthelpid.hrc>
|
||||
|
||||
#define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
|
||||
|
||||
ModalDialog RID_SVXDLG_GALLERY_TAKE_PROGRESS
|
||||
{
|
||||
HelpId = HID_GALLERY_APPLY ;
|
||||
OutputSize = TRUE ;
|
||||
Border = TRUE ;
|
||||
SVLook = TRUE ;
|
||||
Size = MAP_APPFONT ( 124 , 56 ) ;
|
||||
Text [ en-US ] = "Apply" ;
|
||||
Moveable = TRUE ;
|
||||
FixedLine FL_TAKE_PROGRESS
|
||||
{
|
||||
Pos = MAP_APPFONT ( 6 , 3 ) ;
|
||||
Size = MAP_APPFONT ( 112 , 8 ) ;
|
||||
Text [ en-US ] = "File" ;
|
||||
};
|
||||
FixedText FT_TAKE_FILE
|
||||
{
|
||||
Pos = MAP_APPFONT ( 12 , 14 ) ;
|
||||
Size = MAP_APPFONT ( 100 , 10 ) ;
|
||||
};
|
||||
CancelButton BTN_CANCEL
|
||||
{
|
||||
Pos = MAP_APPFONT ( 37 , 36 ) ;
|
||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
||||
TabStop = TRUE ;
|
||||
};
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
String RID_SVXSTR_GALLERY_NOFILES
|
||||
{
|
||||
Text [ en-US ] = "<No Files>" ;
|
||||
|
@ -75,8 +43,6 @@ String RID_SVXSTR_GALLERY_ID_EXISTS
|
|||
Text [ en-US ] = "This ID already exists..." ;
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
Bitmap RID_SVXBMP_THEME_NORMAL_BIG
|
||||
{
|
||||
File = "galnorl.bmp" ;
|
||||
|
|
|
@ -125,25 +125,22 @@ public:
|
|||
class TakeProgress : public ModalDialog
|
||||
{
|
||||
private:
|
||||
|
||||
FixedText aFtTakeFile;
|
||||
FixedLine aFLTakeProgress;
|
||||
CancelButton aBtnCancel;
|
||||
FixedText* m_pFtTakeFile;
|
||||
CancelButton* m_pBtnCancel;
|
||||
Window * window_;
|
||||
rtl::Reference< TakeThread > maTakeThread;
|
||||
TokenList_impl maTakenList;
|
||||
|
||||
DECL_LINK( ClickCancelBtn, void* );
|
||||
DECL_LINK( ClickCancelBtn, void* );
|
||||
void Terminate();
|
||||
|
||||
public:
|
||||
|
||||
TakeProgress( Window* pWindow );
|
||||
~TakeProgress() {};
|
||||
TakeProgress( Window* pWindow );
|
||||
|
||||
DECL_LINK( CleanUpHdl, void* );
|
||||
DECL_LINK( CleanUpHdl, void* );
|
||||
|
||||
void SetFile( const INetURLObject& rURL ) { aFtTakeFile.SetText( GetReducedString( rURL, 30 ) ); }
|
||||
void SetFile( const INetURLObject& rURL ) { m_pFtTakeFile->SetText( GetReducedString( rURL, 30 ) ); }
|
||||
virtual short Execute();
|
||||
virtual void StartExecuteModal( const Link& rEndDialogHdl );
|
||||
};
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
*/
|
||||
#include <cuires.hrc>
|
||||
|
||||
// Dialogs
|
||||
#define RID_SVXDLG_GALLERY_TAKE_PROGRESS (RID_CUI_GALLERY_START + 7)
|
||||
|
||||
// Gallery-Strings
|
||||
#define RID_SVXSTR_GALLERY_NOFILES (RID_CUI_GALLERY_START + 12)
|
||||
#define RID_SVXSTR_GALLERYPROPS_OBJECT (RID_CUI_GALLERY_START + 39)
|
||||
|
@ -33,22 +30,4 @@
|
|||
#define RID_SVXBMP_THEME_READONLY_BIG (RID_CUI_GALLERY_START + 53)
|
||||
#define RID_SVXBMP_THEME_DEFAULT_BIG (RID_CUI_GALLERY_START + 55)
|
||||
|
||||
// local Defines
|
||||
#define BTN_OK 1
|
||||
#define BTN_CANCEL 1
|
||||
#define BTN_HELP 1
|
||||
|
||||
#define LBX_FOUND 1
|
||||
#define BTN_TAKE 5
|
||||
#define BTN_SEARCH 4
|
||||
#define CBX_PREVIEW 3
|
||||
#define FT_FILETYPE 2
|
||||
#define CBB_FILETYPE 1
|
||||
#define FL_TAKE_PROGRESS 1
|
||||
#define FT_TAKE_FILE 1
|
||||
#define BTN_TAKEALL 1
|
||||
#define WND_BRSPRV 1
|
||||
#define BTN_MADDIN1 8
|
||||
#define BTN_MADDIN2 9
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -177,7 +177,6 @@
|
|||
#define HID_SEARCH_APPROXSETTINGS "CUI_HID_SEARCH_APPROXSETTINGS"
|
||||
#define HID_SEARCH_BTN_SEARCH "CUI_HID_SEARCH_BTN_SEARCH"
|
||||
#define HID_SEARCH_BTN_CLOSE "CUI_HID_SEARCH_BTN_CLOSE"
|
||||
#define HID_GALLERY_APPLY "CUI_HID_GALLERY_APPLY"
|
||||
#define HID_DIALOG_HANGULHANJA "CUI_HID_DIALOG_HANGULHANJA"
|
||||
#define HID_HANGULHANJA_EDIT_DLG "CUI_HID_HANGULHANJA_EDIT_DLG"
|
||||
#define HID_MULTIPATH "CUI_HID_MULTIPATH"
|
||||
|
|
100
cui/uiconfig/ui/galleryapplyprogress.ui
Normal file
100
cui/uiconfig/ui/galleryapplyprogress.ui
Normal file
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<object class="GtkDialog" id="GalleryApplyProgress">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Apply</property>
|
||||
<property name="type_hint">normal</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="layout_style">end</property>
|
||||
<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="can_default">True</property>
|
||||
<property name="has_default">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="GtkGrid" id="grid1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="file">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="width_chars">40</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">File</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</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>
|
||||
</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">cancel</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
|
@ -30,7 +30,6 @@
|
|||
<property name="label" translatable="yes">_File type</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">filetype</property>
|
||||
<property name="ellipsize">start</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
|
|
Loading…
Reference in a new issue