[gnote] format_for_label is unnecessary



commit c9128727160c4d1781748982d9cdb8ffee7c15ae
Author: Hubert Figuiere <hub figuiere net>
Date:   Wed May 13 02:09:24 2009 -0400

    format_for_label is unnecessary
---
 src/tray.cpp |   10 +---------
 src/tray.hpp |    1 -
 2 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/src/tray.cpp b/src/tray.cpp
index 1aacdc7..9dbae72 100644
--- a/src/tray.cpp
+++ b/src/tray.cpp
@@ -152,14 +152,6 @@ namespace gnote {
     return Gtk::ImageMenuItem::on_leave_notify_event(ev);
   }
 
-  std::string NoteMenuItem::format_for_label (const std::string & name)
-  {
-    // Replace underscores ("_") with double-underscores ("__")
-    // so Note menuitems are not created with mnemonics.
-    return sharp::string_replace_all(name, "_", "__");
-  }
-
-
   std::string NoteMenuItem::get_display_name(const Note::Ptr & note)
   {
     std::string display_name = note->get_title();
@@ -174,7 +166,7 @@ namespace gnote {
       display_name = ellipsify (display_name, max_length);
     }
 
-    return format_for_label(display_name);
+    return display_name;
   }
 
   std::string NoteMenuItem::ellipsify (const std::string & str, size_t max)
diff --git a/src/tray.hpp b/src/tray.hpp
index 7e2fa16..c13a5ca 100644
--- a/src/tray.hpp
+++ b/src/tray.hpp
@@ -52,7 +52,6 @@ private:
   bool        m_pinned;
   bool        m_inhibit_activate;
 
-  static std::string format_for_label (const std::string & name);
   static std::string get_display_name(const Note::Ptr & n);
   static std::string ellipsify (const std::string & str, size_t max);
   static void _init_static();



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