diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-21 09:46:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-21 11:23:02 +0000 |
commit | f6cd982a68528ac1bfd130080cea3f96e6cc7edd (patch) | |
tree | ff712a57c369ce990816366ceb4d1da42badd47f /padmin | |
parent | 42aeaee8dfc8cdd11428079e9fe357534bbb8898 (diff) |
move the cups password dialog from padmin to vcl
now we don't have to dlopen padmin to get it so we can drop that complicated
stuff.
Change-Id: I2f01bd104aae8f17ada9a445da653b441a927c70
Diffstat (limited to 'padmin')
-rw-r--r-- | padmin/UIConfig_spa.mk | 1 | ||||
-rw-r--r-- | padmin/source/prtsetup.cxx | 52 | ||||
-rw-r--r-- | padmin/uiconfig/ui/cupspassworddialog.ui | 155 |
3 files changed, 0 insertions, 208 deletions
diff --git a/padmin/UIConfig_spa.mk b/padmin/UIConfig_spa.mk index 242b30523646..565f0cc57536 100644 --- a/padmin/UIConfig_spa.mk +++ b/padmin/UIConfig_spa.mk @@ -10,7 +10,6 @@ $(eval $(call gb_UIConfig_UIConfig,spa)) $(eval $(call gb_UIConfig_add_uifiles,spa,\ - padmin/uiconfig/ui/cupspassworddialog \ padmin/uiconfig/ui/printerdevicepage \ padmin/uiconfig/ui/printerpaperpage \ padmin/uiconfig/ui/printerpropertiesdialog \ diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx index 38494d55fe96..938e00b32356 100644 --- a/padmin/source/prtsetup.cxx +++ b/padmin/source/prtsetup.cxx @@ -472,43 +472,6 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey ) m_pPPDValueBox->SelectEntryPos( m_pPPDValueBox->GetEntryPos( (void*)pValue ) ); } -class RTSPWDialog : public ModalDialog -{ - FixedText* m_pText; - Edit* m_pUserEdit; - Edit* m_pPassEdit; - -public: - RTSPWDialog(const OString& rServer, const OString& rUserName, Window* pParent); - - OString getUserName() const; - OString getPassword() const; -}; - -RTSPWDialog::RTSPWDialog( const OString& rServer, const OString& rUserName, Window* pParent ) - : ModalDialog(pParent, "CUPSPasswordDialog", - "spa/ui/cupspassworddialog.ui") -{ - get(m_pText, "text"); - get(m_pUserEdit, "user"); - get(m_pPassEdit, "pass"); - - OUString aText(m_pText->GetText()); - aText = aText.replaceFirst("%s", OStringToOUString(rServer, osl_getThreadTextEncoding())); - m_pText->SetText(aText); - m_pUserEdit->SetText( OStringToOUString(rUserName, osl_getThreadTextEncoding())); -} - -OString RTSPWDialog::getUserName() const -{ - return OUStringToOString( m_pUserEdit->GetText(), osl_getThreadTextEncoding() ); -} - -OString RTSPWDialog::getPassword() const -{ - return OUStringToOString( m_pPassEdit->GetText(), osl_getThreadTextEncoding() ); -} - extern "C" { int SPA_DLLPUBLIC Sal_SetupPrinterDriver( ::psp::PrinterInfo& rJobData ) @@ -524,21 +487,6 @@ extern "C" { return nRet; } - - bool SPA_DLLPUBLIC Sal_authenticateQuery( const OString& rServer, OString& rUserName, OString& rPassword ) - { - bool bRet = false; - - RTSPWDialog aDialog( rServer, rUserName, NULL ); - if( aDialog.Execute() ) - { - rUserName = aDialog.getUserName(); - rPassword = aDialog.getPassword(); - bRet = true; - } - return bRet; - } - } // extern "C" /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/uiconfig/ui/cupspassworddialog.ui b/padmin/uiconfig/ui/cupspassworddialog.ui deleted file mode 100644 index 81f80e8d3665..000000000000 --- a/padmin/uiconfig/ui/cupspassworddialog.ui +++ /dev/null @@ -1,155 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.16.1 --> -<interface> - <requires lib="gtk+" version="3.0"/> - <object class="GtkDialog" id="CUPSPasswordDialog"> - <property name="can_focus">False</property> - <property name="border_width">6</property> - <property name="title" translatable="yes">Authentication request</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="ok"> - <property name="label">gtk-ok</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">0</property> - </packing> - </child> - <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="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="hexpand">True</property> - <property name="vexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_User</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">user</property> - </object> - <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> - <object class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Password</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">pass</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="text"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Please enter your authentication data for server %s</property> - <property name="use_underline">True</property> - <property name="wrap">True</property> - <property name="max_width_chars">56</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - <property name="width">2</property> - <property name="height">1</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="user"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - </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> - <object class="GtkEntry" id="pass"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="visibility">False</property> - </object> - <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> - </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">ok</action-widget> - <action-widget response="0">cancel</action-widget> - </action-widgets> - </object> -</interface> |