ekiga r6482 - in trunk: . src src/endpoints src/gui



Author: dsandras
Date: Tue Jul 22 20:48:51 2008
New Revision: 6482
URL: http://svn.gnome.org/viewvc/ekiga?rev=6482&view=rev

Log:
Added links to recharge/consult/... Ekiga Call Out accounts in the
assistant. Removed deprecated PC2Phone window. The links still need
to be added to the AccountCore OPAL system. Also improved the general
look of the Assistant with a more compact view.


Removed:
   trunk/src/gui/tools.cpp
   trunk/src/gui/tools.h
Modified:
   trunk/ChangeLog
   trunk/src/Makefile.am
   trunk/src/endpoints/ekiga.cpp
   trunk/src/endpoints/ekiga.h
   trunk/src/gui/assistant.cpp
   trunk/src/gui/conf.cpp
   trunk/src/gui/main.cpp

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Tue Jul 22 20:48:51 2008
@@ -71,8 +71,6 @@
 	gui/misc.cpp			\
 	gui/preferences.h		\
 	gui/preferences.cpp		\
-	gui/tools.h			\
-	gui/tools.cpp			\
 	gui/statusicon.h		\
 	gui/statusicon.cpp		\
 	gui/statusmenu.h		\

Modified: trunk/src/endpoints/ekiga.cpp
==============================================================================
--- trunk/src/endpoints/ekiga.cpp	(original)
+++ trunk/src/endpoints/ekiga.cpp	Tue Jul 22 20:48:51 2008
@@ -43,7 +43,6 @@
 #include "preferences.h"
 #include "chat-window.h"
 #include "assistant.h"
-#include "tools.h"
 #include "statusicon.h"
 #include "accounts.h"
 #include "main.h"
@@ -94,10 +93,6 @@
     gtk_widget_destroy (prefs_window);
   prefs_window = NULL;
   
-  if (pc2phone_window)
-    gtk_widget_destroy (pc2phone_window);
-  pc2phone_window = NULL;
-  
   if (main_window)
     gtk_widget_destroy (main_window);
   main_window = NULL;
@@ -245,13 +240,6 @@
 
 
 GtkWidget *
