[ekiga/ds-fix-boost-leaks] Ekiga: Removed the ability to set the Full Name.



commit 89cbfd837eab3b16afdcc3e9a261f8d37357afa5
Author: Damien Sandras <dsandras seconix com>
Date:   Tue Oct 13 20:07:51 2015 +0200

    Ekiga: Removed the ability to set the Full Name.
    
    It is defined on the system. We are now using the user system full name
    on all platforms.

 ekiga.convert.in                                   |    1 -
 .../gmconf-personal-details.cpp                    |   14 +---
 lib/engine/components/opal/opal-call-manager.cpp   |    5 +-
 lib/engine/gui/gtk-frontend/assistant-window.cpp   |   76 --------------------
 lib/engine/gui/gtk-frontend/preferences-window.cpp |   10 ---
 org.gnome.ekiga.gschema.xml.in.in                  |    5 --
 6 files changed, 6 insertions(+), 105 deletions(-)
---
diff --git a/ekiga.convert.in b/ekiga.convert.in
index cde66dc..58fdb9f 100644
--- a/ekiga.convert.in
+++ b/ekiga.convert.in
@@ -9,7 +9,6 @@ format = /apps/@PACKAGE_NAME@/devices/video/format
 enable-preview = /apps/@PACKAGE_NAME@/devices/video/enable_preview
 
 [org gnome  PACKAGE_NAME@.general.personal-data]
-full-name = /apps/@PACKAGE_NAME@/general/personal_data/full_name
 short-status = /apps/@PACKAGE_NAME@/general/personal_data/short_status
 long-status = /apps/@PACKAGE_NAME@/general/personal_data/long_status
 away-custom-status = /apps/@PACKAGE_NAME@/general/personal_data/away_custom_status
diff --git a/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp 
b/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp
index bdaca44..57a4601 100644
--- a/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp
+++ b/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp
@@ -39,6 +39,7 @@ Gmconf::PersonalDetails::PersonalDetails ()
 {
   personal_details = new Ekiga::Settings (PERSONAL_DATA_SCHEMA);
   personal_details->changed.connect (boost::bind (&PersonalDetails::setup, this, _1));
+  display_name = g_get_real_name ();
 
   setup ();
 }
