[gnome-commander] Makes libunique optional



commit 1ef3f8412eb0646c3210fb475e52cbcc511d981f
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Wed Mar 1 20:49:59 2017 +0100

    Makes libunique optional

 README                                  |  154 ++++++++++++++++++++++++++++++-
 configure.ac                            |   25 ++++--
 src/dialogs/gnome-cmd-options-dialog.cc |    3 +-
 src/main.cc                             |   17 +++-
 4 files changed, 189 insertions(+), 10 deletions(-)
---
diff --git a/README b/README
index e9f9721..56da0eb 100644
--- a/README
+++ b/README
@@ -1 +1,153 @@
-Generated from README.in
+                GNOME Commander Version 1.7.0
+
+                Copyright (C) 2001-2006 Marcus Bjurman <marbj499 student liu se>
+                Copyright (C) 2007-2012 Piotr Eljasiak <epiotr use pl>
+                Copyright (C) 2013-2017 Uwe Scholz <u scholz83 gmx de>
+                http://gcmd.github.io/
+
+
+Topics:
+---------------------
+1. Introduction
+2. Contributing
+3. Building
+4. Communication
+5. Problem reporting
+
+
+
+1. Introduction
+--------------------------------
+
+GNOME Commander is a fast and powerful twin-panel file manager for the GNOME desktop.
+
+Read the section "Known Bugs and Limitations" in the documentation (by pressing F1)
+to see if there are some known problems with the version you are using. The TODO file 
+might also contain some clues when running into problems.
+
+The ChangeLog contains a detailed description on what has changed. For most
+users the NEWS file might be a better place to look since it contains
+change summaries between the different versions.
+
+GNOME Commander is released under the GNU General Public License (GPL) version 2,
+see the file 'COPYING' for more information.
+
+The official web site is:
+
+    http://gcmd.github.io/
+
+You can download the latest GNOME Commander tarball from the gnome ftp server:
+
+    http://ftp.gnome.org/pub/GNOME/sources/gnome-commander/
+
+
+
+2. Contributing
+--------------------------------
+
+Ideas:
+  If have some good ideas for stuff that you want to see in this program you
+  should check the TODO file first before sending email. After that you're
+  welcome to start a discussion on the mailing lists.
+
+Translations:
+  * This program is in the GNOME git repository, translations should be
+    commited directly to the tree there.
+
+Cool hacks:
+  * Send an email with the patch to the developers mailing list.
+  * Please use the -u flag when generating the patch as it makes the patch
+    more readable.
+  * Write a good explanation of what the patch does.
+
+Plugins:
+  * If you have created a new plugin let us know about it on the mailing list.
+
+
+
+3. Building
+--------------------------------
+
+GNOME Commander requires glib >= 2.44.0, GTK+ >= 2.8.0, gnome >= 2.4.0, 
+gnome-keyring >= 2.22 and unique >= 0.9.3 libraries.
+
+Additionally GNOME Commander may require:
+
+  * gnome-vfs >= 2.0.0
+    Used for most of the file handling. If gnome-vfs is built to use fam
+    gnome-commander makes use of that functionality by being able to update
+    its visible directories even when files are create/deleted or changed by
+    other programs.
+
+  * python >= 2.5
+    Optional - for python plugins support.
+
+  * exiv2 >= 0.14
+    Optional - for Exif and IPTC support.
+
+  * taglib >= 1.4
+    Optional - for ID3, Vorbis, FLAC and APE support.
+
+  * libgsf >= 1.12.0
+    Optional - for OLE and ODF support.
+
+  * poppler >= 0.18
+    Optional - for PDF support.
+
+
+Simple install procedure:
+
+  % tar -xf gnome-commander-1.7.0.tar.xz       # unpack the sources
+  % cd gnome-commander-1.7.0                   # change to the toplevel directory
+  % ./configure                                        # run the `configure' script
+  % make                                       # build GNOME Commander
+  [ Become root if necessary ]
+  % make install                               # install GNOME Commander
+
+See the file 'INSTALL' for more detailed information.
+
+
+4. Communication
+--------------------------------
+
+This project has two mailing lists, one for users and one for developers.
+Subscription to those mailing lists can be done at:
+
+users: https://lists.nongnu.org/mailman/listinfo/gcmd-users
+devel: https://lists.nongnu.org/mailman/listinfo/gcmd-devel
+
+You can also find email addresses of the people who have created gnome-commander
+in the AUTHORS file.
+
+
+5. Problem reporting
+--------------------------------
+
+Bugs should be reported to the GNOME bug tracking system
+(http://bugzilla.gnome.org, product gnome-commander). You will need to create an
+account for yourself.
+
+You can also report bugs using the GNOME program bug-buddy.
+
+In the bug report please include:
+
+* Information about your system. For instance:
+
+   - What operating system and version
+   - What version of X
+   - What version of the gtk+, glib and gnome libraries
+   - For Linux, what version of the C library
+
+  And anything else you think is relevant.
+
+* How to reproduce the bug.
+
+* If the bug was a crash, the exact text that was printed out when the
+  crash occurred.
+
+* Further information such as stack traces may be useful, but is not
+  necessary. If you do send a stack trace, and the error is an X error,
+  it will be more useful if the stack trace is produced running the test
+  program with the --sync command line option.
+
+See the file 'BUGS' for the list of known bugs.
diff --git a/configure.ac b/configure.ac
index 6581cc6..d97fb85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,7 +95,17 @@ dnl Check for gnome-keyring
 PKG_CHECK_MODULES(GNOME_KEYRING, [gnome-keyring-1 >= ${GNOME_KEYRING_REQ}])
 
 dnl Check for libUnique
-PKG_CHECK_MODULES(UNIQUE, [unique-1.0 >= ${UNIQUE_REQ}])
+AC_ARG_WITH([unique], AS_HELP_STRING([--without-unique], [disable unique support]))
+AS_IF([test "x$with_unique" != "xno"],
+   [
+      PKG_CHECK_MODULES([UNIQUE], [unique-1.0 >= ${UNIQUE_REQ}], have_unique=yes, have_unique=no)
+   ],
+   [test "x$with_unique" = "xno"], [have_unique=no])
+if test "x$have_unique" = "xyes"; then
+   AC_DEFINE(HAVE_UNIQUE, 1, [Define to 1 if you have unique support])
+else
+   AC_MSG_WARN([unique >= ${UNIQUE_REQ} not found, disabling unique support])
+fi
 
 dnl Check for samba support
 AC_ARG_WITH(samba, [AS_HELP_STRING([--without-samba], [disable SAMBA support])])
@@ -357,14 +367,15 @@ echo "=========================================="
 echo ""
 echo "The following settings will be used:"
 echo ""
-echo "  host           : ${host}"
-echo "  prefix         : ${prefix}"
-echo "  compiler       : ${CC}"
-echo "  CFLAGS         : ${CFLAGS}"
-echo "  LDFLAGS        : ${LDFLAGS}"
+echo "  host             : ${host}"
+echo "  prefix           : ${prefix}"
+echo "  compiler         : ${CC}"
+echo "  CFLAGS           : ${CFLAGS}"
+echo "  LDFLAGS          : ${LDFLAGS}"
 echo ""
+echo "  libunique support:      ${have_unique}"
 echo "  Python plugins support: ${enable_python}"
-echo "  Samba support  : ${have_samba}"
+echo "  Samba support:          ${have_samba}"
 echo ""
 echo "Optional file metadata support:"
 echo ""
diff --git a/src/dialogs/gnome-cmd-options-dialog.cc b/src/dialogs/gnome-cmd-options-dialog.cc
index 2b8837a..d417f15 100644
--- a/src/dialogs/gnome-cmd-options-dialog.cc
+++ b/src/dialogs/gnome-cmd-options-dialog.cc
@@ -181,6 +181,7 @@ inline GtkWidget *create_general_tab (GtkWidget *parent, GnomeCmdData::Options &
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), cfg.quick_search_exact_match_end);
 
 
+#ifdef HAVE_UNIQUE
     // Multiple instances
     cat_box = create_vbox (parent, FALSE, 0);
     cat = create_category (parent, cat_box, _("Multiple instances"));