-GnomeMeeting::GetPC2PhoneWindow ()
-{
-  return pc2phone_window;
-}
-
-
-GtkWidget *
 GnomeMeeting::GetAccountsWindow ()
 {
   return accounts_window;
@@ -276,7 +264,6 @@
   
   /* Build the GUI */
   gtk_window_set_default_icon_name (GM_ICON_LOGO);
-  pc2phone_window = gm_pc2phone_window_new (*service_core);
   accounts_window = gm_accounts_window_new (*service_core);
 
   main_window = gm_main_window_new (*service_core);

Modified: trunk/src/endpoints/ekiga.h
==============================================================================
--- trunk/src/endpoints/ekiga.h	(original)
+++ trunk/src/endpoints/ekiga.h	Tue Jul 22 20:48:51 2008
@@ -123,13 +123,6 @@
    * PRE          :  /
    */
   GtkWidget *GetAssistantWindow (bool create = true);
-
-  
-  /* DESCRIPTION  :  /
-   * BEHAVIOR     :  Returns a pointer to the PC-2-Phone window.
-   * PRE          :  /
-   */
-  GtkWidget *GetPC2PhoneWindow ();
   
   
   /* DESCRIPTION  :  /
@@ -200,7 +193,6 @@
   GtkWidget *history_window;
   GtkWidget *assistant_window;
   GtkWidget *prefs_window;
-  GtkWidget *pc2phone_window;
   GtkWidget *accounts_window;
   StatusIcon *statusicon;
 

Modified: trunk/src/gui/assistant.cpp
==============================================================================
--- trunk/src/gui/assistant.cpp	(original)
+++ trunk/src/gui/assistant.cpp	Tue Jul 22 20:48:51 2008
@@ -92,14 +92,13 @@
   std::vector<sigc::connection> connections;
 };
 
-
 /* presenting the network connectoin type to the user */
 enum {
   CNX_LABEL_COLUMN,
   CNX_CODE_COLUMN
 };
 
-
+/**/
 enum {
   SUMMARY_KEY_COLUMN,
   SUMMARY_VALUE_COLUMN
@@ -113,7 +112,7 @@
 {
   GtkWidget *vbox;
 
-  vbox = gtk_vbox_new (FALSE, 6);
+  vbox = gtk_vbox_new (FALSE, 2);
 
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
 
@@ -361,6 +360,102 @@
 
 
 static void
+ekiga_out_new_clicked_cb (G_GNUC_UNUSED GtkWidget *widget,
+                          gpointer data)
+{
+  EkigaAssistant *assistant = NULL;
+
+  const char *account = NULL;
+  const char *password = NULL;
+
+  assistant = EKIGA_ASSISTANT (data);
+
+  account = gtk_entry_get_text (GTK_ENTRY (assistant->priv->dusername));
+  password = gtk_entry_get_text (GTK_ENTRY (assistant->priv->dpassword));
+
+  if (account == NULL || password == NULL)
+    return; /* no account configured yet */
+  
+  gm_open_uri ("https://www.diamondcard.us/exec/voip-login?act=sgn&spo=ekiga";);
+}
+
+
+static void
+ekiga_out_recharge_clicked_cb (G_GNUC_UNUSED GtkWidget *widget,
+                               gpointer data)
+{
+  EkigaAssistant *assistant = NULL;
+
+  const char *account = NULL;
+  const char *password = NULL;
+
+  gchar *url = NULL;
+
+  assistant = EKIGA_ASSISTANT (data);
+
+  account = gtk_entry_get_text (GTK_ENTRY (assistant->priv->dusername));
+  password = gtk_entry_get_text (GTK_ENTRY (assistant->priv->dpassword));
+
+  if (account == NULL || password == NULL)
+    return; /* no account configured yet */
+  
+  url = g_strdup_printf ("https://www.diamondcard.us/exec/voip-login?accId=%s&pinCode=%s&act=rch&spo=ekiga";, account, password);
+  gm_open_uri (url);
+  g_free (url);
+}
+
+
+static void
+ekiga_out_history_balance_clicked_cb (G_GNUC_UNUSED GtkWidget *widget,
+                                      gpointer data)
+{
+  EkigaAssistant *assistant = NULL;
+
+  const char *account = NULL;
+  const char *password = NULL;
+
+  gchar *url = NULL;
+
+  assistant = EKIGA_ASSISTANT (data);
+
+  account = gtk_entry_get_text (GTK_ENTRY (assistant->priv->dusername));
+  password = gtk_entry_get_text (GTK_ENTRY (assistant->priv->dpassword));
+
+  if (account == NULL || password == NULL)
+    return; /* no account configured yet */
+  
+  url = g_strdup_printf ("https://www.diamondcard.us/exec/voip-login?accId=%s&pinCode=%s&act=bh&spo=ekiga";, account, password);
+  gm_open_uri (url);
+  g_free (url);
+}
+
+
+static void
+ekiga_out_history_calls_clicked_cb (G_GNUC_UNUSED GtkWidget *widget,
+                                    gpointer data)
+{
+  EkigaAssistant *assistant = NULL;
+
+  const char *account = NULL;
+  const char *password = NULL;
+
+  gchar *url = NULL;
+
+  assistant = EKIGA_ASSISTANT (data);
+
+  account = gtk_entry_get_text (GTK_ENTRY (assistant->priv->dusername));
+  password = gtk_entry_get_text (GTK_ENTRY (assistant->priv->dpassword));
+
+  if (account == NULL || password == NULL)
+    return; /* no account configured yet */
+  
+  url = g_strdup_printf ("https://www.diamondcard.us/exec/voip-login?accId=%s&pinCode=%s&act=ch&spo=ekiga";, account, password);
+  gm_open_uri (url);
+  g_free (url);
+}
+
+
+static void
 ekiga_net_info_changed_cb (G_GNUC_UNUSED GtkWidget *w,
                            EkigaAssistant *assistant)
 {
@@ -539,10 +634,11 @@
   gtk_box_pack_start (GTK_BOX (vbox), assistant->priv->dpassword, FALSE, FALSE, 0);
 
   label = gtk_label_new (NULL);
-  text = g_strdup (_("You can make calls to regular phones and cell numbers worldwide using Ekiga. "
-                     "To enable this, you need to do three things. First create an account at the URL below. "
-                     "Then enter your account ID and PIN code. Finally, activate the registration below.\n\n"
-                     "The service will work only if your account is created using the URL in this dialog."));
+  text = g_strdup_printf ("<i>%s</i>",
+                          _("You can make calls to regular phones and cell numbers worldwide using Ekiga. "
+                            "To enable this, you need to do three things. First create an account at the URL below. "
+                            "Then enter your account ID and PIN code. Finally, activate the registration below.\n\n"
+                            "The service will work only if your account is created using the URL in this dialog."));
   gtk_label_set_markup (GTK_LABEL (label), text);
   g_free (text);
   gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
@@ -552,14 +648,50 @@
   button = gtk_button_new ();
   label = gtk_label_new (NULL);
   text = g_strdup_printf ("<span foreground=\"blue\"><u>%s</u></span>",
-                          _("Get an Ekiga Call Out account //FIXME"));
+                          _("Get an Ekiga Call Out account"));
   gtk_label_set_markup (GTK_LABEL (label), text);
   g_free (text);
   gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
   gtk_container_add (GTK_CONTAINER (button), label);
-  gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (button), FALSE, FALSE, 10);
+  gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (button), FALSE, FALSE, 0);
   g_signal_connect (button, "clicked",
-                    G_CALLBACK (ekiga_net_button_clicked_cb), NULL);
+                    G_CALLBACK (ekiga_out_new_clicked_cb), assistant);
+
+  button = gtk_button_new ();
+  label = gtk_label_new (NULL);
+  text = g_strdup_printf ("<span foreground=\"blue\"><u>%s</u></span>",
+			 _("Recharge the account"));
+  gtk_label_set_markup (GTK_LABEL (label), text);
+  g_free (text);
+  gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+  gtk_container_add (GTK_CONTAINER (button), label);
+  gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (button), FALSE, FALSE, 0);
+  g_signal_connect (button, "clicked",
+                    G_CALLBACK (ekiga_out_recharge_clicked_cb), assistant);
+
+  button = gtk_button_new ();
+  label = gtk_label_new (NULL);
+  text = g_strdup_printf ("<span foreground=\"blue\"><u>%s</u></span>",
+			 _("Consult the balance history"));
+  gtk_label_set_markup (GTK_LABEL (label), text);
+  g_free (text);
+  gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+  gtk_container_add (GTK_CONTAINER (button), label);
+  gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (button), FALSE, FALSE, 0);
+  g_signal_connect (button, "clicked",
+                    G_CALLBACK (ekiga_out_history_balance_clicked_cb), assistant);
+
+  button = gtk_button_new ();
+  label = gtk_label_new (NULL);
+  text = g_strdup_printf ("<span foreground=\"blue\"><u>%s</u></span>",
+			 _("Consult the calls history"));
+  gtk_label_set_markup (GTK_LABEL (label), text);
+  g_free (text);
+  gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+  gtk_container_add (GTK_CONTAINER (button), label);
+  gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (button), FALSE, FALSE, 0);
+  g_signal_connect (button, "clicked",
+                    G_CALLBACK (ekiga_out_history_calls_clicked_cb), assistant);
 
   assistant->priv->skip_ekiga_out = gtk_check_button_new ();
   label = gtk_label_new (_("I do not want to sign up for the Ekiga Call Out service"));

