[file-roller] Revert "fixed accelerators registration"



commit 8b20c3d24b4a0d11605b7f02b89e578ac3fa421e
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Jul 30 18:51:05 2018 +0200

    Revert "fixed accelerators registration"
    
    This reverts commit 4122c52e377ada1dee2cf07e34e86b791eaa9839.

 src/fr-application-menu.c | 2 +-
 src/gtk-utils.c           | 5 ++---
 src/gtk-utils.h           | 3 +--
 3 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/fr-application-menu.c b/src/fr-application-menu.c
index 97c1681d..9a7206ba 100644
--- a/src/fr-application-menu.c
+++ b/src/fr-application-menu.c
@@ -203,7 +203,7 @@ initialize_app_menu (GApplication *application)
                                         app_menu_entries,
                                         G_N_ELEMENTS (app_menu_entries),
                                         application);
-       _gtk_application_add_accelerators (GTK_APPLICATION (application), fr_app_accelerators, G_N_ELEMENTS 
(fr_app_accelerators));
+       _gtk_application_add_accelerators (GTK_APPLICATION (application), fr_app_accelerators);
 
        settings = fr_application_get_settings (FR_APPLICATION (application), FILE_ROLLER_SCHEMA_UI);
        g_simple_action_set_state (GET_ACTION (PREF_UI_VIEW_SIDEBAR),
diff --git a/src/gtk-utils.c b/src/gtk-utils.c
index 0a4cebe0..08c45fee 100644
--- a/src/gtk-utils.c
+++ b/src/gtk-utils.c
@@ -895,12 +895,11 @@ _gtk_application_add_accelerator_for_action (GtkApplication   *app,
 
 void
 _gtk_application_add_accelerators (GtkApplication *app,
-                                  const FrAccelerator  *accelerators,
-                                  int             n_accelerators)
+                                  FrAccelerator  *accelerators)
 {
        int i;
 
-       for (i = 0; i < n_accelerators; i++) {
+       for (i = 0; i < G_N_ELEMENTS (accelerators); i++) {
                const FrAccelerator *acc = accelerators + i;
                _gtk_application_add_accelerator_for_action (GTK_APPLICATION (app),
                                                             acc->action_name,
diff --git a/src/gtk-utils.h b/src/gtk-utils.h
index d7dbc54d..6e17995a 100644
--- a/src/gtk-utils.h
+++ b/src/gtk-utils.h
@@ -120,7 +120,6 @@ void          _gtk_application_add_accelerator_for_action
                                                    const char       *action_name,
                                                    const char       *accel);
 void         _gtk_application_add_accelerators    (GtkApplication   *app,
-                                                   const FrAccelerator *accelerators,
-                                                   int               n_accelerators);
+                                                   FrAccelerator    *accelerators);
 
 #endif


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