[gparted] Add help dialog when configured with --disable-doc
- From: Curtis Gedak <gedakc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gparted] Add help dialog when configured with --disable-doc
- Date: Sat, 17 Oct 2009 21:46:59 +0000 (UTC)
commit acdddc07702d7029fc1a9cf9ae5e9db353edbcca
Author: Curtis Gedak <gedakc gmail com>
Date: Sat Oct 17 15:43:20 2009 -0600
Add help dialog when configured with --disable-doc
configure.in | 2 ++
src/Win_GParted.cc | 18 ++++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/configure.in b/configure.in
index 10f5cf9..1421f04 100644
--- a/configure.in
+++ b/configure.in
@@ -111,6 +111,8 @@ if test ${enable_doc} = yes; then
else
dnl Do not care if GDU is not found
GNOME_DOC_INIT(,,[:])
+ dnl Set #define NO_DOC 1 to indicate documentation not wanted
+ AC_DEFINE([NO_DOC], [1], [Define to 1 if --disable-doc specified])
fi
AM_CONDITIONAL(DISABLE_DOC, test ${enable_doc} = no)
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index f2e4cc4..f065505 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -1250,7 +1250,25 @@ void Win_GParted::show_help_dialog (const char *link_id /* For context sensitive
void Win_GParted::menu_help_contents()
{
+#ifdef NO_DOC
+ //GParted was configured with --disable-doc
+ Gtk::MessageDialog dialog( *this,
+ _( "Documentation is not available." ),
+ false,
+ Gtk::MESSAGE_INFO,
+ Gtk::BUTTONS_OK,
+ true ) ;
+ Glib::ustring tmp_msg = _( "This build of gparted is configured without documentation." ) ;
+ tmp_msg += "\n" ;
+ tmp_msg += _( "Documentation is available at the project web site." ) ;
+ tmp_msg += "\n" ;
+ tmp_msg += "http://gparted.sourceforge.net" ;
+ dialog .set_secondary_text( tmp_msg ) ;
+ dialog .run() ;
+#else
+ //GParted was configured without --disable-doc
show_help_dialog( NULL);
+#endif
}
void Win_GParted::menu_help_about()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]