[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33491 - gnunet-gtk/src/conversation
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33491 - gnunet-gtk/src/conversation |
Date: |
Tue, 3 Jun 2014 11:19:43 +0200 |
Author: grothoff
Date: 2014-06-03 11:19:43 +0200 (Tue, 03 Jun 2014)
New Revision: 33491
Modified:
gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
gnunet-gtk/src/conversation/gnunet-conversation-gtk_phone.c
Log:
-fix setting phone line from command line
Modified: gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
===================================================================
--- gnunet-gtk/src/conversation/gnunet-conversation-gtk.c 2014-06-03
09:09:50 UTC (rev 33490)
+++ gnunet-gtk/src/conversation/gnunet-conversation-gtk.c 2014-06-03
09:19:43 UTC (rev 33491)
@@ -111,7 +111,7 @@
const struct GNUNET_CONFIGURATION_Handle *
GCG_get_configuration ()
{
- return GNUNET_GTK_main_loop_get_configuration (ml);
+ return cfg;
}
@@ -166,6 +166,12 @@
ml = cls;
if (GNUNET_OK != GNUNET_GTK_main_loop_build_window (ml, NULL))
return;
+ cfg = GNUNET_CONFIGURATION_dup (GNUNET_GTK_main_loop_get_configuration (ml));
+ if (0 != line)
+ GNUNET_CONFIGURATION_set_value_number (cfg,
+ "CONVERSATION",
+ "LINE",
+ line);
GNUNET_GTK_set_icon_search_path ();
GNUNET_GTK_setup_nls ();
/* setup main window */
@@ -188,12 +194,6 @@
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
&shutdown_task,
NULL);
- cfg = GNUNET_CONFIGURATION_dup (GCG_get_configuration ());
- if (0 != line)
- GNUNET_CONFIGURATION_set_value_number (cfg,
- "CONVERSATION",
- "LINE",
- line);
if (NULL == ego_name)
ego_name = GNUNET_strdup ("phone-ego");
GCG_HISTORY_init ();
Modified: gnunet-gtk/src/conversation/gnunet-conversation-gtk_phone.c
===================================================================
--- gnunet-gtk/src/conversation/gnunet-conversation-gtk_phone.c 2014-06-03
09:09:50 UTC (rev 33490)
+++ gnunet-gtk/src/conversation/gnunet-conversation-gtk_phone.c 2014-06-03
09:19:43 UTC (rev 33491)
@@ -389,7 +389,7 @@
case OUT_STATE_RESOLVING:
return _("resolving");
case OUT_STATE_RINGING:
- return _("ringing");
+ return _("calling");
case OUT_STATE_CONNECTED:
return _("connected");
case OUT_STATE_SUSPENDED_LOCAL:
@@ -528,7 +528,7 @@
GCG_set_status_icon ("gnunet-conversation-gtk-tray-call-pending");
break;
case OUT_STATE_RINGING:
- GCG_update_status_bar (_("Ringing `%s'."),
+ GCG_update_status_bar (_("Calling `%s'."),
active_out->caller_id);
GCG_set_status_icon ("gnunet-conversation-gtk-tray-call-ringing");
break;
@@ -1707,6 +1707,8 @@
gpointer user_data)
{
struct GNUNET_IDENTITY_Ego *caller_id;
+ const struct GNUNET_CONFIGURATION_Handle *cfg;
+ unsigned long long line;
if (NULL != phone)
{
@@ -1721,8 +1723,22 @@
check_call_sensitivity ();
return;
}
+ cfg = GCG_get_configuration ();
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_number (cfg,
+ "CONVERSATION",
+ "LINE",
+ &line))
+ {
+ GCG_log (_("No phone line specified in configuration!\n"));
+ do_status ();
+ check_call_sensitivity ();
+ return;
+ }
+ GCG_log (_("Initializing phone on line %llu\n"),
+ line);
phone =
- GNUNET_CONVERSATION_phone_create (GCG_get_configuration (),
+ GNUNET_CONVERSATION_phone_create (cfg,
caller_id,
&phone_event_handler,
NULL);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33491 - gnunet-gtk/src/conversation,
gnunet <=