X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkaccelmap.c;h=7154b404f86e6e60ebdda2322a5eb8feb05e4afc;hb=e1edc998a2e9c557030d207533932b3120e13fe5;hp=efc06ba90a278026cc397e1f611db12377b8357e;hpb=f119c834c1770f183ef4722f82e9c120b3954474;p=~andy%2Fgtk
diff --git a/gtk/gtkaccelmap.c b/gtk/gtkaccelmap.c
index efc06ba90..7154b404f 100644
--- a/gtk/gtkaccelmap.c
+++ b/gtk/gtkaccelmap.c
@@ -12,14 +12,12 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see .
*/
#include "config.h"
-#include "gtkaccelmap.h"
+#include "gtkaccelmapprivate.h"
#include "gtkmarshalers.h"
#include "gtkwindowprivate.h"
@@ -209,6 +207,9 @@ _gtk_accel_path_is_valid (const gchar *accel_path)
* To change the accelerator during runtime programatically, use
* gtk_accel_map_change_entry().
*
+ * Set @accel_key and @accel_mods to 0 to request a removal of
+ * the accelerator.
+ *
* Note that @accel_path string will be stored in a #GQuark. Therefore, if you
* pass a static string, you can save some memory by interning it first with
* g_intern_static_string().
@@ -954,7 +955,7 @@ _gtk_accel_map_remove_group (const gchar *accel_path,
*
* Note that locking of individual accelerator paths is independent from
* locking the #GtkAccelGroup containing them. For runtime accelerator
- * changes to be possible both the accelerator path and its #GtkAccelGroup
+ * changes to be possible, both the accelerator path and its #GtkAccelGroup
* have to be unlocked.
*
* Since: 2.4
@@ -1066,3 +1067,20 @@ do_accel_map_changed (AccelEntry *entry)
entry->accel_key,
entry->accel_mods);
}
+
+gchar *
+_gtk_accel_path_for_action (const gchar *action_name,
+ GVariant *parameter)
+{
+ GString *s;
+
+ s = g_string_new ("/");
+ g_string_append (s, action_name);
+ if (parameter)
+ {
+ g_string_append_c (s, '/');
+ g_variant_print_string (parameter, s, FALSE);
+ }
+ return g_string_free (s, FALSE);
+}
+