[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk

Caolán McNamara caolanm at redhat.com
Wed Mar 12 05:33:24 PDT 2014


 cui/UIConfig_cui.mk                     |    1 
 cui/source/dialogs/cuigaldlg.cxx        |   26 ++------
 cui/source/dialogs/gallery.src          |   34 ----------
 cui/source/inc/cuigaldlg.hxx            |   15 +---
 cui/source/inc/gallery.hrc              |   21 ------
 cui/source/inc/helpid.hrc               |    1 
 cui/uiconfig/ui/galleryapplyprogress.ui |  100 ++++++++++++++++++++++++++++++++
 cui/uiconfig/ui/galleryfilespage.ui     |    1 
 8 files changed, 115 insertions(+), 84 deletions(-)

New commits:
commit 6ba8668e08813948cf931084d251a724224ba11b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 12 12:12:36 2014 +0000

    convert gallery apply progress dialog to .ui
    
    Change-Id: I1fd2f2f1faa51346eb68445688fb5e1ef85b7124

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index ec633dc..bedb80c 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -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 \
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 1550acc..b96a091 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -334,23 +334,17 @@ 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()
 {
@@ -358,16 +352,12 @@ void TakeProgress::Terminate()
         maTakeThread->terminate();
 }
 
-
-
 IMPL_LINK_NOARG(TakeProgress, ClickCancelBtn)
 {
     Terminate();
     return 0L;
 }
 
-
-
 IMPL_LINK_NOARG(TakeProgress, CleanUpHdl)
 {
     if (maTakeThread.is())
diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src
index 9bc902b..3dbb814 100644
--- a/cui/source/dialogs/gallery.src
+++ b/cui/source/dialogs/gallery.src
@@ -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" ;
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 1e4f5c6..e6a6156 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -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 );
 };
diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc
index d0871a5..c8c2d10 100644
--- a/cui/source/inc/gallery.hrc
+++ b/cui/source/inc/gallery.hrc
@@ -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: */
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 7dbdf02..547e7b7 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -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"
diff --git a/cui/uiconfig/ui/galleryapplyprogress.ui b/cui/uiconfig/ui/galleryapplyprogress.ui
new file mode 100644
index 0000000..b159527
--- /dev/null
+++ b/cui/uiconfig/ui/galleryapplyprogress.ui
@@ -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>
diff --git a/cui/uiconfig/ui/galleryfilespage.ui b/cui/uiconfig/ui/galleryfilespage.ui
index eb3d660..fceabed 100644
--- a/cui/uiconfig/ui/galleryfilespage.ui
+++ b/cui/uiconfig/ui/galleryfilespage.ui
@@ -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>


More information about the Libreoffice-commits mailing list