Merge branch 'master' into otr

Conflicts:
	.gitignore
	Makefile.am
This commit is contained in:
James Booth
2013-09-17 01:34:57 +01:00
9 changed files with 117 additions and 33 deletions

View File

@@ -19,10 +19,13 @@
* along with Profanity. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <string.h>
#include <glib.h>
#include "config.h"
#ifdef HAVE_GIT_VERSION
#include "gitversion.c"
#endif
#include "profanity.h"
@@ -55,7 +58,17 @@ main(int argc, char **argv)
g_option_context_free(context);
if (version == TRUE) {
g_print("Profanity, version %s\n", PACKAGE_VERSION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
g_print("Profanity, version %sdev.%s.%s\n", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
#else
g_print("Profanity, version %sdev\n", PACKAGE_VERSION);
#endif
} else {
g_print("Profanity, version %s\n", PACKAGE_VERSION);
}
g_print("Copyright (C) 2012, 2013 James Booth <%s>.\n", PACKAGE_BUGREPORT);
g_print("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
g_print("\n");

View File

@@ -21,6 +21,10 @@
*/
#include "config.h"
#ifdef HAVE_GIT_VERSION
#include "gitversion.c"
#endif
#include <locale.h>
#include <signal.h>
#include <stdlib.h>
@@ -618,7 +622,11 @@ _init(const int disable_tls, char *log_level)
log_level_t prof_log_level = log_level_from_string(log_level);
log_init(prof_log_level);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
log_info("Starting Profanity (%sdev)...", PACKAGE_VERSION);
#ifdef HAVE_GIT_VERSION
log_info("Starting Profanity (%sdev.%s.%s)...", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
#else
log_info("Starting Profanity (%sdev)...", PACKAGE_VERSION);
#endif
} else {
log_info("Starting Profanity (%s)...", PACKAGE_VERSION);
}

View File

@@ -40,6 +40,10 @@
#include "xmpp/xmpp.h"
#include "xmpp/bookmark.h"
#ifdef HAVE_GIT_VERSION
#include "gitversion.c"
#endif
static void _cons_splash_logo(void);
void _show_roster_contacts(GSList *list, gboolean show_groups);
@@ -167,7 +171,11 @@ cons_about(void)
win_print_time(console, '-');
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
wprintw(console->win, "Welcome to Profanity, version %sdev.%s.%s\n", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
#else
wprintw(console->win, "Welcome to Profanity, version %sdev\n", PACKAGE_VERSION);
#endif
} else {
wprintw(console->win, "Welcome to Profanity, version %s\n", PACKAGE_VERSION);
}
@@ -1395,7 +1403,11 @@ _cons_splash_logo(void)
wprintw(console->win, "\n");
win_print_time(console, '-');
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
wprintw(console->win, "Version %sdev.%s.%s\n", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
#else
wprintw(console->win, "Version %sdev\n", PACKAGE_VERSION);
#endif
} else {
wprintw(console->win, "Version %s\n", PACKAGE_VERSION);
}

View File

@@ -22,6 +22,10 @@
#include "config.h"
#ifdef HAVE_GIT_VERSION
#include "gitversion.c"
#endif
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_LIBXSS
@@ -1375,7 +1379,14 @@ _ui_draw_win_title(void)
g_string_append(version_str, " ");
g_string_append(version_str, PACKAGE_VERSION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
g_string_append(version_str, "dev.");
g_string_append(version_str, PROF_GIT_BRANCH);
g_string_append(version_str, ".");
g_string_append(version_str, PROF_GIT_REVISION);
#else
g_string_append(version_str, "dev");
#endif
}
}

View File

@@ -22,6 +22,10 @@
#include "config.h"
#ifdef HAVE_GIT_VERSION
#include "gitversion.c"
#endif
#include <stdlib.h>
#include <string.h>
@@ -238,7 +242,14 @@ caps_create_query_response_stanza(xmpp_ctx_t * const ctx)
GString *name_str = g_string_new("Profanity ");
g_string_append(name_str, PACKAGE_VERSION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
g_string_append(name_str, "dev.");
g_string_append(name_str, PROF_GIT_BRANCH);
g_string_append(name_str, ".");
g_string_append(name_str, PROF_GIT_REVISION);
#else
g_string_append(name_str, "dev");
#endif
}
xmpp_stanza_set_attribute(identity, "name", name_str->str);

View File

@@ -22,6 +22,10 @@
#include "config.h"
#ifdef HAVE_GIT_VERSION
#include "gitversion.c"
#endif
#include <stdlib.h>
#include <string.h>
@@ -236,7 +240,14 @@ _iq_handle_version_get(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
xmpp_stanza_t *version_txt = xmpp_stanza_new(ctx);
GString *version_str = g_string_new(PACKAGE_VERSION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
g_string_append(version_str, "dev.");
g_string_append(version_str, PROF_GIT_BRANCH);
g_string_append(version_str, ".");
g_string_append(version_str, PROF_GIT_REVISION);
#else
g_string_append(version_str, "dev");
#endif
}
xmpp_stanza_set_text(version_txt, version_str->str);
xmpp_stanza_add_child(version, version_txt);