contrib/git-credential-gnome-keyring.c: set Gnome application name

Since this is a Gnome application, let's set the application name to something reasonable. This will be displayed in Gnome dialog boxes e.g. the one that prompts for the user's keyring password. We add an include statement for glib.h and add the glib-2.0 cflags and libs to the compilation arguments, but both of these are really noops since glib is already a dependency of gnome-keyring. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed Sep 23, 2013 at 11:49 UTC ff55c47d0f737cd33594e864a0e5a5e1d32fdd13
2 files changed +5 -2
contrib/credential/gnome-keyring/Makefile
+2 -2
@@ -8,8 +8,8 @@ CFLAGS = -g -O2 -Wall
8 -include ../../../config.mak.autogen
9 -include ../../../config.mak
10
11 -INCS:=$(shell pkg-config --cflags gnome-keyring-1)
12 -LIBS:=$(shell pkg-config --libs gnome-keyring-1)
11 +INCS:=$(shell pkg-config --cflags gnome-keyring-1 glib-2.0)
12 +LIBS:=$(shell pkg-config --libs gnome-keyring-1 glib-2.0)
13
14 SRCS:=$(MAIN).c
15 OBJS:=$(SRCS:.c=.o)
contrib/credential/gnome-keyring/git-credential-gnome-keyring.c
+3
@@ -28,6 +28,7 @@
28 #include <stdarg.h>
29 #include <stdlib.h>
30 #include <errno.h>
31 +#include <glib.h>
32 #include <gnome-keyring.h>
33
34 /*
@@ -399,6 +400,8 @@ int main(int argc, char *argv[])
400 exit(EXIT_FAILURE);
401 }
402
403 + g_set_application_name("Git Credential Helper");
404 +
405 /* lookup operation callback */
406 while (try_op->name && strcmp(argv[1], try_op->name))
407 try_op++;