@@ -52,13 +53,6 @@ void
 Gmconf::PersonalDetails::setup (std::string setting)
 {
   std::string value;
-  if (setting.empty () || setting == "full-name")  {
-    value = personal_details->get_string ("full-name");
-    if (value != display_name) {
-      display_name = value;
-      updated ();
-    }
-  }
   if (setting.empty () || setting == "short-status")  {
     value = personal_details->get_string ("short-status");
     if (value != presence) {
@@ -66,7 +60,7 @@ Gmconf::PersonalDetails::setup (std::string setting)
       updated ();
     }
   }
-  if (setting.empty () || setting == "full-name")  {
+  if (setting.empty () || setting == "long-status")  {
     value = personal_details->get_string ("long-status");
     if (value != status) {
       status = value;
@@ -94,9 +88,9 @@ Gmconf::PersonalDetails::get_status () const
 }
 
 void
-Gmconf::PersonalDetails::set_display_name (const std::string display_name_)
+Gmconf::PersonalDetails::set_display_name (G_GNUC_UNUSED const std::string display_name_)
 {
-  personal_details->set_string ("full-name", display_name_);
+  // Ignored
 }
 
 void
diff --git a/lib/engine/components/opal/opal-call-manager.cpp 
b/lib/engine/components/opal/opal-call-manager.cpp
index 6ccc508..e8b351b 100644
--- a/lib/engine/components/opal/opal-call-manager.cpp
+++ b/lib/engine/components/opal/opal-call-manager.cpp
@@ -58,6 +58,8 @@ Opal::CallManager::CallManager (Ekiga::ServiceCore& _core,
   call_options_settings = Ekiga::SettingsPtr (new Ekiga::Settings (CALL_OPTIONS_SCHEMA, setup_cb));
   call_forwarding_settings = Ekiga::SettingsPtr (new Ekiga::Settings (CALL_FORWARDING_SCHEMA, setup_cb));
   personal_data_settings = Ekiga::SettingsPtr (new Ekiga::Settings (PERSONAL_DATA_SCHEMA, setup_cb));
+
+  set_display_name (g_get_real_name ());
 }
 
 
@@ -199,9 +201,6 @@ void Opal::CallManager::setup (const std::string & setting)
   if (setting.empty () || setting == "auto-answer")
     set_auto_answer (call_options_settings->get_bool ("auto-answer"));
 
-  if (setting.empty () || setting == "full-name")
-    set_display_name (personal_data_settings->get_string ("full-name"));
-
   if (setting.empty () || setting == "maximum-video-tx-bitrate") {
 
     Opal::EndPoint::VideoOptions options;
diff --git a/lib/engine/gui/gtk-frontend/assistant-window.cpp 
b/lib/engine/gui/gtk-frontend/assistant-window.cpp
index e5c0535..9f9b50f 100644
--- a/lib/engine/gui/gtk-frontend/assistant-window.cpp
+++ b/lib/engine/gui/gtk-frontend/assistant-window.cpp
@@ -58,7 +58,6 @@ struct _AssistantWindowPrivate
   GdkPixbuf *icon;
 
   GtkWidget *welcome_page;
-  GtkWidget *personal_data_page;
   GtkWidget *info_page;
   GtkWidget *ekiga_net_page;
   GtkWidget *ekiga_out_page;
@@ -142,74 +141,6 @@ create_welcome_page (AssistantWindow *assistant)
 
 
 static void
-name_changed_cb (GtkEntry     *entry,
-                 GtkAssistant *assistant)
-{
-  set_current_page_complete (assistant,
-                             gm_entry_text_is_valid (GM_ENTRY (entry)));
-}
-
-
-static void
-create_personal_data_page (AssistantWindow *assistant)
-{
-  GtkWidget *vbox;
-  GtkWidget *label;
-  gchar *text;
-
-  vbox = create_page (assistant, _("Personal Information"), GTK_ASSISTANT_PAGE_CONTENT);
-
-  /* The user fields */
-  label = gtk_label_new (_("Please enter your first name and your surname:"));
-  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-
-  assistant->priv->name = gm_entry_new (NULL);
-  gm_entry_set_allow_empty (GM_ENTRY (assistant->priv->name), FALSE);
-  gtk_entry_set_activates_default (GTK_ENTRY (assistant->priv->name), TRUE);
-  gtk_box_pack_start (GTK_BOX (vbox), assistant->priv->name, FALSE, FALSE, 0);
-
-  label = gtk_label_new (NULL);
-  text = g_strdup_printf ("<i>%s</i>", _("Your first name and surname will be "
-                                        "used when connecting to other VoIP and "
-                                        "videoconferencing software."));
-  gtk_label_set_markup (GTK_LABEL (label), text);
-  g_free (text);
-  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
-
-  g_signal_connect (assistant->priv->name, "changed",
-                    G_CALLBACK (name_changed_cb), assistant);
-
-  assistant->priv->personal_data_page = vbox;
-  gtk_widget_show_all (vbox);
-}
-
-
-static void
-prepare_personal_data_page (AssistantWindow *assistant)
-{
-  std::string full_name =
-    assistant->priv->personal_data_settings->get_string ("full-name");
-
-  gtk_entry_set_text (GTK_ENTRY (assistant->priv->name),
-                      full_name.empty () ? g_get_real_name () : full_name.c_str ());
-}
-
-
-static void
-apply_personal_data_page (AssistantWindow *assistant)
-{
-  GtkEntry *entry = GTK_ENTRY (assistant->priv->name);
-  const gchar *full_name = gtk_entry_get_text (entry);
-
-  if (full_name && strlen (full_name) > 0)
-    assistant->priv->personal_data_settings->set_string ("full-name", full_name);
-  else
-    assistant->priv->personal_data_settings->set_string ("full-name", g_get_real_name ());
-}
-
-
-static void
 create_info_page (AssistantWindow *assistant)
 {
   GtkWidget *label;
@@ -633,7 +564,6 @@ assistant_window_init (AssistantWindow *assistant)
     boost::shared_ptr<Ekiga::Settings> (new Ekiga::Settings (PERSONAL_DATA_SCHEMA));
 
   create_welcome_page (assistant);
-  create_personal_data_page (assistant);
   create_info_page (assistant);
   create_ekiga_net_page (assistant);
   create_ekiga_out_page (assistant);
@@ -663,11 +593,6 @@ assistant_window_prepare (GtkAssistant *gtkassistant,
   if (!forward)
     return;
 
-  if (page == assistant->priv->personal_data_page) {
-    prepare_personal_data_page (assistant);
-    return;
-  }
-
   if (page == assistant->priv->ekiga_net_page) {
     prepare_ekiga_net_page (assistant);
     return;
@@ -690,7 +615,6 @@ assistant_window_apply (GtkAssistant *gtkassistant)
 {
   AssistantWindow *assistant = ASSISTANT_WINDOW (gtkassistant);
 
-  apply_personal_data_page (assistant);
   apply_ekiga_net_page (assistant);
   apply_ekiga_out_page (assistant);
 }
diff --git a/lib/engine/gui/gtk-frontend/preferences-window.cpp 
b/lib/engine/gui/gtk-frontend/preferences-window.cpp
index f7e840a..332b663 100644
--- a/lib/engine/gui/gtk-frontend/preferences-window.cpp
+++ b/lib/engine/gui/gtk-frontend/preferences-window.cpp
@@ -544,8 +544,6 @@ static void
 gm_pw_init_general_page (PreferencesWindow *self,
                          GtkWidget *container)
 {
-  GtkWidget *entry = NULL;
-
   /* Display */
   gm_pw_toggle_new (container, _("Show o_ffline contacts"),
                     self->priv->contacts_settings, "show-offline-contacts",
@@ -559,14 +557,6 @@ gm_pw_init_general_page (PreferencesWindow *self,
                     self->priv->video_display_settings, "enable-pip",
                     _("This allows the local video stream to be displayed incrusted in the remote video 
stream. This is only effective when sending and receiving video"), false);
 
-  /* Personal Information */
-  gm_pw_subsection_new (container, _("Personal Information"));
-  entry = gm_pw_entry_new (container, _("_Full Name"),
-                           self->priv->personal_data_settings, "full-name",
-                           _("Enter your full name"), true);
-  g_object_set (entry, "allow-empty", FALSE, NULL);
-  gtk_entry_set_max_length (GTK_ENTRY (entry), 65);
-
   /* Network Settings */
   gm_pw_subsection_new (container, _("Network Settings"));
   gm_pw_spin_new (container, _("Type of Service (TOS)"), NULL,
diff --git a/org.gnome.ekiga.gschema.xml.in.in b/org.gnome.ekiga.gschema.xml.in.in
index 7503a41..b05fc95 100644
--- a/org.gnome.ekiga.gschema.xml.in.in
+++ b/org.gnome.ekiga.gschema.xml.in.in
@@ -96,11 +96,6 @@
     <child name="call-options" schema="org gnome  PACKAGE_NAME@.general.call-options"/>
   </schema>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org gnome  PACKAGE_NAME@.general.personal-data" 
path="/org/gnome/@PACKAGE_NAME@/general/personal-data/">
-    <key name="full-name" type="s">
-      <default>''</default>
-      <_summary>Full name</_summary>
-      <_description>Enter your full name</_description>
-    </key>
     <key name="short-status" type="s">
       <default>'available'</default>
       <_summary>Contact short status</_summary>


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