]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkaccelmap.c
filechooserbutton: whitespace fixes
[~andy/gtk] / gtk / gtkaccelmap.c
index efc06ba90a278026cc397e1f611db12377b8357e..7154b404f86e6e60ebdda2322a5eb8feb05e4afc 100644 (file)
  * 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 <http://www.gnu.org/licenses/>.
  */
 
 #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 ("<GAction>/");
+  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);
+}
+