Don't open the default display while parsing command line

Since commit a9ce19f it has not been possible to check app version from
a tty without X session running. The issue is that gtk_get_option_group
function opens the default display if passed TRUE as argument.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
Eduardo Lima (Etrunko) 2016-02-26 17:04:46 -03:00 committed by Fabiano Fidêncio
parent 0e0df372cf
commit d18bbc6f5b

View File

@ -1920,7 +1920,7 @@ virt_viewer_app_local_command_line (GApplication *gapp,
g_option_context_set_main_group(context, group);
VIRT_VIEWER_APP_GET_CLASS(self)->add_option_entries(self, context, group);
g_option_context_add_group(context, gtk_get_option_group(TRUE));
g_option_context_add_group(context, gtk_get_option_group(FALSE));
#ifdef HAVE_GTK_VNC
g_option_context_add_group(context, vnc_display_get_option_group());