[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source svtools/uiconfig
Szymon Kłos
eszkadev at gmail.com
Tue May 26 09:13:05 PDT 2015
svtools/source/dialogs/RemoteFilesDialog.cxx | 22 ++++++++++++++++++++++
svtools/uiconfig/ui/remotefilesdialog.ui | 8 ++++++++
2 files changed, 30 insertions(+)
New commits:
commit 1bf41094aba59770ee12d9bdcd0dba79ac89f717
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Tue May 26 18:11:41 2015 +0200
added the delete service option
Change-Id: I81ddfbf3e0d856b3263d005d283279ebb58f1ffc
diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx
index d43578c..60063d9 100644
--- a/svtools/source/dialogs/RemoteFilesDialog.cxx
+++ b/svtools/source/dialogs/RemoteFilesDialog.cxx
@@ -170,6 +170,28 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
break;
};
}
+ else if(sIdent == "delete_service" && m_pServices_lb->GetEntryCount() > 0)
+ {
+ unsigned int nSelected = m_pServices_lb->GetSelectEntryPos();
+ unsigned int nPos = GetSelectedServicePos();
+
+ // TODO: Confirm dialog
+
+ m_aServices.erase(m_aServices.begin() + nPos);
+ m_pServices_lb->RemoveEntry(nSelected);
+
+ if(m_pServices_lb->GetEntryCount() > 0)
+ {
+ m_pServices_lb->SelectEntryPos(0);
+ }
+ else
+ {
+ m_pServices_lb->SetNoSelection();
+ m_pServices_lb->Enable(false);
+ }
+
+ m_bIsUpdated = true;
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/uiconfig/ui/remotefilesdialog.ui b/svtools/uiconfig/ui/remotefilesdialog.ui
index c01ef56..894ce8e 100644
--- a/svtools/uiconfig/ui/remotefilesdialog.ui
+++ b/svtools/uiconfig/ui/remotefilesdialog.ui
@@ -139,5 +139,13 @@
<property name="use_underline">True</property>
</object>
</child>
+ <child>
+ <object class="GtkMenuItem" id="delete_service">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Delete service</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
</object>
</interface>
More information about the Libreoffice-commits
mailing list