[gthumb/ext] Make many file manager actions always available
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext] Make many file manager actions always available
- Date: Sat, 2 Jan 2010 21:42:00 +0000 (UTC)
commit 36725ff2131e518b563d03bd8fc604dfc0e15e63
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Jan 1 18:07:33 2010 +0100
Make many file manager actions always available
extensions/file_manager/callbacks.c | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/extensions/file_manager/callbacks.c b/extensions/file_manager/callbacks.c
index b778a62..b7a55d1 100644
--- a/extensions/file_manager/callbacks.c
+++ b/extensions/file_manager/callbacks.c
@@ -36,13 +36,10 @@
#define SCROLL_TIMEOUT 30 /* autoscroll timeout in milliseconds */
-static const char *vfs_ui_info =
+static const char *fixed_ui_info =
"<ui>"
" <menubar name='MenuBar'>"
" <menu name='Edit' action='EditMenu'>"
-" <placeholder name='Folder_Actions'>"
-" <menuitem action='Edit_Duplicate'/>"
-" </placeholder>"
" <placeholder name='Folder_Actions_2'>"
" <menuitem action='Edit_Trash'/>"
" <menuitem action='Edit_Delete'/>"
@@ -70,6 +67,18 @@ static const char *vfs_ui_info =
"</ui>";
+static const char *vfs_ui_info =
+"<ui>"
+" <menubar name='MenuBar'>"
+" <menu name='Edit' action='EditMenu'>"
+" <placeholder name='Folder_Actions'>"
+" <menuitem action='Edit_Duplicate'/>"
+" </placeholder>"
+" </menu>"
+" </menubar>"
+"</ui>";
+
+
static const char *browser_ui_info =
"<ui>"
" <menubar name='MenuBar'>"
@@ -201,6 +210,7 @@ static GtkActionEntry action_entries[] = {
typedef struct {
GtkActionGroup *action_group;
+ guint fixed_merge_id;
guint vfs_merge_id;
guint browser_merge_id;
guint browser_vfs_merge_id;
@@ -443,6 +453,7 @@ void
fm__gth_browser_construct_cb (GthBrowser *browser)
{
BrowserData *data;
+ GError *error;
GtkWidget *file_view;
g_return_if_fail (GTH_IS_BROWSER (browser));
@@ -458,6 +469,12 @@ fm__gth_browser_construct_cb (GthBrowser *browser)
gtk_ui_manager_insert_action_group (gth_browser_get_ui_manager (browser), data->action_group, 0);
set_action_sensitive (data, "Edit_PasteInFolder", FALSE);
+ data->fixed_merge_id = gtk_ui_manager_add_ui_from_string (gth_browser_get_ui_manager (browser), fixed_ui_info, -1, &error);
+ if (data->fixed_merge_id == 0) {
+ g_warning ("building ui failed: %s", error->message);
+ g_error_free (error);
+ }
+
file_view = gth_file_list_get_view (GTH_FILE_LIST (gth_browser_get_file_list (browser)));
g_signal_connect (file_view,
"drag_data_received",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]