Modified: trunk/src/gui/conf.cpp
==============================================================================
--- trunk/src/gui/conf.cpp	(original)
+++ trunk/src/gui/conf.cpp	Tue Jul 22 20:48:51 2008
@@ -55,7 +55,6 @@
 #include "accounts.h"
 #include "main.h"
 #include "misc.h"
-#include "tools.h"
 
 #include "gmdialog.h"
 #include "gmstockicons.h"

Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp	(original)
+++ trunk/src/gui/main.cpp	Tue Jul 22 20:48:51 2008
@@ -1516,7 +1516,6 @@
   
   GtkWidget *addressbook_window = NULL;
   GtkWidget *accounts_window = NULL;
-  GtkWidget *pc2phone_window = NULL;
 
   bool show_call_panel = false;
   
@@ -1530,7 +1529,6 @@
   gtk_frontend = dynamic_cast<GtkFrontend *>(services->get ("gtk-frontend"));
   addressbook_window = GTK_WIDGET (gtk_frontend->get_addressbook_window ()); 
   accounts_window = GnomeMeeting::Process ()->GetAccountsWindow ();
-  pc2phone_window = GnomeMeeting::Process ()->GetPC2PhoneWindow ();
 
   mw->main_menu = gtk_menu_bar_new ();
 
@@ -1696,14 +1694,6 @@
 			   GTK_SIGNAL_FUNC (show_widget_cb),
 			   (gpointer) addressbook_window, TRUE),
       
-      GTK_MENU_SEPARATOR,
-
-      GTK_MENU_ENTRY("pc-to-phone", _("PC-To-Phone Account"),
-		     _("Manage your PC-To-Phone account"),
-		     NULL, 0, 
-		     GTK_SIGNAL_FUNC (show_window_cb),
-		     (gpointer) pc2phone_window, TRUE),
-      
       GTK_MENU_NEW(_("_Help")),
 
       GTK_MENU_ENTRY("help", NULL, 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]