cui/UIConfig_cui.mk                      |    1 
 cui/source/dialogs/cuigaldlg.cxx         |   27 +++-----
 cui/source/dialogs/gallery.src           |   28 --------
 cui/source/inc/cuigaldlg.hxx             |    6 -
 cui/source/inc/gallery.hrc               |    4 -
 cui/uiconfig/ui/galleryupdateprogress.ui |  100 +++++++++++++++++++++++++++++++
 include/svx/exthelpid.hrc                |    1 
 7 files changed, 114 insertions(+), 53 deletions(-)

New commits:
commit c971c1fa66570bc6cbf658aa5c9cee15fc470bd2
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Mar 11 17:08:18 2014 +0000

    convert gallery update progress dialog to .ui
    
    Change-Id: If1bcd040fabef1d352f04898f4bb583d9f4fc8c7

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index bc0f070..bd3097b 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
        cui/uiconfig/ui/gallerythemedialog \
        cui/uiconfig/ui/gallerythemeiddialog \
        cui/uiconfig/ui/gallerytitledialog \
+       cui/uiconfig/ui/galleryupdateprogress \
        cui/uiconfig/ui/hangulhanjaadddialog \
        cui/uiconfig/ui/hangulhanjaoptdialog \
        cui/uiconfig/ui/hatchpage \
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index d7f09cd..32d52e4 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -443,22 +443,17 @@ void TakeProgress::StartExecuteModal( const Link& 
rEndDialogHdl )
 
 
 // - ActualizeProgress -
-
-
-ActualizeProgress::ActualizeProgress( Window* pWindow, GalleryTheme* pThm ) :
-    ModalDialog             ( pWindow, CUI_RES( 
RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS ) ),
-    aFtActualizeFile        ( this, CUI_RES( FT_ACTUALIZE_FILE ) ),
-    aFLActualizeProgress   ( this, CUI_RES( FL_ACTUALIZE_PROGRESS ) ),
-    aBtnCancel              ( this, CUI_RES( BTN_CANCEL ) ),
-    pTimer(NULL),
-    pTheme                  ( pThm )
+ActualizeProgress::ActualizeProgress(Window* pWindow, GalleryTheme* pThm)
+    : ModalDialog(pWindow, "GalleryUpdateProgress",
+        "cui/ui/galleryupdateprogress.ui")
+    , pTimer(NULL)
+    , pTheme(pThm)
 {
-    FreeResource();
-    aBtnCancel.SetClickHdl( LINK( this, ActualizeProgress, ClickCancelBtn ) );
+    get(m_pFtActualizeFile, "file");
+    get(m_pBtnCancel, "cancel");
+    m_pBtnCancel->SetClickHdl( LINK( this, ActualizeProgress, ClickCancelBtn ) 
);
 }
 
-
-
 short ActualizeProgress::Execute()
 {
     short nRet;
@@ -515,9 +510,9 @@ IMPL_LINK( ActualizeProgress, ActualizeHdl, INetURLObject*, 
pURL )
 
     if( pURL )
     {
-        aFtActualizeFile.SetText( GetReducedString( *pURL, 30 ) );
-        aFtActualizeFile.Flush();
-        aFtActualizeFile.Sync();
+        m_pFtActualizeFile->SetText( GetReducedString( *pURL, 30 ) );
+        m_pFtActualizeFile->Flush();
+        m_pFtActualizeFile->Sync();
     }
 
     return 0;
diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src
index b7cc83c..21b7ed8 100644
--- a/cui/source/dialogs/gallery.src
+++ b/cui/source/dialogs/gallery.src
@@ -145,34 +145,6 @@ ModalDialog RID_SVXDLG_GALLERY_TAKE_PROGRESS
 
 
/******************************************************************************/
 
-ModalDialog RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS
-{
-    HelpId = HID_GALLERY_ACTUALIZE;
-    OutputSize = TRUE ;
-    Border = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 124 , 56 ) ;
-    Text [ en-US ] = "Update" ;
-    Moveable = TRUE ;
-    FixedLine FL_ACTUALIZE_PROGRESS
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 112 , 8 ) ;
-        Text [ en-US ] = "File" ;
-    };
-    FixedText FT_ACTUALIZE_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>" ;
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 969ce2b..1026503 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -151,10 +151,8 @@ public:
 class ActualizeProgress : public ModalDialog
 {
 private:
-
-    FixedText           aFtActualizeFile;
-    FixedLine           aFLActualizeProgress;
-    CancelButton        aBtnCancel;
+    FixedText*          m_pFtActualizeFile;
+    CancelButton*       m_pBtnCancel;
     Timer*              pTimer;
     GalleryTheme*       pTheme;
     GalleryProgress     aStatusProgress;
diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc
index 74cf43c..5487b25 100644
--- a/cui/source/inc/gallery.hrc
+++ b/cui/source/inc/gallery.hrc
@@ -24,7 +24,6 @@
 
 // Dialogs
 #define RID_SVXDLG_GALLERY_TAKE_PROGRESS        (RID_CUI_GALLERY_START + 7)
-#define RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS   (RID_CUI_GALLERY_START + 8)
 
 // Gallery-Strings
 #define RID_SVXSTR_GALLERY_NOFILES              (RID_CUI_GALLERY_START + 12)
@@ -56,7 +55,4 @@
 #define BTN_MADDIN1 8
 #define BTN_MADDIN2 9
 
-#define FL_ACTUALIZE_PROGRESS 1
-#define FT_ACTUALIZE_FILE 1
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/galleryupdateprogress.ui 
b/cui/uiconfig/ui/galleryupdateprogress.ui
new file mode 100644
index 0000000..96634c6
--- /dev/null
+++ b/cui/uiconfig/ui/galleryupdateprogress.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="GalleryUpdateProgress">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Update</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/include/svx/exthelpid.hrc b/include/svx/exthelpid.hrc
index b89d2f5..39cc178 100644
--- a/include/svx/exthelpid.hrc
+++ b/include/svx/exthelpid.hrc
@@ -26,7 +26,6 @@
 // are moved to this exported (delivered) hrc file
 
 // Help-Ids --------------------------------------------------------------
-#define HID_GALLERY_ACTUALIZE                     "SVX_HID_GALLERY_ACTUALIZE"
 #define HID_GALLERY_TITLE                         "SVX_HID_GALLERY_TITLE"
 
 #endif
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to