[gtkmm] Gtk::AccelMap: Glib::ustring accel_path
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::AccelMap: Glib::ustring accel_path
- Date: Fri, 3 Mar 2017 17:41:24 +0000 (UTC)
commit 8856ee98d553e311bd6493cb2145892d1d46e2cb
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Fri Mar 3 18:39:24 2017 +0100
Gtk::AccelMap: Glib::ustring accel_path
accel_path parameters are std::string in some functions, Glib::ustring
in other functions. Make them Glib::ustring everywhere.
In other classes (AccelKey, Menu, MenuItem, Widget) they are Glib::ustring.
gtk/gtkmm/accelmap.cc | 8 ++++----
gtk/gtkmm/accelmap.h | 10 ++++------
2 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkmm/accelmap.cc b/gtk/gtkmm/accelmap.cc
index 66b544f..a4ee552 100644
--- a/gtk/gtkmm/accelmap.cc
+++ b/gtk/gtkmm/accelmap.cc
@@ -24,7 +24,7 @@ namespace Gtk
namespace AccelMap
{
-void add_entry(const std::string& accel_path,
+void add_entry(const Glib::ustring& accel_path,
guint accel_key,
Gdk::ModifierType accel_mods)
{
@@ -32,7 +32,7 @@ void add_entry(const std::string& accel_path,
(GdkModifierType)accel_mods);
}
-bool change_entry(const std::string& accel_path,
+bool change_entry(const Glib::ustring& accel_path,
guint accel_key,
Gdk::ModifierType accel_mods,
bool replace)
@@ -51,12 +51,12 @@ void save(const std::string& filename)
gtk_accel_map_save(filename.c_str());
}
-void lock_path(const std::string& accel_path)
+void lock_path(const Glib::ustring& accel_path)
{
gtk_accel_map_lock_path(accel_path.c_str());
}
-void unlock_path(const std::string& accel_path)
+void unlock_path(const Glib::ustring& accel_path)
{
gtk_accel_map_unlock_path(accel_path.c_str());
}
diff --git a/gtk/gtkmm/accelmap.h b/gtk/gtkmm/accelmap.h
index cab6b42..b69dba8 100644
--- a/gtk/gtkmm/accelmap.h
+++ b/gtk/gtkmm/accelmap.h
@@ -31,8 +31,6 @@ namespace Gtk
namespace AccelMap
{
-//TODO: Why is the accel_path a std::string, instead of a Glib::ustring? murrayc.
-
/** Registers a new accelerator with the global accelerator map.
* This function should only be called once per accel_path
* with the canonical accel_key and accel_mods for this path.
@@ -53,7 +51,7 @@ namespace AccelMap
* @param accel_mods the accelerator modifiers
*
*/
-void add_entry(const std::string& accel_path,
+void add_entry(const Glib::ustring& accel_path,
guint accel_key,
Gdk::ModifierType accel_mods);
@@ -70,7 +68,7 @@ void add_entry(const std::string& accel_path,
* @param replace true if other accelerators may be deleted upon conflicts
* @result true if the accelerator could be changed, false otherwise
*/
-bool change_entry(const std::string& accel_path,
+bool change_entry(const Glib::ustring& accel_path,
guint accel_key,
Gdk::ModifierType accel_mods,
bool replace);
@@ -107,7 +105,7 @@ void save(const std::string& filename);
*
* @newin{2,4}
*/
-void lock_path(const std::string& accel_path);
+void lock_path(const Glib::ustring& accel_path);
/** Unlocks the given accelerator path. Refer to gtk_accel_map_lock_path()
* about accelerator path locking.
@@ -116,7 +114,7 @@ void lock_path(const std::string& accel_path);
*
* @newin{2,4}
*/
-void unlock_path(const std::string& accel_path);
+void unlock_path(const Glib::ustring& accel_path);
/** Looks up the accelerator entry for accel_path.
* @param accel_path A valid accelerator path.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]