[Libguestfs] [PATCH 1/2] p2v: move the license text to gui.c

Pino Toscano ptoscano at redhat.com
Thu Mar 30 11:37:50 UTC 2017


It is used only for the about dialog, and this way it will be easier
to disable.
---
 p2v/Makefile.am     |  1 -
 p2v/about-license.c | 38 --------------------------------------
 p2v/gui.c           | 16 ++++++++++++++++
 p2v/p2v.h           |  3 ---
 4 files changed, 16 insertions(+), 42 deletions(-)
 delete mode 100644 p2v/about-license.c

diff --git a/p2v/Makefile.am b/p2v/Makefile.am
index 3526d7a..c78f4ab 100644
--- a/p2v/Makefile.am
+++ b/p2v/Makefile.am
@@ -78,7 +78,6 @@ noinst_PROGRAMS = virt-p2v
 
 virt_p2v_SOURCES = \
 	about-authors.c \
-	about-license.c \
 	config.c \
 	conversion.c \
 	cpuid.c \
diff --git a/p2v/about-license.c b/p2v/about-license.c
deleted file mode 100644
index 70d7b77..0000000
--- a/p2v/about-license.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* virt-p2v
- * Copyright (C) 2009-2017 Red Hat Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <config.h>
-
-#include "p2v.h"
-
-/* The license of virt-p2v, for the About dialog. */
-
-const char *gplv2plus =
-  "This program is free software; you can redistribute it and/or modify\n"
-  "it under the terms of the GNU General Public License as published by\n"
-  "the Free Software Foundation; either version 2 of the License, or\n"
-  "(at your option) any later version.\n"
-  "\n"
-  "This program is distributed in the hope that it will be useful,\n"
-  "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
-  "GNU General Public License for more details.\n"
-  "\n"
-  "You should have received a copy of the GNU General Public License\n"
-  "along with this program; if not, write to the Free Software\n"
-  "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n";
diff --git a/p2v/gui.c b/p2v/gui.c
index 82c2402..563e1a7 100644
--- a/p2v/gui.c
+++ b/p2v/gui.c
@@ -134,6 +134,22 @@ static GtkWidget *run_dlg,
 /* Colour tags used in the v2v_output GtkTextBuffer. */
 static GtkTextTag *v2v_output_tags[16];
 
+/* The license of virt-p2v, for the About dialog. */
+static const char gplv2plus[] =
+  "This program is free software; you can redistribute it and/or modify\n"
+  "it under the terms of the GNU General Public License as published by\n"
+  "the Free Software Foundation; either version 2 of the License, or\n"
+  "(at your option) any later version.\n"
+  "\n"
+  "This program is distributed in the hope that it will be useful,\n"
+  "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
+  "GNU General Public License for more details.\n"
+  "\n"
+  "You should have received a copy of the GNU General Public License\n"
+  "along with this program; if not, write to the Free Software\n"
+  "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n";
+
 /**
  * The entry point from the main program.
  *
diff --git a/p2v/p2v.h b/p2v/p2v.h
index bd4b484..4a47e9f 100644
--- a/p2v/p2v.h
+++ b/p2v/p2v.h
@@ -194,7 +194,4 @@ extern const char *qa[];
 extern const char *documenters[];
 extern const char *others[];
 
-/* about-license.c */
-extern const char *gplv2plus;
-
 #endif /* P2V_H */
-- 
2.9.3




More information about the Libguestfs mailing list