@@ -189,7 +190,7 @@ inline GtkWidget *create_general_tab (GtkWidget *parent, GnomeCmdData::Options &
     check = create_check (parent, _("Don't start a new instance"), "multiple_instance_check");
     gtk_box_pack_start (GTK_BOX (cat_box), check, FALSE, TRUE, 0);
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), !cfg.allow_multiple_instances);
-
+#endif
 
     // Save on exit
     cat_box = create_vbox (parent, FALSE, 0);
diff --git a/src/main.cc b/src/main.cc
index 675faa6..3b53141 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -27,7 +27,9 @@ extern "C"
 #include <config.h>
 #include <glib/gi18n.h>
 #include <locale.h>
+#ifdef HAVE_UNIQUE
 #include <unique/unique.h>
+#endif
 #include <libgnomeui/gnome-ui-init.h>
 
 #include "gnome-cmd-includes.h"
@@ -70,6 +72,7 @@ static const GOptionEntry options [] =
 };
 
 
+#ifdef HAVE_UNIQUE
 static UniqueResponse on_message_received (UniqueApp *app, UniqueCommand cmd, UniqueMessageData *msg, guint 
t, gpointer  user_data)
 {
     switch (cmd)
@@ -86,13 +89,16 @@ static UniqueResponse on_message_received (UniqueApp *app, UniqueCommand cmd, Un
 
     return UNIQUE_RESPONSE_OK;
 }
+#endif
 
 
 int main (int argc, char *argv[])
 {
     GnomeProgram *program;
     GOptionContext *option_context;
+#ifdef HAVE_UNIQUE
     UniqueApp *app;
+#endif
 
     main_win = NULL;
 
@@ -138,12 +144,16 @@ int main (int argc, char *argv[])
     gnome_cmd_data.migrate_all_data_to_gsettings();
     gnome_cmd_data.load();
 
+#ifdef HAVE_UNIQUE
     app = unique_app_new ("org.gnome.GnomeCommander", NULL);
+#endif
 
+#ifdef HAVE_UNIQUE
     if (!gnome_cmd_data.options.allow_multiple_instances && unique_app_is_running (app))
         unique_app_send_message (app, UNIQUE_ACTIVATE, NULL);
     else
     {
+#endif
         if (start_dir_left)
             
gnome_cmd_data.tabs[LEFT].push_back(make_pair(string(start_dir_left),make_triple(GnomeCmdFileList::COLUMN_NAME,GTK_SORT_ASCENDING,FALSE)));
 
@@ -160,9 +170,10 @@ int main (int argc, char *argv[])
 
         main_win = new GnomeCmdMainWin;
         main_win_widget = *main_win;
-
+#ifdef HAVE_UNIQUE
         unique_app_watch_window (app, *main_win);
         g_signal_connect (app, "message-received", G_CALLBACK (on_message_received), NULL);
+#endif
 
         gtk_widget_show (*main_win);
         gcmd_owner.load_async();
@@ -185,11 +196,15 @@ int main (int argc, char *argv[])
         IMAGE_free ();
 
         remove_temp_download_dir ();
+#ifdef HAVE_UNIQUE
     }
+#endif
 
     gnome_vfs_shutdown ();
 
+#ifdef HAVE_UNIQUE
     g_object_unref (app);
+#endif
     g_object_unref (program);
     g_free (debug_flags);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]