[gedit/wip/tabs] Minor optimization thanks to desrt
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/tabs] Minor optimization thanks to desrt
- Date: Thu, 11 Jul 2013 16:02:43 +0000 (UTC)
commit 513743f78e88d4ce8218de86359ff023350e7191
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date: Thu Jul 11 18:02:28 2013 +0200
Minor optimization thanks to desrt
gedit/gedit-notebook.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-notebook.c b/gedit/gedit-notebook.c
index 5067a99..8123beb 100644
--- a/gedit/gedit-notebook.c
+++ b/gedit/gedit-notebook.c
@@ -625,7 +625,6 @@ populate_menu (GeditNotebook *notebook)
GMenuItem *item;
gchar *tab_name;
gchar *name;
- gchar *key_binding;
tab_name = _gedit_tab_get_name (GEDIT_TAB (tab));
name = gedit_utils_escape_underscores (tab_name, -1);
@@ -638,9 +637,7 @@ populate_menu (GeditNotebook *notebook)
if (i < 9)
{
- key_binding = g_strdup_printf ("<Alt>%d", i + 1);
- g_menu_item_set_attribute (item, "accel", "s", key_binding);
- g_free (key_binding);
+ g_menu_item_set_attribute_value (item, "accel", g_variant_new_take_string
(g_strdup_printf ("<Alt>%d", i + 1)));
}
g_menu_append_item (priv->documents_menu, item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]