summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-05-04 20:31:32 +0800
committerraveit65 <[email protected]>2023-05-09 10:14:21 +0200
commitfcaf6442f0085d728de9e295208afbb2aff6c1e9 (patch)
tree90cb42590ec5bc5f6889917236cc6cb0350b0b77 /src
parent6f49d2c72ea1ade71df33a301d5192c2a127e790 (diff)
downloadengrampa-fcaf6442f0085d728de9e295208afbb2aff6c1e9.tar.bz2
engrampa-fcaf6442f0085d728de9e295208afbb2aff6c1e9.tar.xz
Replace deprecated functions and fix compilation warnings
Replacing GtkAction with GAction Replacing GtkUIManager with GtkBuilder
Diffstat (limited to 'src')
-rw-r--r--src/actions.c418
-rw-r--r--src/actions.h234
-rw-r--r--src/fr-command-7z.c2
-rw-r--r--src/fr-command.c2
-rw-r--r--src/fr-command.h2
-rw-r--r--src/fr-window.c354
-rw-r--r--src/glib-utils.c2
-rw-r--r--src/ui.h281
-rw-r--r--src/ui/menus-toolbars.ui1075
9 files changed, 1676 insertions, 694 deletions
diff --git a/src/actions.c b/src/actions.c
index 5b749a8..a02e969 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -46,6 +46,35 @@
/* -- new archive -- */
+static struct
+{
+ const char *id;
+ void (* activate) (GtkMenuItem *menuitem,
+ gpointer user_data);
+} engramp_menu_popup [] = {
+ {"popup_open_item", activate_popup_open},
+ {"popup_open_select_item", activate_popup_open_select},
+ {"popup_extract_item", activate_popup_extract},
+ {"popup_cut_item", activate_popup_cut},
+ {"popup_paste_item", activate_popup_paste},
+ {"popup_rename_item", activate_popup_rename},
+ {"popup_delete_item", activate_popup_delete},
+ {"popup_open_item1", activate_popup_open_folder},
+ {"popup_extract_item1", activate_popup_extract},
+ {"popup_cut_item1", activate_popup_cut},
+ {"popup_copy_item1", activate_popup_copy},
+ {"popup_paste_item1", activate_popup_paste},
+ {"popup_rename_item1", activate_popup_rename},
+ {"popup_delete_item1", activate_popup_delete},
+ {"popup_open_item2", activate_popup_open_folder_from_sidebar},
+ {"popup_extract_item2", activate_popup_extract_folder_from_sidebar},
+ {"popup_cut_item2", activate_popup_cut_folder_from_sidebar},
+ {"popup_copy_item2", activate_popup_copy_folder_from_sidebar},
+ {"popup_paste_item2", activate_popup_paste_folder_from_sidebar},
+ {"popup_rename_item2", activate_popup_rename_folder_from_sidebar},
+ {"popup_delete_item2", activate_popup_delete_folder_from_sidebar},
+};
+
static void
new_archive (DlgNewData *data,
char *uri)
@@ -303,6 +332,26 @@ new_file_response_cb (GtkWidget *w,
}
void
+init_engramp_menu_popup (FrWindow *window,
+ GtkBuilder *ui)
+{
+ int i;
+
+ int n_entries = G_N_ELEMENTS (engramp_menu_popup);
+
+ for (i = 0 ; i < n_entries; i++)
+ {
+ GtkWidget *widget = (GtkWidget *)gtk_builder_get_object (ui, engramp_menu_popup[i].id);
+
+ if (engramp_menu_popup[i].activate != NULL)
+ g_signal_connect (widget,
+ "activate",
+ G_CALLBACK (engramp_menu_popup[i].activate),
+ window);
+ }
+}
+
+void
show_new_archive_dialog (FrWindow *window,
const char *archive_name)
{
@@ -321,8 +370,9 @@ show_new_archive_dialog (FrWindow *window,
}
void
-activate_action_new (GtkAction *action,
- gpointer data)
+activate_action_new (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
show_new_archive_dialog ((FrWindow*)data, NULL);
}
@@ -376,8 +426,9 @@ open_file_response_cb (GtkWidget *w,
}
void
-activate_action_open (GtkAction *action,
- gpointer data)
+activate_action_open (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
GtkWidget *file_sel;
FrWindow *window = data;
@@ -461,8 +512,9 @@ save_file_response_cb (GtkWidget *w,
}
void
-activate_action_save_as (GtkAction *action,
- gpointer callback_data)
+activate_action_save_as (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer callback_data)
{
FrWindow *window = callback_data;
DlgNewData *data;
@@ -502,8 +554,9 @@ activate_action_save_as (GtkAction *action,
}
void
-activate_action_test_archive (GtkAction *action,
- gpointer data)
+activate_action_test_archive (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
@@ -511,8 +564,9 @@ activate_action_test_archive (GtkAction *action,
}
void
-activate_action_properties (GtkAction *action,
- gpointer data)
+activate_action_properties (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
@@ -520,8 +574,9 @@ activate_action_properties (GtkAction *action,
}
void
-activate_action_close (GtkAction *action,
- gpointer data)
+activate_action_close (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
@@ -529,106 +584,73 @@ activate_action_close (GtkAction *action,
}
void
-activate_action_add_files (GtkAction *action,
- gpointer data)
+activate_action_add_files (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
add_files_cb (NULL, data);
}
void
-activate_action_add_folder (GtkAction *action,
- gpointer data)
+activate_action_add_folder (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
add_folder_cb (NULL, data);
}
void
-activate_action_extract (GtkAction *action,
- gpointer data)
+activate_action_extract (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
dlg_extract (NULL, data);
}
void
-activate_action_extract_folder_from_sidebar (GtkAction *action,
- gpointer data)
-{
- dlg_extract_folder_from_sidebar (NULL, data);
-}
-
-void
-activate_action_copy (GtkAction *action,
- gpointer data)
+activate_action_copy (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
fr_window_copy_selection ((FrWindow*) data, FALSE);
}
void
-activate_action_cut (GtkAction *action,
- gpointer data)
+activate_action_cut (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
fr_window_cut_selection ((FrWindow*) data, FALSE);
}
void
-activate_action_paste (GtkAction *action,
- gpointer data)
+activate_action_paste (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
fr_window_paste_selection ((FrWindow*) data, FALSE);
}
void
-activate_action_rename (GtkAction *action,
- gpointer data)
+activate_action_rename (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
fr_window_rename_selection ((FrWindow*) data, FALSE);
}
void
-activate_action_delete (GtkAction *action,
- gpointer data)
+activate_action_delete (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
dlg_delete (NULL, data);
}
void
-activate_action_copy_folder_from_sidebar (GtkAction *action,
- gpointer data)
-{
- fr_window_copy_selection ((FrWindow*) data, TRUE);
-}
-
-void
-activate_action_cut_folder_from_sidebar (GtkAction *action,
- gpointer data)
-{
- fr_window_cut_selection ((FrWindow*) data, TRUE);
-}
-
-void
-activate_action_paste_folder_from_sidebar (GtkAction *action,
- gpointer data)
-{
- fr_window_paste_selection ((FrWindow*) data, TRUE);
-}
-
-void
-activate_action_rename_folder_from_sidebar (GtkAction *action,
- gpointer data)
-{
- fr_window_rename_selection ((FrWindow*) data, TRUE);
-}
-
-void
-activate_action_delete_folder_from_sidebar (GtkAction *action,
- gpointer data)
-{
- dlg_delete_from_sidebar (NULL, data);
-}
-
-void
-activate_action_find (GtkAction *action,
- gpointer data)
+activate_action_find (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
@@ -636,8 +658,9 @@ activate_action_find (GtkAction *action,
}
void
-activate_action_select_all (GtkAction *action,
- gpointer data)
+activate_action_select_all (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
@@ -645,8 +668,9 @@ activate_action_select_all (GtkAction *action,
}
void
-activate_action_deselect_all (GtkAction *action,
- gpointer data)
+activate_action_deselect_all (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
@@ -654,93 +678,73 @@ activate_action_deselect_all (GtkAction *action,
}
void
-activate_action_open_with (GtkAction *action,
- gpointer data)
+activate_action_open_with (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
open_with_cb (NULL, (FrWindow*) data);
}
void
-activate_action_view_or_open (GtkAction *action,
- gpointer data)
-{
- FrWindow *window = data;
- GList *file_list;
-
- file_list = fr_window_get_file_list_selection (window, FALSE, NULL);
- if (file_list == NULL)
- return;
- fr_window_open_files (window, file_list, FALSE);
- path_list_free (file_list);
-}
-
-void
-activate_action_open_folder (GtkAction *action,
- gpointer data)
-{
- FrWindow *window = data;
- fr_window_current_folder_activated (window, FALSE);
-}
-
-void
-activate_action_open_folder_from_sidebar (GtkAction *action,
- gpointer data)
-{
- FrWindow *window = data;
- fr_window_current_folder_activated (window, TRUE);
-}
-
-void
-activate_action_password (GtkAction *action,
- gpointer data)
+activate_action_password (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
dlg_password (NULL, (FrWindow*) data);
}
void
-activate_action_view_toolbar (GtkAction *action,
- gpointer data)
+activate_action_view_toolbar (GSimpleAction *action,
+ GVariant *state,
+ gpointer data)
{
GSettings *settings;
settings = g_settings_new (ENGRAMPA_SCHEMA_UI);
- g_settings_set_boolean (settings, PREF_UI_VIEW_TOOLBAR, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
+ g_settings_set_boolean (settings, PREF_UI_VIEW_TOOLBAR, g_variant_get_boolean (state));
+ g_simple_action_set_state (action, state);
g_object_unref (settings);
}
void
-activate_action_view_statusbar (GtkAction *action,
- gpointer data)
+activate_action_view_statusbar (GSimpleAction *action,
+ GVariant *state,
+ gpointer data)
{
GSettings *settings;
settings = g_settings_new (ENGRAMPA_SCHEMA_UI);
- g_settings_set_boolean (settings, PREF_UI_VIEW_STATUSBAR, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
+ g_settings_set_boolean (settings, PREF_UI_VIEW_STATUSBAR, g_variant_get_boolean (state));
+ g_simple_action_set_state (action, state);
g_object_unref (settings);
}
void
-activate_action_view_folders (GtkAction *action,
- gpointer data)
+activate_action_view_folders (GSimpleAction *action,
+ GVariant *state,
+ gpointer data)
{
GSettings *settings;
settings = g_settings_new (ENGRAMPA_SCHEMA_UI);
- g_settings_set_boolean (settings, PREF_UI_VIEW_FOLDERS, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
+ g_settings_set_boolean (settings, PREF_UI_VIEW_FOLDERS, g_variant_get_boolean (state));
+ g_simple_action_set_state (action, state);
g_object_unref (settings);
}
void
-activate_action_stop (GtkAction *action,
- gpointer data)
+activate_action_stop (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
fr_window_stop (window);
}
void
-activate_action_reload (GtkAction *action,
- gpointer data)
+activate_action_reload (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
@@ -748,48 +752,54 @@ activate_action_reload (GtkAction *action,
}
void
-activate_action_last_output (GtkAction *action,
- gpointer data)
+activate_action_last_output (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
fr_window_view_last_output (window, _("Last Output"));
}
void
-activate_action_go_back (GtkAction *action,
- gpointer data)
+activate_action_go_back (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
fr_window_go_back (window);
}
void
-activate_action_go_forward (GtkAction *action,
- gpointer data)
+activate_action_go_forward (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
fr_window_go_forward (window);
}
void
-activate_action_go_up (GtkAction *action,
- gpointer data)
+activate_action_go_up (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
fr_window_go_up_one_level (window);
}
void
-activate_action_go_home (GtkAction *action,
- gpointer data)
+activate_action_go_home (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
fr_window_go_to_location (window, "/", FALSE);
}
void
-activate_action_manual (GtkAction *action,
- gpointer data)
+activate_action_manual (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
{
FrWindow *window = data;
@@ -800,8 +810,9 @@ activate_action_manual (GtkAction *action,
#define EMAILIFY(string) (g_strdelimit ((string), "%", '@'))
void
-activate_action_about (GtkAction *action,
- gpointer gp)
+activate_action_about (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer gp)
{
FrWindow *window = gp;
const char *documenters [] = {
@@ -866,3 +877,136 @@ activate_action_about (GtkAction *action,
g_strfreev (authors);
g_free (license_text);
}
+
+void
+activate_toggle (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GVariant *state;
+ state = g_action_get_state (G_ACTION (action));
+ g_action_change_state (G_ACTION (action), g_variant_new_boolean (!g_variant_get_boolean (state)));
+ g_variant_unref (state);
+}
+
+void
+activate_popup_open (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ FrWindow *window = data;
+ GList *file_list;
+
+ file_list = fr_window_get_file_list_selection (window, FALSE, NULL);
+ if (file_list == NULL)
+ return;
+ fr_window_open_files (window, file_list, FALSE);
+ path_list_free (file_list);
+
+}
+
+void
+activate_popup_open_select (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ open_with_cb (NULL, (FrWindow*) data);
+}
+
+void
+activate_popup_extract (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ dlg_extract (NULL, data);
+}
+
+void
+activate_popup_cut (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ fr_window_cut_selection ((FrWindow*) data, FALSE);
+}
+
+void
+activate_popup_paste (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ fr_window_paste_selection ((FrWindow*) data, FALSE);
+}
+
+void
+activate_popup_rename (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ fr_window_rename_selection ((FrWindow*) data, FALSE);
+}
+
+void
+activate_popup_delete (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ dlg_delete (NULL, data);
+}
+
+void
+activate_popup_open_folder (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ FrWindow *window = data;
+ fr_window_current_folder_activated (window, FALSE);
+}
+
+void
+activate_popup_copy (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ fr_window_copy_selection ((FrWindow*) data, FALSE);
+}
+
+void
+activate_popup_open_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ FrWindow *window = data;
+ fr_window_current_folder_activated (window, TRUE);
+}
+
+void
+activate_popup_extract_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ dlg_extract_folder_from_sidebar (NULL, data);
+}
+
+void
+activate_popup_copy_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ fr_window_copy_selection ((FrWindow*) data, TRUE);
+}
+
+void
+activate_popup_cut_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ fr_window_cut_selection ((FrWindow*) data, TRUE);
+}
+
+void
+activate_popup_paste_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ fr_window_paste_selection ((FrWindow*) data, TRUE);
+}
+
+void
+activate_popup_rename_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ fr_window_rename_selection ((FrWindow*) data, TRUE);
+}
+
+void
+activate_popup_delete_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data)
+{
+ dlg_delete_from_sidebar (NULL, data);
+}
diff --git a/src/actions.h b/src/actions.h
index 41ab4b6..4664e37 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -26,55 +26,189 @@
#include <gtk/gtk.h>
#include "fr-window.h"
-void show_new_archive_dialog (FrWindow *window, const char *archive_name);
-
-void activate_action_new (GtkAction *action, gpointer data);
-void activate_action_open (GtkAction *action, gpointer data);
-void activate_action_save_as (GtkAction *action, gpointer data);
-void activate_action_test_archive (GtkAction *action, gpointer data);
-void activate_action_properties (GtkAction *action, gpointer data);
-void activate_action_close (GtkAction *action, gpointer data);
-void activate_action_quit (GtkAction *action, gpointer data);
-
-void activate_action_add_files (GtkAction *action, gpointer data);
-void activate_action_add_folder (GtkAction *action, gpointer data);
-void activate_action_extract (GtkAction *action, gpointer data);
-void activate_action_extract_folder_from_sidebar (GtkAction *action, gpointer data);
-
-void activate_action_copy (GtkAction *action, gpointer data);
-void activate_action_cut (GtkAction *action, gpointer data);
-void activate_action_paste (GtkAction *action, gpointer data);
-void activate_action_rename (GtkAction *action, gpointer data);
-void activate_action_delete (GtkAction *action, gpointer data);
-
-void activate_action_copy_folder_from_sidebar (GtkAction *action, gpointer data);
-void activate_action_cut_folder_from_sidebar (GtkAction *action, gpointer data);
-void activate_action_paste_folder_from_sidebar (GtkAction *action, gpointer data);
-void activate_action_rename_folder_from_sidebar (GtkAction *action, gpointer data);
-void activate_action_delete_folder_from_sidebar (GtkAction *action, gpointer data);
-
-void activate_action_find (GtkAction *action, gpointer data);
-void activate_action_select_all (GtkAction *action, gpointer data);
-void activate_action_deselect_all (GtkAction *action, gpointer data);
-void activate_action_open_with (GtkAction *action, gpointer data);
-void activate_action_view_or_open (GtkAction *action, gpointer data);
-void activate_action_open_folder (GtkAction *action, gpointer data);
-void activate_action_open_folder_from_sidebar (GtkAction *action, gpointer data);
-void activate_action_password (GtkAction *action, gpointer data);
-
-void activate_action_view_toolbar (GtkAction *action, gpointer data);
-void activate_action_view_statusbar (GtkAction *action, gpointer data);
-void activate_action_view_folders (GtkAction *action, gpointer data);
-void activate_action_stop (GtkAction *action, gpointer data);
-void activate_action_reload (GtkAction *action, gpointer data);
-void activate_action_last_output (GtkAction *action, gpointer data);
-
-void activate_action_go_back (GtkAction *action, gpointer data);
-void activate_action_go_forward (GtkAction *action, gpointer data);
-void activate_action_go_up (GtkAction *action, gpointer data);
-void activate_action_go_home (GtkAction *action, gpointer data);
-
-void activate_action_manual (GtkAction *action, gpointer data);
-void activate_action_about (GtkAction *action, gpointer data);
+void show_new_archive_dialog (FrWindow *window,
+ const char *archive_name);
+void activate_action_new (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_open (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_save_as (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_test_archive (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_properties (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_close (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_quit (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_add_files (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_add_folder (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_extract (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_copy (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_cut (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_paste (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_rename (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_delete (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_find (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_select_all (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_deselect_all (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_open_with (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_password (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_view_toolbar (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_view_statusbar (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_view_folders (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_stop (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_reload (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_last_output (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_go_back (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_go_forward (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_go_up (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_go_home (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_manual (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_action_about (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data);
+
+void activate_toggle (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data);
+
+void activate_popup_open (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_open_select (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_extract (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_cut (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_paste (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_rename (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_delete (GtkMenuItem *menuitem,
+ gpointer data);
+
+void init_engramp_menu_popup (FrWindow *window,
+ GtkBuilder *ui);
+
+void activate_popup_open_folder (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_copy (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_open_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_extract_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_copy_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_cut_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_paste_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_rename_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data);
+
+void activate_popup_delete_folder_from_sidebar (GtkMenuItem *menuitem,
+ gpointer data);
#endif /* ACTIONS_H */
diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
index d1617ae..7b40d5e 100644
--- a/src/fr-command-7z.c
+++ b/src/fr-command-7z.c
@@ -407,8 +407,6 @@ static void
process_line__delete (char *line,
gpointer data)
{
- FrCommand *comm = FR_COMMAND (data);
-
if ((strstr (line, "Wrong password?") != NULL)
|| (strstr (line, "Enter password") != NULL))
{
diff --git a/src/fr-command.c b/src/fr-command.c
index 2305032..dcbe9ad 100644
--- a/src/fr-command.c
+++ b/src/fr-command.c
@@ -79,7 +79,7 @@ const char *action_names[] = { "NONE",
"CREATING_ARCHIVE",
"SAVING_REMOTE_ARCHIVE" };
-#if MATE_ENABLE_DEBUG
+#ifdef MATE_ENABLE_DEBUG
const char * get_action_name (FrAction action)
{
return action_names[action];
diff --git a/src/fr-command.h b/src/fr-command.h
index 751b1bb..e2c0b4c 100644
--- a/src/fr-command.h
+++ b/src/fr-command.h
@@ -60,7 +60,7 @@ typedef enum {
FR_ACTION_SAVING_REMOTE_ARCHIVE /* copying the archive to a remote location */
} FrAction;
-#if MATE_ENABLE_DEBUG
+#ifdef MATE_ENABLE_DEBUG
const char * get_action_name (FrAction action);
#endif
diff --git a/src/fr-window.c b/src/fr-window.c
index 665670d..424cad4 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -314,7 +314,10 @@ struct _FrWindowPrivateData {
FrArchive *copy_from_archive;
- GtkActionGroup *actions;
+ GActionGroup *actions;
+ GtkBuilder *ui_manager;
+ GtkWidget *menubar_recentmenu;
+ GtkWidget *toolbar_recentmenu;
GtkWidget *file_popup_menu;
GtkWidget *folder_popup_menu;
@@ -604,6 +607,12 @@ fr_window_free_private_data (FrWindow *window)
if (window->priv->settings_caja)
_g_object_unref (window->priv->settings_caja);
+
+ if (window->priv->ui_manager)
+ {
+ g_object_unref (window->priv->ui_manager);
+ window->priv->ui_manager = NULL;
+ }
}
static void
@@ -1594,13 +1603,13 @@ get_tree_iter_from_path (FrWindow *window,
static void
set_sensitive (FrWindow *window,
- const char *action_name,
- gboolean sensitive)
+ const char *id,
+ gboolean sensitive)
{
- GtkAction *action;
+ GtkWidget *widget;
- action = gtk_action_group_get_action (window->priv->actions, action_name);
- g_object_set (action, "sensitive", sensitive, NULL);
+ widget = (GtkWidget *)gtk_builder_get_object (window->priv->ui_manager, id);
+ g_object_set (widget, "sensitive", sensitive, NULL);
}
static void
@@ -1619,10 +1628,10 @@ fr_window_update_current_location (FrWindow *window)
gtk_entry_set_text (GTK_ENTRY (window->priv->location_entry), window->priv->archive_present? current_dir: "");
- set_sensitive (window, "GoBack", window->priv->archive_present && (current_dir != NULL) && (window->priv->history_current != NULL) && (window->priv->history_current->next != NULL));
- set_sensitive (window, "GoForward", window->priv->archive_present && (current_dir != NULL) && (window->priv->history_current != NULL) && (window->priv->history_current->prev != NULL));
- set_sensitive (window, "GoUp", window->priv->archive_present && (current_dir != NULL) && (strcmp (current_dir, "/") != 0));
- set_sensitive (window, "GoHome", window->priv->archive_present);
+ set_sensitive (window, "tool_goback_item", window->priv->archive_present && (current_dir != NULL) && (window->priv->history_current != NULL) && (window->priv->history_current->next != NULL));
+ set_sensitive (window, "tool_gonext_item", window->priv->archive_present && (current_dir != NULL) && (window->priv->history_current != NULL) && (window->priv->history_current->prev != NULL));
+ set_sensitive (window, "tool_goup_item", window->priv->archive_present && (current_dir != NULL) && (strcmp (current_dir, "/") != 0));
+ set_sensitive (window, "tool_gohome_item", window->priv->archive_present);
gtk_widget_set_sensitive (window->priv->location_entry, window->priv->archive_present);
gtk_widget_set_sensitive (window->priv->location_label, window->priv->archive_present);
gtk_widget_set_sensitive (window->priv->filter_entry, window->priv->archive_present);
@@ -1933,10 +1942,10 @@ set_active (FrWindow *window,
const char *action_name,
gboolean is_active)
{
- GtkAction *action;
+ GAction *action;
- action = gtk_action_group_get_action (window->priv->actions, action_name);
- gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), is_active);
+ action = g_action_map_lookup_action (G_ACTION_MAP (window->priv->actions), action_name);
+ g_simple_action_set_state (G_SIMPLE_ACTION (action), g_variant_new_boolean (is_active));
}
static void
@@ -1958,7 +1967,9 @@ fr_window_update_paste_command_sensitivity (FrWindow *window,
ro = ! no_archive && window->archive->read_only;
compr_file = ! no_archive && window->archive->is_compressed_file;
- set_sensitive (window, "Paste", ! no_archive && ! ro && ! running && ! compr_file && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT) && gtk_clipboard_wait_is_target_available (clipboard, FR_SPECIAL_URI_LIST));
+ set_sensitive (window, "paste_item", ! no_archive && ! ro && ! running && ! compr_file && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT) && gtk_clipboard_wait_is_target_available (clipboard, FR_SPECIAL_URI_LIST));
+ set_sensitive (window, "popup_paste_item", ! no_archive && ! ro && ! running && ! compr_file && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT) && gtk_clipboard_wait_is_target_available (clipboard, FR_SPECIAL_URI_LIST));
+ set_sensitive (window, "popup_paste_item1", ! no_archive && ! ro && ! running && ! compr_file && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT) && gtk_clipboard_wait_is_target_available (clipboard, FR_SPECIAL_URI_LIST));
}
static void
@@ -1987,36 +1998,44 @@ fr_window_update_sensitivity (FrWindow *window)
one_file_selected = n_selected == 1;
dir_selected = selection_has_a_dir (window);
- set_sensitive (window, "AddFiles", ! no_archive && ! ro && ! running && ! compr_file);
- set_sensitive (window, "AddFiles_Toolbar", ! no_archive && ! ro && ! running && ! compr_file);
- set_sensitive (window, "AddFolder", ! no_archive && ! ro && ! running && ! compr_file);
- set_sensitive (window, "AddFolder_Toolbar", ! no_archive && ! ro && ! running && ! compr_file);
- set_sensitive (window, "Copy", ! no_archive && ! ro && ! running && ! compr_file && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
- set_sensitive (window, "Cut", ! no_archive && ! ro && ! running && ! compr_file && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
- set_sensitive (window, "Delete", ! no_archive && ! ro && ! window->priv->archive_new && ! running && ! compr_file);
- set_sensitive (window, "DeselectAll", ! no_archive && sel_not_null);
- set_sensitive (window, "Extract", file_op);
- set_sensitive (window, "Extract_Toolbar", file_op);
- set_sensitive (window, "Find", ! no_archive);
- set_sensitive (window, "LastOutput", ((window->archive != NULL)
+ set_sensitive (window, "add_files_item", ! no_archive && ! ro && ! running && ! compr_file);
+ set_sensitive (window, "tool_add_files_item", ! no_archive && ! ro && ! running && ! compr_file);
+ set_sensitive (window, "add_folder_item", ! no_archive && ! ro && ! running && ! compr_file);
+ set_sensitive (window, "tool_add_folder_item", ! no_archive && ! ro && ! running && ! compr_file);
+ set_sensitive (window, "copy_item", ! no_archive && ! ro && ! running && ! compr_file && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
+ set_sensitive (window, "popup_copy_item", ! no_archive && ! ro && ! running && ! compr_file && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
+ set_sensitive (window, "popup_copy_item1", ! no_archive && ! ro && ! running && ! compr_file && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
+ set_sensitive (window, "cut_item", ! no_archive && ! ro && ! running && ! compr_file && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
+ set_sensitive (window, "popup_cut_item", ! no_archive && ! ro && ! running && ! compr_file && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
+ set_sensitive (window, "popup_cut_item1", ! no_archive && ! ro && ! running && ! compr_file && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
+ set_sensitive (window, "delete_item", ! no_archive && ! ro && ! window->priv->archive_new && ! running && ! compr_file);
+ set_sensitive (window, "popup_delete_item", ! no_archive && ! ro && ! window->priv->archive_new && ! running && ! compr_file);
+ set_sensitive (window, "popup_delete_item1", ! no_archive && ! ro && ! window->priv->archive_new && ! running && ! compr_file);
+ set_sensitive (window, "deselect_all_item", ! no_archive && sel_not_null);
+ set_sensitive (window, "extract_item", file_op);
+ set_sensitive (window, "tool_extract_item", file_op);
+ set_sensitive (window, "find_item", ! no_archive);
+ set_sensitive (window, "last_output_item", ((window->archive != NULL)
&& (window->archive->process != NULL)
&& (window->archive->process->out.raw != NULL)));
- set_sensitive (window, "New", ! running);
- set_sensitive (window, "Open", ! running);
- set_sensitive (window, "Open_Toolbar", ! running);
- set_sensitive (window, "OpenSelection", file_op && sel_not_null && ! dir_selected);
- set_sensitive (window, "OpenFolder", file_op && one_file_selected && dir_selected);
- set_sensitive (window, "Password", ! running && (window->priv->asked_for_password || (! no_archive && window->archive->command->propPassword)));
- set_sensitive (window, "Properties", file_op);
- set_sensitive (window, "Close", !running || window->priv->stoppable);
- set_sensitive (window, "Reload", ! (no_archive || running));
- set_sensitive (window, "Rename", ! no_archive && ! ro && ! running && ! compr_file && one_file_selected);
- set_sensitive (window, "SaveAs", ! no_archive && ! compr_file && ! running);
- set_sensitive (window, "SelectAll", ! no_archive);
- set_sensitive (window, "Stop", running && window->priv->stoppable);
- set_sensitive (window, "TestArchive", ! no_archive && ! running && window->archive->command->propTest);
- set_sensitive (window, "ViewSelection", file_op && one_file_selected && ! dir_selected);
- set_sensitive (window, "ViewSelection_Toolbar", file_op && one_file_selected && ! dir_selected);
+ set_sensitive (window, "new_item", ! running);
+ set_sensitive (window, "tool_new_item", ! running);
+ set_sensitive (window, "open_item", ! running);
+ set_sensitive (window, "popup_open_select_item", file_op && sel_not_null && ! dir_selected);
+ set_sensitive (window, "popup_open_item1", file_op && one_file_selected && dir_selected);
+ set_sensitive (window, "password_item", ! running && (window->priv->asked_for_password || (! no_archive && window->archive->command->propPassword)));
+ set_sensitive (window, "properties_item", file_op);
+ set_sensitive (window, "close_item", !running || window->priv->stoppable);
+ set_sensitive (window, "reload_item", ! (no_archive || running));
+ set_sensitive (window, "rename_item", ! no_archive && ! ro && ! running && ! compr_file && one_file_selected);
+ set_sensitive (window, "popup_rename_item", ! no_archive && ! ro && ! running && ! compr_file && one_file_selected);
+ set_sensitive (window, "popup_rename_item1", ! no_archive && ! ro && ! running && ! compr_file && one_file_selected);
+ set_sensitive (window, "open_saveas_item", ! no_archive && ! compr_file && ! running);
+ set_sensitive (window, "select_all_item", ! no_archive);
+ set_sensitive (window, "stop_item", running && window->priv->stoppable);
+ set_sensitive (window, "tool_stop_item", running && window->priv->stoppable);
+ set_sensitive (window, "test_integrity_item", ! no_archive && ! running && window->archive->command->propTest);
+ set_sensitive (window, "popup_open_item", file_op && one_file_selected && ! dir_selected);
if (window->priv->progress_dialog != NULL)
gtk_dialog_set_response_sensitive (GTK_DIALOG (window->priv->progress_dialog),
@@ -2025,15 +2044,15 @@ fr_window_update_sensitivity (FrWindow *window)
fr_window_update_paste_command_sensitivity (window, NULL);
- set_sensitive (window, "SelectAll", (window->priv->current_view_length > 0) && (window->priv->current_view_length != n_selected));
- set_sensitive (window, "DeselectAll", n_selected > 0);
- set_sensitive (window, "OpenRecent", ! running);
- set_sensitive (window, "OpenRecent_Toolbar", ! running);
+ set_sensitive (window, "select_all_item", (window->priv->current_view_length > 0) && (window->priv->current_view_length != n_selected));
+ set_sensitive (window, "deselect_all_item", n_selected > 0);
+ set_sensitive (window, "open_recent_item", ! running);
+ set_sensitive (window, "tool_open_recent_item", ! running);
- set_sensitive (window, "ViewFolders", (window->priv->list_mode == FR_WINDOW_LIST_MODE_AS_DIR));
+ set_sensitive (window, "view_folder_item", (window->priv->list_mode == FR_WINDOW_LIST_MODE_AS_DIR));
- set_sensitive (window, "ViewAllFiles", ! window->priv->filter_mode);
- set_sensitive (window, "ViewAsFolder", ! window->priv->filter_mode);
+ set_sensitive (window, "view_all_files_item", ! window->priv->filter_mode);
+ set_sensitive (window, "view_as_folder_item", ! window->priv->filter_mode);
}
static gboolean
@@ -2112,7 +2131,7 @@ progress_dialog_delete_event (GtkWidget *caller,
FrWindow *window)
{
if (window->priv->stoppable) {
- activate_action_stop (NULL, window);
+ activate_action_stop (NULL, NULL, window);
close_progress_dialog (window, TRUE);
}
@@ -2204,7 +2223,7 @@ progress_dialog_response (GtkDialog *dialog,
switch (response_id) {
case GTK_RESPONSE_CANCEL:
if (window->priv->stoppable) {
- activate_action_stop (NULL, window);
+ activate_action_stop (NULL, NULL, window);
close_progress_dialog (window, TRUE);
}
break;
@@ -4466,7 +4485,7 @@ key_press_cb (GtkWidget *widget,
switch (event->keyval) {
case GDK_KEY_Escape:
- activate_action_stop (NULL, window);
+ activate_action_stop (NULL, NULL, window);
if (window->priv->filter_mode)
fr_window_deactivate_filter (window);
retval = TRUE;
@@ -4882,15 +4901,11 @@ pref_history_len_changed (GSettings *settings,
{
FrWindow *window = user_data;
int limit;
- GtkAction *action;
limit = g_settings_get_int (settings, PREF_UI_HISTORY_LEN);
- action = gtk_action_group_get_action (window->priv->actions, "OpenRecent");
- gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (action), limit);
-
- action = gtk_action_group_get_action (window->priv->actions, "OpenRecent_Toolbar");
- gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (action), limit);
+ gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (window->priv->menubar_recentmenu), limit);
+ gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (window->priv->toolbar_recentmenu), limit);
}
static void
@@ -4899,7 +4914,6 @@ pref_view_toolbar_changed (GSettings *settings,
gpointer user_data)
{
FrWindow *window = user_data;
-
fr_window_set_toolbar_visibility (window, g_settings_get_boolean (settings, key));
}
@@ -4992,7 +5006,8 @@ fr_window_stoppable_cb (FrCommand *command,
FrWindow *window)
{
window->priv->stoppable = stoppable;
- set_sensitive (window, "Stop", stoppable);
+ set_sensitive (window, "stop_item", stoppable);
+ set_sensitive (window, "tool_stop_item", stoppable);
if (window->priv->progress_dialog != NULL)
gtk_dialog_set_response_sensitive (GTK_DIALOG (window->priv->progress_dialog),
GTK_RESPONSE_OK,
@@ -5051,15 +5066,11 @@ fr_window_fake_load (FrArchive *archive,
static void
menu_item_select_cb (GtkMenuItem *proxy,
- FrWindow *window)
+ FrWindow *window)
{
- GtkAction *action;
char *message;
- action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (proxy));
- g_return_if_fail (action != NULL);
-
- g_object_get (G_OBJECT (action), "tooltip", &message, NULL);
+ message = gtk_widget_get_tooltip_text (GTK_WIDGET (proxy));
if (message) {
gtk_statusbar_push (GTK_STATUSBAR (window->priv->statusbar),
window->priv->help_message_cid, message);
@@ -5069,47 +5080,22 @@ menu_item_select_cb (GtkMenuItem *proxy,
static void
menu_item_deselect_cb (GtkMenuItem *proxy,
- FrWindow *window)
+ FrWindow *window)
{
gtk_statusbar_pop (GTK_STATUSBAR (window->priv->statusbar),
window->priv->help_message_cid);
}
static void
-disconnect_proxy_cb (GtkUIManager *manager,
- GtkAction *action,
- GtkWidget *proxy,
- FrWindow *window)
-{
- if (GTK_IS_MENU_ITEM (proxy)) {
- g_signal_handlers_disconnect_by_func
- (proxy, G_CALLBACK (menu_item_select_cb), window);
- g_signal_handlers_disconnect_by_func
- (proxy, G_CALLBACK (menu_item_deselect_cb), window);
- }
-}
-
-static void
-connect_proxy_cb (GtkUIManager *manager,
- GtkAction *action,
- GtkWidget *proxy,
- FrWindow *window)
-{
- if (GTK_IS_MENU_ITEM (proxy)) {
- g_signal_connect (proxy, "select",
- G_CALLBACK (menu_item_select_cb), window);
- g_signal_connect (proxy, "deselect",
- G_CALLBACK (menu_item_deselect_cb), window);
- }
-}
-
-static void
-view_as_radio_action (GtkAction *action,
- GtkRadioAction *current,
- gpointer data)
+view_all_files_selected_toggled (GtkMenuItem *menuitem,
+ gpointer data)
{
FrWindow *window = data;
- fr_window_set_list_mode (window, gtk_radio_action_get_current_value (current));
+
+ if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menuitem)))
+ fr_window_set_list_mode (window, FR_WINDOW_LIST_MODE_FLAT);
+ else
+ fr_window_set_list_mode (window, FR_WINDOW_LIST_MODE_AS_DIR);
}
static void
@@ -5125,31 +5111,34 @@ recent_chooser_item_activated_cb (GtkRecentChooser *chooser,
}
}
-static void
-fr_window_init_recent_chooser (FrWindow *window,
- GtkRecentChooser *chooser)
+static GtkWidget *
+fr_window_create_recent_chooser (FrWindow *window)
{
- GtkRecentFilter *filter;
- int i;
+ GtkRecentManager *manager;
+ GtkRecentFilter *filter;
+ GtkWidget *menu;
+ int i;
- g_return_if_fail (chooser != NULL);
+ manager = gtk_recent_manager_get_default ();
+ menu = gtk_recent_chooser_menu_new_for_manager (manager);
filter = gtk_recent_filter_new ();
gtk_recent_filter_set_name (filter, _("All archives"));
for (i = 0; open_type[i] != -1; i++)
gtk_recent_filter_add_mime_type (filter, mime_type_desc[open_type[i]].mime_type);
gtk_recent_filter_add_application (filter, "Engrampa");
- gtk_recent_chooser_add_filter (chooser, filter);
+ gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (menu), filter);
- gtk_recent_chooser_set_local_only (chooser, FALSE);
- gtk_recent_chooser_set_limit (chooser, g_settings_get_int (window->priv->settings_ui, PREF_UI_HISTORY_LEN));
- gtk_recent_chooser_set_show_not_found (chooser, TRUE);
- gtk_recent_chooser_set_sort_type (chooser, GTK_RECENT_SORT_MRU);
+ gtk_recent_chooser_set_local_only (GTK_RECENT_CHOOSER (menu), FALSE);
+ gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (menu), g_settings_get_int (window->priv->settings_ui, PREF_UI_HISTORY_LEN));
+ gtk_recent_chooser_set_show_not_found (GTK_RECENT_CHOOSER (menu), TRUE);
+ gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (menu), GTK_RECENT_SORT_MRU);
- g_signal_connect (G_OBJECT (chooser),
+ g_signal_connect (G_OBJECT (menu),
"item_activated",
G_CALLBACK (recent_chooser_item_activated_cb),
window);
+ return menu;
}
static void
@@ -5246,17 +5235,6 @@ fr_window_attach (FrWindow *window,
}
static void
-set_action_important (GtkUIManager *ui,
- const char *action_name)
-{
- GtkAction *action;
-
- action = gtk_ui_manager_get_action (ui, action_name);
- g_object_set (action, "is_important", TRUE, NULL);
- g_object_unref (action);
-}
-
-static void
fr_window_construct (FrWindow *window)
{
GtkWidget *menubar;
@@ -5271,10 +5249,13 @@ fr_window_construct (FrWindow *window)
GtkWidget *sidepane_title_box;
GtkWidget *sidepane_title_label;
GtkWidget *close_sidepane_button;
+ GtkWidget *menu_radio_files;
+ GtkWidget *menuitem;
GtkTreeSelection *selection;
- GtkActionGroup *actions;
- GtkAction *action;
- GtkUIManager *ui;
+ GActionGroup *actions;
+ GSimpleAction *action;
+ GtkAccelGroup *accel_group;
+ GtkBuilder *ui;
GError *error = NULL;
GSettingsSchemaSource *schema_source;
GSettingsSchema *caja_schema;
@@ -5661,94 +5642,85 @@ fr_window_construct (FrWindow *window)
/* Build the menu and the toolbar. */
- ui = gtk_ui_manager_new ();
+ window->priv->ui_manager = ui = gtk_builder_new ();
- window->priv->actions = actions = gtk_action_group_new ("Actions");
-
- /* open recent toolbar item action */
-
- action = g_object_new (GTK_TYPE_RECENT_ACTION,
- "name", "OpenRecent",
- /* Translators: this is the label for the "open recent file" sub-menu. */
- "label", _("Open _Recent"),
- "tooltip", _("Open a recently used archive"),
- "stock-id", "gtk-open",
- NULL);
- fr_window_init_recent_chooser (window, GTK_RECENT_CHOOSER (action));
- gtk_action_group_add_action (actions, action);
- g_object_unref (action);
-
- /* open recent toolbar item action */
-
- action = g_object_new (GTK_TYPE_RECENT_ACTION,
- "name", "OpenRecent_Toolbar",
- "label", _("Open"),
- "tooltip", _("Open a recently used archive"),
- "stock-id", "gtk-open",
- "is-important", TRUE,
- NULL);
- fr_window_init_recent_chooser (window, GTK_RECENT_CHOOSER (action));
- g_signal_connect (action,
- "activate",
- G_CALLBACK (activate_action_open),
- window);
- gtk_action_group_add_action (actions, action);
- g_object_unref (action);
+ window->priv->actions = actions = (GActionGroup*)g_simple_action_group_new ();
/* other actions */
+ g_action_map_add_action_entries (G_ACTION_MAP (actions),
+ action_entries, G_N_ELEMENTS (action_entries),
+ window);
- gtk_action_group_set_translation_domain (actions, NULL);
- gtk_action_group_add_actions (actions,
- action_entries,
- n_action_entries,
- window);
- gtk_action_group_add_toggle_actions (actions,
- action_toggle_entries,
- n_action_toggle_entries,
- window);
- gtk_action_group_add_radio_actions (actions,
- view_as_entries,
- n_view_as_entries,
- window->priv->list_mode,
- G_CALLBACK (view_as_radio_action),
- window);
-
- g_signal_connect (ui, "connect_proxy",
- G_CALLBACK (connect_proxy_cb), window);
- g_signal_connect (ui, "disconnect_proxy",
- G_CALLBACK (disconnect_proxy_cb), window);
-
- gtk_ui_manager_insert_action_group (ui, actions, 0);
- gtk_window_add_accel_group (GTK_WINDOW (window),
- gtk_ui_manager_get_accel_group (ui));
+ accel_group = gtk_accel_group_new ();
+ gtk_widget_insert_action_group (GTK_WIDGET (window), "win", actions);
+ gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
/* Add a hidden short cut Ctrl-Q for power users */
- gtk_accel_group_connect (gtk_ui_manager_get_accel_group (ui),
+ gtk_accel_group_connect (accel_group,
GDK_KEY_q, GDK_CONTROL_MASK, 0,
g_cclosure_new_swap (G_CALLBACK (fr_window_close), window, NULL));
- if (! gtk_ui_manager_add_ui_from_resource (ui, ENGRAMPA_RESOURCE_UI_PATH G_DIR_SEPARATOR_S "menus-toolbars.ui", &error)) {
+ if (! gtk_builder_add_from_resource (ui, ENGRAMPA_RESOURCE_UI_PATH G_DIR_SEPARATOR_S "menus-toolbars.ui", &error)) {
g_message ("building menus failed: %s", error->message);
g_error_free (error);
}
+ /*Add shortcut keys*/
+ for (gulong i = 0; i < G_N_ELEMENTS (menu_keybindings); i++)
+ {
+ menuitem = (GtkWidget*)gtk_builder_get_object (ui, menu_keybindings[i].widget_id);
+ gtk_widget_add_accelerator (menuitem, "activate", accel_group,
+ menu_keybindings[i].keyval,
+ menu_keybindings[i].modifier,
+ GTK_ACCEL_VISIBLE);
+ }
+
+ gtk_builder_add_callback_symbols (ui,
+ "menu_item_select_cb", G_CALLBACK (menu_item_select_cb),
+ "menu_item_deselect_cb", G_CALLBACK (menu_item_deselect_cb),
+ NULL);
+ gtk_builder_connect_signals (ui, window);
+ /* open recent toolbar item action */
- menubar = gtk_ui_manager_get_widget (ui, "/MenuBar");
+ window->priv->menubar_recentmenu = fr_window_create_recent_chooser (window);
+ menuitem = (GtkWidget *)gtk_builder_get_object (ui, "open_recent_item");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), window->priv->menubar_recentmenu);
+
+ /* open recent toolbar item action */
+ menuitem = (GtkWidget *)gtk_builder_get_object (ui, "tool_open_recent_item");
+ window->priv->toolbar_recentmenu = fr_window_create_recent_chooser (window);
+ gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (menuitem), window->priv->toolbar_recentmenu);
+
+ if (window->priv->list_mode == FR_WINDOW_LIST_MODE_FLAT)
+ action = g_simple_action_new_stateful ("ViewAllFiles", G_VARIANT_TYPE ("s"), g_variant_new_string ("files"));
+ else
+ action = g_simple_action_new_stateful ("ViewAllFiles", G_VARIANT_TYPE ("s"), g_variant_new_string ("folder"));
+
+ g_action_map_add_action (G_ACTION_MAP (actions), G_ACTION (action));
+ g_object_unref (action);
+
+ menubar = (GtkWidget *)gtk_builder_get_object (ui, "engrampamenubar");
fr_window_attach (FR_WINDOW (window), menubar, FR_WINDOW_AREA_MENUBAR);
gtk_widget_show (menubar);
- window->priv->toolbar = toolbar = gtk_ui_manager_get_widget (ui, "/ToolBar");
+ window->priv->toolbar = toolbar = (GtkWidget *)gtk_builder_get_object (ui, "engrampatoolbar");
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), TRUE);
gtk_style_context_add_class (gtk_widget_get_style_context (toolbar), GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
- set_action_important (ui, "/ToolBar/Extract_Toolbar");
/* location bar */
- window->priv->location_bar = gtk_ui_manager_get_widget (ui, "/LocationBar");
+ window->priv->location_bar = (GtkWidget *)gtk_builder_get_object (ui, "locationbar");
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (window->priv->location_bar), FALSE);
gtk_toolbar_set_style (GTK_TOOLBAR (window->priv->location_bar), GTK_TOOLBAR_BOTH_HORIZ);
gtk_style_context_add_class (gtk_widget_get_style_context (window->priv->location_bar), GTK_STYLE_CLASS_TOOLBAR);
- set_action_important (ui, "/LocationBar/GoBack");
+ init_engramp_menu_popup (window, ui);
+
+ /* file list mode */
+ menu_radio_files = (GtkWidget *)gtk_builder_get_object (ui, "view_all_files_item");
+ g_signal_connect (G_OBJECT (menu_radio_files),
+ "toggled",
+ G_CALLBACK (view_all_files_selected_toggled),
+ window);
/* current location */
location_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
@@ -5800,9 +5772,9 @@ fr_window_construct (FrWindow *window)
else
gtk_widget_hide (toolbar);
- window->priv->file_popup_menu = gtk_ui_manager_get_widget (ui, "/FilePopupMenu");
- window->priv->folder_popup_menu = gtk_ui_manager_get_widget (ui, "/FolderPopupMenu");
- window->priv->sidebar_folder_popup_menu = gtk_ui_manager_get_widget (ui, "/SidebarFolderPopupMenu");
+ window->priv->file_popup_menu = (GtkWidget *)gtk_builder_get_object (ui, "FilePopupMenu");
+ window->priv->folder_popup_menu = (GtkWidget *)gtk_builder_get_object (ui, "FolderPopupMenu");
+ window->priv->sidebar_folder_popup_menu = (GtkWidget *)gtk_builder_get_object (ui, "SidebarFolderPopupMenu");
/* Create the statusbar. */
diff --git a/src/glib-utils.c b/src/glib-utils.c
index 88b90c9..c7cb78c 100644
--- a/src/glib-utils.c
+++ b/src/glib-utils.c
@@ -240,7 +240,7 @@ g_utf8_strchug (char *string)
c = g_utf8_get_char (scan);
}
- g_memmove (string, scan, strlen (scan) + 1);
+ memmove (string, scan, strlen (scan) + 1);
return string;
}
diff --git a/src/ui.h b/src/ui.h
index ce77575..aadacbe 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -25,217 +25,80 @@
#include "actions.h"
-static GtkActionEntry action_entries[] = {
- { "FileMenu", NULL, N_("_Archive"), NULL, NULL, NULL },
- { "EditMenu", NULL, N_("_Edit"), NULL, NULL, NULL },
- { "ViewMenu", NULL, N_("_View"), NULL, NULL, NULL },
- { "HelpMenu", NULL, N_("_Help"), NULL, NULL, NULL },
- { "ArrangeFilesMenu", NULL, N_("_Arrange Files"), NULL, NULL, NULL },
-
- { "About", "help-about",
- N_("_About"), NULL,
- N_("Information about the program"),
- G_CALLBACK (activate_action_about) },
- { "AddFiles", "add-files-to-archive",
- N_("_Add Files…"), NULL,
- N_("Add files to the archive"),
- G_CALLBACK (activate_action_add_files) },
- { "AddFiles_Toolbar", "add-files-to-archive",
- N_("Add Files"), NULL,
- N_("Add files to the archive"),
- G_CALLBACK (activate_action_add_files) },
- { "AddFolder", "add-folder-to-archive",
- N_("Add a _Folder…"), NULL,
- N_("Add a folder to the archive"),
- G_CALLBACK (activate_action_add_folder) },
- { "AddFolder_Toolbar", "add-folder-to-archive",
- N_("Add Folder"), NULL,
- N_("Add a folder to the archive"),
- G_CALLBACK (activate_action_add_folder) },
- { "Close", "window-close",
- N_("_Close"), "<control>W",
- N_("Close the current archive"),
- G_CALLBACK (activate_action_close) },
- { "Contents", "help-browser",
- N_("Contents"), "F1",
- N_("Display the Engrampa Manual"),
- G_CALLBACK (activate_action_manual) },
-
- { "Copy", "edit-copy",
- N_("_Copy"), "<control>C",
- N_("Copy the selection"),
- G_CALLBACK (activate_action_copy) },
- { "Cut", "edit-cut",
- N_("Cu_t"), "<control>X",
- N_("Cut the selection"),
- G_CALLBACK (activate_action_cut) },
- { "Paste", "edit-paste",
- N_("_Paste"), "<control>V",
- N_("Paste the clipboard"),
- G_CALLBACK (activate_action_paste) },
- { "Rename", NULL,
- N_("_Rename…"), "F2",
- N_("Rename the selection"),
- G_CALLBACK (activate_action_rename) },
- { "Delete", "edit-delete",
- N_("_Delete"), "Delete",
- N_("Delete the selection from the archive"),
- G_CALLBACK (activate_action_delete) },
-
- { "CopyFolderFromSidebar", "edit-copy",
- N_("_Copy"), "<control>C",
- N_("Copy the selection"),
- G_CALLBACK (activate_action_copy_folder_from_sidebar) },
- { "CutFolderFromSidebar", "edit-cut",
- N_("Cu_t"), "<control>X",
- N_("Cut the selection"),
- G_CALLBACK (activate_action_cut_folder_from_sidebar) },
- { "PasteFolderFromSidebar", "edit-paste",
- N_("_Paste"), "<control>V",
- N_("Paste the clipboard"),
- G_CALLBACK (activate_action_paste_folder_from_sidebar) },
- { "RenameFolderFromSidebar", NULL,
- N_("_Rename…"), "F2",
- N_("Rename the selection"),
- G_CALLBACK (activate_action_rename_folder_from_sidebar) },
- { "DeleteFolderFromSidebar", "edit-delete",
- N_("_Delete"), "Delete",
- N_("Delete the selection from the archive"),
- G_CALLBACK (activate_action_delete_folder_from_sidebar) },
-
- { "DeselectAll", NULL,
- N_("Dese_lect All"), "<shift><control>A",
- N_("Deselect all files"),
- G_CALLBACK (activate_action_deselect_all) },
- { "Extract", "extract-archive",
- N_("_Extract…"), "<control>E",
- N_("Extract files from the archive"),
- G_CALLBACK (activate_action_extract) },
- { "ExtractFolderFromSidebar", "extract-archive",
- N_("_Extract…"), NULL,
- N_("Extract files from the archive"),
- G_CALLBACK (activate_action_extract_folder_from_sidebar) },
- { "Extract_Toolbar", "extract-archive",
- N_("Extract"), NULL,
- N_("Extract files from the archive"),
- G_CALLBACK (activate_action_extract) },
- { "Find", "edit-find",
- N_("Find…"), "<control>F",
- NULL,
- G_CALLBACK (activate_action_find) },
-
- { "LastOutput", NULL,
- N_("_Last Output"), NULL,
- N_("View the output produced by the last executed command"),
- G_CALLBACK (activate_action_last_output) },
- { "New", "document-new",
- N_("New…"), "<control>N",
- N_("Create a new archive"),
- G_CALLBACK (activate_action_new) },
- { "Open", "document-open",
- N_("Open…"), "<control>O",
- N_("Open archive"),
- G_CALLBACK (activate_action_open) },
- { "Open_Toolbar", "document-open",
- N_("_Open"), "<control>O",
- N_("Open archive"),
- G_CALLBACK (activate_action_open) },
- { "OpenSelection", NULL,
- N_("_Open With…"), NULL,
- N_("Open selected files with an application"),
- G_CALLBACK (activate_action_open_with) },
- { "Password", NULL,
- N_("Pass_word…"), NULL,
- N_("Specify a password for this archive"),
- G_CALLBACK (activate_action_password) },
- { "Properties", "document-properties",
- N_("_Properties"), "<alt>Return",
- N_("Show archive properties"),
- G_CALLBACK (activate_action_properties) },
- { "Reload", "view-refresh",
- N_("_Refresh"), "<control>R",
- N_("Reload current archive"),
- G_CALLBACK (activate_action_reload) },
- { "SaveAs", "document-save-as",
- N_("Save As…"), NULL,
- N_("Save the current archive with a different name"),
- G_CALLBACK (activate_action_save_as) },
- { "SelectAll", "edit-select-all",
- N_("Select _All"), "<control>A",
- N_("Select all files"),
- G_CALLBACK (activate_action_select_all) },
- { "Stop", "process-stop",
- N_("_Stop"), "Escape",
- N_("Stop current operation"),
- G_CALLBACK (activate_action_stop) },
- { "TestArchive", NULL,
- N_("_Test Integrity"), NULL,
- N_("Test whether the archive contains errors"),
- G_CALLBACK (activate_action_test_archive) },
- { "ViewSelection", "document-open",
- N_("_Open"), "<control>O",
- N_("Open the selected file"),
- G_CALLBACK (activate_action_view_or_open) },
- { "ViewSelection_Toolbar", "document-open",
- N_("_Open"), "<control>O",
- N_("Open the selected file"),
- G_CALLBACK (activate_action_view_or_open) },
- { "OpenFolder", "document-open",
- N_("_Open"), "<control>O",
- N_("Open the selected folder"),
- G_CALLBACK (activate_action_open_folder) },
- { "OpenFolderFromSidebar", "document-open",
- N_("_Open"), "<control>O",
- N_("Open the selected folder"),
- G_CALLBACK (activate_action_open_folder_from_sidebar) },
-
- { "GoBack", "go-previous",
- NULL, NULL,
- N_("Go to the previous visited location"),
- G_CALLBACK (activate_action_go_back) },
- { "GoForward", "go-next",
- NULL, NULL,
- N_("Go to the next visited location"),
- G_CALLBACK (activate_action_go_forward) },
- { "GoUp", "go-up",
- NULL, NULL,
- N_("Go up one level"),
- G_CALLBACK (activate_action_go_up) },
- { "GoHome", "go-home",
- NULL, NULL,
- /* Translators: the home location is the home folder. */
- N_("Go to the home location"),
- G_CALLBACK (activate_action_go_home) },
-};
-static guint n_action_entries = G_N_ELEMENTS (action_entries);
-
-static GtkToggleActionEntry action_toggle_entries[] = {
- { "ViewToolbar", NULL,
- N_("_Toolbar"), NULL,
- N_("View the main toolbar"),
- G_CALLBACK (activate_action_view_toolbar),
- TRUE },
- { "ViewStatusbar", NULL,
- N_("Stat_usbar"), NULL,
- N_("View the statusbar"),
- G_CALLBACK (activate_action_view_statusbar),
- TRUE },
- { "ViewFolders", NULL,
- N_("_Folders"), "F9",
- N_("View the folders pane"),
- G_CALLBACK (activate_action_view_folders),
- FALSE },
+static GActionEntry action_entries[] = {
+ /* FileMenu */
+ { "New", activate_action_new, NULL, NULL, NULL, { 0 } },
+ { "Open", activate_action_open, NULL, NULL, NULL, { 0 } },
+ { "SaveAs", activate_action_save_as, NULL, NULL, NULL, { 0 } },
+ { "Extract", activate_action_extract, NULL, NULL, NULL, { 0 } },
+ { "TestArchive", activate_action_test_archive, NULL, NULL, NULL, { 0 } },
+ { "Properties", activate_action_properties, NULL, NULL, NULL, { 0 } },
+ { "Close", activate_action_close, NULL, NULL, NULL, { 0 } },
+ /* EditMenu */
+ { "Copy", activate_action_copy, NULL, NULL, NULL, { 0 } },
+ { "Cut", activate_action_cut, NULL, NULL, NULL, { 0 } },
+ { "Paste", activate_action_paste, NULL, NULL, NULL, { 0 } },
+ { "Rename", activate_action_rename, NULL, NULL, NULL, { 0 } },
+ { "Delete", activate_action_delete, NULL, NULL, NULL, { 0 } },
+ { "SelectAll", activate_action_select_all, NULL, NULL, NULL, { 0 } },
+ { "DeselectAll", activate_action_deselect_all, NULL, NULL, NULL, { 0 } },
+ { "Find", activate_action_find, NULL, NULL, NULL, { 0 } },
+ { "AddFiles", activate_action_add_files, NULL, NULL, NULL, { 0 } },
+ { "AddFolder", activate_action_add_folder, NULL, NULL, NULL, { 0 } },
+ { "Password", activate_action_password, NULL, NULL, NULL, { 0 } },
+ /* ViewMenu */
+ { "ViewToolbar", activate_toggle, NULL, "true", activate_action_view_toolbar, { 0 } },
+ { "ViewStatusbar", activate_toggle, NULL, "true", activate_action_view_statusbar, { 0 } },
+ { "ViewFolders", activate_toggle, NULL, "false", activate_action_view_folders, { 0 } },
+ { "LastOutput", activate_action_last_output, NULL, NULL, NULL, { 0 } },
+ { "Stop", activate_action_stop, NULL, NULL, NULL, { 0 } },
+ { "Reload", activate_action_reload, NULL, NULL, NULL, { 0 } },
+ /* HelpMenu */
+ { "About", activate_action_about, NULL, NULL, NULL, { 0 } },
+ { "Contents", activate_action_manual, NULL, NULL, NULL, { 0 } },
+ /* Toolbar */
+ { "OpenRecent_Toolbar", activate_action_open, NULL, NULL, NULL, { 0 } },
+ { "ExtractToolbar", activate_action_extract, NULL, NULL, NULL, { 0 } },
+ { "AddFilesToolbar", activate_action_add_files, NULL, NULL, NULL, { 0 } },
+ { "AddFolderToolbar", activate_action_add_folder, NULL, NULL, NULL, { 0 } },
+ /* LocationBar*/
+ { "GoBack", activate_action_go_back, NULL, NULL, NULL, { 0 } },
+ { "GoForward", activate_action_go_forward, NULL, NULL, NULL, { 0 } },
+ { "GoUp", activate_action_go_up, NULL, NULL, NULL, { 0 } },
+ { "GoHome", activate_action_go_home, NULL, NULL, NULL, { 0 } },
};
-static guint n_action_toggle_entries = G_N_ELEMENTS (action_toggle_entries);
-static GtkRadioActionEntry view_as_entries[] = {
- { "ViewAllFiles", NULL,
- N_("View All _Files"), "<control>1",
- " ", FR_WINDOW_LIST_MODE_FLAT },
- { "ViewAsFolder", NULL,
- N_("View as a F_older"), "<control>2",
- " ", FR_WINDOW_LIST_MODE_AS_DIR },
+static const struct {
+ guint keyval;
+ GdkModifierType modifier;
+ const gchar *widget_id;
+} menu_keybindings [] = {
+ { GDK_KEY_N, GDK_CONTROL_MASK, "new_item"},
+ { GDK_KEY_O, GDK_CONTROL_MASK, "open_item"},
+ { GDK_KEY_O, GDK_CONTROL_MASK, "open_recent_item"},
+ { GDK_KEY_E, GDK_CONTROL_MASK, "extract_item"},
+ { GDK_KEY_Return, GDK_MOD1_MASK, "properties_item"},
+ { GDK_KEY_W, GDK_CONTROL_MASK, "close_item"},
+ { GDK_KEY_X, GDK_CONTROL_MASK, "cut_item"},
+ { GDK_KEY_C, GDK_CONTROL_MASK, "copy_item"},
+ { GDK_KEY_V, GDK_CONTROL_MASK, "paste_item"},
+ { GDK_KEY_F2, 0, "rename_item"},
+ { GDK_KEY_Delete, 0, "delete_item"},
+ { GDK_KEY_A, GDK_CONTROL_MASK, "select_all_item"},
+ { GDK_KEY_A, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "deselect_all_item"},
+ { GDK_KEY_F, GDK_CONTROL_MASK, "find_item"},
+ { GDK_KEY_F9, 0, "view_folder_item"},
+ { GDK_KEY_1, GDK_CONTROL_MASK, "view_all_files_item"},
+ { GDK_KEY_2, GDK_CONTROL_MASK, "view_as_folder_item"},
+ { GDK_KEY_Escape, 0, "stop_item"},
+ { GDK_KEY_R, GDK_CONTROL_MASK, "reload_item"},
+ { GDK_KEY_F1, 0, "help_item"},
+ { GDK_KEY_O, GDK_CONTROL_MASK, "popup_open_item2"},
+ { GDK_KEY_X, GDK_CONTROL_MASK, "popup_cut_item2"},
+ { GDK_KEY_C, GDK_CONTROL_MASK, "popup_copy_item2"},
+ { GDK_KEY_V, GDK_CONTROL_MASK, "popup_paste_item2"},
+ { GDK_KEY_F2, 0, "popup_rename_item2"},
+ { GDK_KEY_Delete, 0, "popup_delete_item2"},
};
-static guint n_view_as_entries = G_N_ELEMENTS (view_as_entries);
#endif /* UI_H */
diff --git a/src/ui/menus-toolbars.ui b/src/ui/menus-toolbars.ui
index c5dc080..eb51baf 100644
--- a/src/ui/menus-toolbars.ui
+++ b/src/ui/menus-toolbars.ui
@@ -1,102 +1,973 @@
-<ui>
- <menubar name="MenuBar">
- <menu name="Archive" action="FileMenu">
- <menuitem action="New"/>
- <menuitem action="Open"/>
- <menuitem action="OpenRecent"/>
- <menuitem action="SaveAs"/>
- <separator/>
- <menuitem action="Extract"/>
- <menuitem action="TestArchive"/>
- <separator/>
- <menuitem action="Properties"/>
- <separator/>
- <menuitem action="Close"/>
- </menu>
- <menu action="EditMenu">
- <menuitem action="Cut"/>
- <menuitem action="Copy"/>
- <menuitem action="Paste"/>
- <menuitem action="Rename"/>
- <menuitem action="Delete"/>
- <separator/>
- <menuitem action="SelectAll"/>
- <menuitem action="DeselectAll"/>
- <separator/>
- <menuitem action="Find"/>
- <separator/>
- <menuitem action="AddFiles"/>
- <menuitem action="AddFolder"/>
- <separator/>
- <menuitem action="Password"/>
- </menu>
- <menu action="ViewMenu">
- <menuitem action="ViewToolbar"/>
- <menuitem action="ViewStatusbar"/>
- <menuitem action="ViewFolders"/>
- <separator/>
- <menuitem action="ViewAllFiles"/>
- <menuitem action="ViewAsFolder"/>
- <separator/>
- <menuitem action="LastOutput"/>
- <separator/>
- <menuitem action="Stop"/>
- <menuitem action="Reload"/>
- </menu>
- <menu action="HelpMenu">
- <menuitem action="Contents"/>
- <menuitem action="About"/>
- </menu>
- </menubar>
- <toolbar name="ToolBar">
- <toolitem action="New"/>
- <toolitem action="OpenRecent_Toolbar"/>
- <separator/>
- <toolitem action="Extract_Toolbar"/>
- <separator/>
- <toolitem action="AddFiles_Toolbar"/>
- <toolitem action="AddFolder_Toolbar"/>
- <separator/>
- <toolitem action="Stop"/>
- </toolbar>
- <toolbar name="LocationBar">
- <toolitem action="GoBack"/>
- <toolitem action="GoForward"/>
- <toolitem action="GoUp"/>
- <toolitem action="GoHome"/>
- </toolbar>
- <popup name="FilePopupMenu">
- <menuitem action="ViewSelection"/>
- <menuitem action="OpenSelection"/>
- <separator/>
- <menuitem action="Extract"/>
- <separator/>
- <menuitem action="Cut"/>
- <menuitem action="Copy"/>
- <menuitem action="Paste"/>
- <menuitem action="Rename"/>
- <menuitem action="Delete"/>
- </popup>
- <popup name="FolderPopupMenu">
- <menuitem action="OpenFolder"/>
- <separator/>
- <menuitem action="Extract"/>
- <separator/>
- <menuitem action="Cut"/>
- <menuitem action="Copy"/>
- <menuitem action="Paste"/>
- <menuitem action="Rename"/>
- <menuitem action="Delete"/>
- </popup>
- <popup name="SidebarFolderPopupMenu">
- <menuitem action="OpenFolderFromSidebar"/>
- <separator/>
- <menuitem action="ExtractFolderFromSidebar"/>
- <separator/>
- <menuitem action="CutFolderFromSidebar"/>
- <menuitem action="CopyFolderFromSidebar"/>
- <menuitem action="PasteFolderFromSidebar"/>
- <menuitem action="RenameFolderFromSidebar"/>
- <menuitem action="DeleteFolderFromSidebar"/>
- </popup>
-</ui>
+<interface>
+ <object class="GtkImage" id="menu_icon_new">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">document-new</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_open">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">document-open</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_open1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">document-open</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_open2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">document-open</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_open3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">document-open</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_open_recent">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">gtk-open</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_save_as">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">document-save-as</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_extract">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">extract-archive</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_extract1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">extract-archive</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_extract2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">extract-archive</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_extract3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">extract-archive</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_properties">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">document-properties</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_close">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">window-close</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_copy">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-copy</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_copy1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-copy</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_copy2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-copy</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_copy3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-copy</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_cut">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-cut</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_cut1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-cut</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_cut2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-cut</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_cut3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-cut</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_paste">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-paste</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_paste1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-paste</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_paste2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-paste</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_paste3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-paste</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_delete">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-delete</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_delete1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-delete</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_delete2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-delete</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_delete3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-delete</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_select_all">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-select-all</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_find">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">edit-find</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_add_files">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">add-files-to-archive</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_add_folder">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">add-folder-to-archive</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_stop">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">process-stop</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_reload">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">view-refresh</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_help">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">help-browser</property>
+ </object>
+ <object class="GtkImage" id="menu_icon_about">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">help-about</property>
+ </object>
+
+ <object class="GtkMenuBar" id="engrampamenubar">
+ <property name="visible">1</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-menubar">
+ <property name="AtkObject::accessible-name">The menubar</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Archive</property>
+ <property name="use-underline">1</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="file_menu">
+ <child>
+ <object class="GtkImageMenuItem" id="new_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">New…</property>
+ <property name="tooltip-text" translatable="yes">Create a new archive</property>
+ <property name="use-underline">1</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ <property name="image">menu_icon_new</property>
+ <property name="action-name">win.New</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="open_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Open…</property>
+ <property name="tooltip-text" translatable="yes">Open archive</property>
+ <property name="use-underline">1</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ <property name="image">menu_icon_open</property>
+ <property name="action-name">win.Open</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="open_recent_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Open _Recent</property>
+ <property name="tooltip-text" translatable="yes">Open a recently used archive</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_open_recent</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="open_saveas_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Save As…</property>
+ <property name="tooltip-text" translatable="yes">Save the current archive with a different name</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_save_as</property>
+ <property name="action-name">win.SaveAs</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="extract_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Extract…</property>
+ <property name="tooltip-text" translatable="yes">Extract files from the archive</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_extract</property>
+ <property name="action-name">win.Extract</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="test_integrity_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Test Integrity</property>
+ <property name="tooltip-text" translatable="yes">Test whether the archive contains errors</property>
+ <property name="use-underline">1</property>
+ <property name="action-name">win.TestArchive</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="properties_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Properties</property>
+ <property name="tooltip-text" translatable="yes">Show archive properties</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_properties</property>
+ <property name="action-name">win.Properties</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="close_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Close</property>
+ <property name="tooltip-text" translatable="yes">Close the current archive</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_close</property>
+ <property name="action-name">win.Close</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Edit</property>
+ <property name="use-underline">1</property>
+ <child type="submenu">
+ <object class="GtkMenu">
+ <child>
+ <object class="GtkImageMenuItem" id="copy_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Copy</property>
+ <property name="tooltip-text" translatable="yes">Copy the selection</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_copy</property>
+ <property name="action-name">win.Copy</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="cut_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Cu_t</property>
+ <property name="tooltip-text" translatable="yes">Cut the selection</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_cut</property>
+ <property name="action-name">win.Cut</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="paste_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Paste</property>
+ <property name="tooltip-text" translatable="yes">Paste the clipboard</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_paste</property>
+ <property name="action-name">win.Paste</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="rename_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Rename…</property>
+ <property name="tooltip-text" translatable="yes">Rename the selection</property>
+ <property name="use-underline">1</property>
+ <property name="action-name">win.Rename</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="delete_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Delete</property>
+ <property name="tooltip-text" translatable="yes">Delete the selection from the archive</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_delete</property>
+ <property name="action-name">win.Delete</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="select_all_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Select _All</property>
+ <property name="tooltip-text" translatable="yes">Select all files</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_select_all</property>
+ <property name="action-name">win.SelectAll</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="deselect_all_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Dese_lect All</property>
+ <property name="tooltip-text" translatable="yes">Deselect all files</property>
+ <property name="use-underline">1</property>
+ <property name="action-name">win.DeselectAll</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="find_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Find…</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_find</property>
+ <property name="action-name">win.Find</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="add_files_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Add Files…</property>
+ <property name="tooltip-text" translatable="yes">Add files to the archive</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_add_files</property>
+ <property name="action-name">win.AddFiles</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="add_folder_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Add a _Folder…</property>
+ <property name="tooltip-text" translatable="yes">Add a folder to the archive</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_add_folder</property>
+ <property name="action-name">win.AddFolder</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="password_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Pass_word…</property>
+ <property name="tooltip-text" translatable="yes">Specify a password for this archive</property>
+ <property name="use-underline">1</property>
+ <property name="action-name">win.Password</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_View</property>
+ <property name="use-underline">1</property>
+ <child type="submenu">
+ <object class="GtkMenu">
+ <child>
+ <object class="GtkCheckMenuItem" id="toolbar_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Toolbar</property>
+ <property name="tooltip-text" translatable="yes">View the main toolbar</property>
+ <property name="use-underline">1</property>
+ <property name="action-name">win.ViewToolbar</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="status_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Stat_usbar</property>
+ <property name="tooltip-text" translatable="yes">View the statusbar</property>
+ <property name="use-underline">1</property>
+ <property name="action-name">win.ViewStatusbar</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="view_folder_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Folders</property>
+ <property name="tooltip-text" translatable="yes">View the folders pane</property>
+ <property name="use-underline">1</property>
+ <property name="action-name">win.ViewFolders</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ <property name="use_action_appearance">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="view_all_files_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">View All _Files</property>
+ <property name="active">True</property>
+ <property name="use-underline">1</property>
+ <property name="action-name">win.ViewAllFiles</property>
+ <property name="action-target">'files'</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioMenuItem" id="view_as_folder_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">View as a F_older</property>
+ <property name="use-underline">1</property>
+ <property name="group">view_all_files_item</property>
+ <property name="active">True</property>
+ <property name="action-name">win.ViewAllFiles</property>
+ <property name="action-target">'folder'</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ <property name="use_action_appearance">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="last_output_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Last Output</property>
+ <property name="tooltip-text" translatable="yes">View the output produced by the last executed command</property>
+ <property name="use-underline">1</property>
+ <property name="action-name">win.LastOutput</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ <property name="use_action_appearance">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="stop_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Stop</property>
+ <property name="tooltip-text" translatable="yes">Stop current operation</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_stop</property>
+ <property name="action-name">win.Stop</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="reload_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Refresh</property>
+ <property name="tooltip-text" translatable="yes">Reload current archive</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_reload</property>
+ <property name="action-name">win.Reload</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use-underline">1</property>
+ <child type="submenu">
+ <object class="GtkMenu">
+ <child>
+ <object class="GtkImageMenuItem" id="help_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Contents</property>
+ <property name="tooltip-text" translatable="yes">Dis_Archiveplay the Engrampa Manual</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_help</property>
+ <property name="action-name">win.Contents</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="about_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_About</property>
+ <property name="tooltip-text" translatable="yes">Information about the program</property>
+ <property name="use-underline">1</property>
+ <property name="image">menu_icon_about</property>
+ <property name="action-name">win.About</property>
+ <signal name="select" handler="menu_item_select_cb" swapped="no"/>
+ <signal name="deselect" handler="menu_item_deselect_cb" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+</object>
+ <object class="GtkToolbar" id="engrampatoolbar">
+ <property name="visible">1</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-toolbar">
+ <property name="AtkObject::accessible-name">The Toolbar</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="tool_new_item">
+ <property name="visible">1</property>
+ <property name="icon-name">document-new</property>
+ <property name="action-name">win.New</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuToolButton" id="tool_open_recent_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Open</property>
+ <property name="icon-name">document-open</property>
+ <property name="is-important">1</property>
+ <property name="tooltip-text" translatable="yes">Open a recently used archive</property>
+ <property name="action-name">win.OpenRecent_Toolbar</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorToolItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="tool_extract_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Extract</property>
+ <property name="icon-name">extract-archive</property>
+ <property name="tooltip-text" translatable="yes">Extract files from the archive</property>
+ <property name="action-name">win.ExtractToolbar</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorToolItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="tool_add_files_item">
+ <property name="visible">1</property>
+ <property name="icon-name">add-files-to-archive</property>
+ <property name="tooltip-text" translatable="yes">Add files to the archive</property>
+ <property name="action-name">win.AddFilesToolbar</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="tool_add_folder_item">
+ <property name="visible">1</property>
+ <property name="icon-name">add-folder-to-archive</property>
+ <property name="tooltip-text" translatable="yes">Add a folder to the archive</property>
+ <property name="action-name">win.AddFolderToolbar</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorToolItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="tool_stop_item">
+ <property name="visible">1</property>
+ <property name="icon-name">process-stop</property>
+ <property name="tooltip-text" translatable="yes">Stop current operation</property>
+ <property name="action-name">win.Stop</property>
+ </object>
+ </child>
+ </object>
+ <object class="GtkToolbar" id="locationbar">
+ <property name="visible">1</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="location-toolbar">
+ <property name="AtkObject::accessible-name">The Location Toolbar</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="tool_goback_item">
+ <property name="visible">1</property>
+ <property name="icon-name">go-previous</property>
+ <property name="tooltip-text" translatable="yes">Go to the previous visited location</property>
+ <property name="action-name">win.GoBack</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="tool_gonext_item">
+ <property name="visible">1</property>
+ <property name="icon-name">go-next</property>
+ <property name="tooltip-text" translatable="yes">Go to the next visited location</property>
+ <property name="action-name">win.GoForward</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="tool_goup_item">
+ <property name="visible">1</property>
+ <property name="icon-name">go-up</property>
+ <property name="tooltip-text" translatable="yes">Go up one level</property>
+ <property name="action-name">win.GoUp</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="tool_gohome_item">
+ <property name="visible">1</property>
+ <property name="icon-name">go-home</property>
+ <property name="tooltip-text" translatable="yes">Go to the home location</property>
+ <property name="action-name">win.GoHome</property>
+ </object>
+ </child>
+ </object>
+
+ <object class="GtkMenu" id="FilePopupMenu">
+ <property name="visible">1</property>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_open_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Open</property>
+ <property name="tooltip-text" translatable="yes">Open the selected file</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_open1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="popup_open_select_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Open With…</property>
+ <property name="tooltip-text" translatable="yes">Open selected files with an application</property>
+ <property name="use_underline">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_extract_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Extract…</property>
+ <property name="tooltip-text" translatable="yes">Extract files from the archive</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_extract1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_cut_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Cu_t</property>
+ <property name="tooltip-text" translatable="yes">Cut the selection</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_cut1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_copy_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Copy</property>
+ <property name="tooltip-text" translatable="yes">Copy the selection</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_copy1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_paste_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Paste</property>
+ <property name="tooltip-text" translatable="yes">Paste the clipboard</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_paste1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="popup_rename_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Rename…</property>
+ <property name="tooltip-text" translatable="yes">Rename the selection</property>
+ <property name="use_underline">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_delete_item">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Delete</property>
+ <property name="tooltip-text" translatable="yes">Delete the selection from the archive</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_delete1</property>
+ </object>
+ </child>
+</object>
+ <object class="GtkMenu" id="FolderPopupMenu">
+ <property name="visible">1</property>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_open_item1">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Open</property>
+ <property name="tooltip-text" translatable="yes">Open the selected folder</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_open2</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_extract_item1">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Extract…</property>
+ <property name="tooltip-text" translatable="yes">Extract folder from the archive</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_extract2</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_cut_item1">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Cu_t</property>
+ <property name="tooltip-text" translatable="yes">Cut the selection</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_cut2</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_copy_item1">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Copy</property>
+ <property name="tooltip-text" translatable="yes">Copy the selection</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_copy2</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_paste_item1">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Paste</property>
+ <property name="tooltip-text" translatable="yes">Paste the clipboard</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_paste2</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="popup_rename_item1">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Rename…</property>
+ <property name="tooltip-text" translatable="yes">Rename the selection</property>
+ <property name="use_underline">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_delete_item1">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Delete</property>
+ <property name="tooltip-text" translatable="yes">Delete the selection from the archive</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_delete2</property>
+ </object>
+ </child>
+ </object>
+ <object class="GtkMenu" id="SidebarFolderPopupMenu">
+ <property name="visible">1</property>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_open_item2">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Open</property>
+ <property name="tooltip-text" translatable="yes">Open the selected folder</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_open3</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_extract_item2">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Extract…</property>
+ <property name="tooltip-text" translatable="yes">Extract folder from the archive</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_extract3</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem">
+ <property name="visible">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_cut_item2">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">Cu_t</property>
+ <property name="tooltip-text" translatable="yes">Cut the selection</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_cut3</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_copy_item2">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Copy</property>
+ <property name="tooltip-text" translatable="yes">Copy the selection</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_copy3</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_paste_item2">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Paste</property>
+ <property name="tooltip-text" translatable="yes">Paste the clipboard</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_paste3</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="popup_rename_item2">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Rename…</property>
+ <property name="tooltip-text" translatable="yes">Rename the selection</property>
+ <property name="use_underline">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="popup_delete_item2">
+ <property name="visible">1</property>
+ <property name="label" translatable="yes">_Delete</property>
+ <property name="tooltip-text" translatable="yes">Delete the selection from the archive</property>
+ <property name="use_underline">1</property>
+ <property name="image">menu_icon_delete3</property>
+ </object>
+ </child>
+ </object>
+</interface>