diff options
author | Gene Z. Ragan <gzr@eazel.com> | 2000-10-19 02:17:41 +0000 |
---|---|---|
committer | Gene Ragan <gzr@src.gnome.org> | 2000-10-19 02:17:41 +0000 |
commit | 81e02d502f163679575c2df2b5d8763fb80952e6 (patch) | |
tree | 12940b3cff04afeb18066ef9e0d1c8abccecbf94 /src/nautilus-navigation-window.c | |
parent | f9b7f1ffe7d2bcadf999b14aeea4363bc2d95f0d (diff) | |
download | nautilus-81e02d502f163679575c2df2b5d8763fb80952e6.tar.gz |
Fixed bug 3705, Bookmark icons do not appear in the menu item
2000-10-18 Gene Z. Ragan <gzr@eazel.com>
Fixed bug 3705, Bookmark icons do not appear in the menu item
This was caused by a strange precedence issue in the setting of
UI component pixbuf data. If a menu item has alread been created,
setting the pixbuf data will have no effect. Either the verb for
the item has to be set with the data or the item has to have
its XML contructed with the pixbuf type and data included in it
at creation time. I have opted for the latter choice.
* libnautilus-extensions/nautilus-bonobo-extensions.c:
* libnautilus-extensions/nautilus-bonobo-extensions.h:
(nautilus_bonobo_add_menu_item):
Added setting of bitmap data if it is present as a
valid argument passed into the function.
* src/file-manager/fm-directory-view.c:
(add_open_with_app_bonobo_menu_item),
(add_open_with_viewer_bonobo_menu_item):
Call nautilus_bonobo_add_menu_item
* src/nautilus-window-menus.c: (append_bookmark_to_menu):
Call nautilus_bonobo_add_menu_item
* src/nautilus-window.c: (nautilus_window_filter),
(nautilus_window_realize), (view_menu_choose_view_callback),
(nautilus_window_show):
Work in progress to handle focus issues when performing
click drag operations in background windows.
* libnautilus-extensions/nautilus-gdk-extensions.c:
* libnautilus-extensions/nautilus-gdk-extensions.h:
(nautilus_gdk_window_set_wm_hints_input):
New function set input files of WM_HINTS. This
will be used later to handle click drag in background
windows.
Diffstat (limited to 'src/nautilus-navigation-window.c')
-rw-r--r-- | src/nautilus-navigation-window.c | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index f6aaa71c5..4b073c0fb 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -641,6 +641,40 @@ nautilus_window_close (NautilusWindow *window) gtk_widget_destroy (GTK_WIDGET (window)); } +#if 0 +#include <gdk/gdkx.h> +#include <gdk/gdkprivate.h> + +static GdkFilterReturn +nautilus_window_filter (GdkXEvent *xev, GdkEvent *event, gpointer data) +{ + XEvent *xevent = (XEvent *)xev; + + if ((Atom) xevent->xclient.data.l[0] == gdk_wm_delete_window) { + /* The delete window request specifies a window + * to delete. We don't actually destroy the + * window because "it is only a request". (The + * window might contain vital data that the + * program does not want destroyed). Instead + * the event is passed along to the program, + * which should then destroy the window. + */ + GDK_NOTE (EVENTS, g_message ("delete window:\t\twindow: %ld", xevent->xclient.window)); + + event->any.type = GDK_DELETE; + + return GDK_FILTER_TRANSLATE; + } else if ((Atom) xevent->xclient.data.l[0] == gdk_wm_take_focus) { + /* Check and see if we are in a drag. If not, Focus window and bring to front */ + nautilus_gdk_window_bring_to_front (GTK_WIDGET (data)->window); + + return GDK_FILTER_TRANSLATE; + } + + return GDK_FILTER_REMOVE; +} +#endif + static void nautilus_window_realize (GtkWidget *widget) { @@ -651,7 +685,13 @@ nautilus_window_realize (GtkWidget *widget) /* Create our GdkWindow */ NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, realize, (widget)); - + + /* Set window manager hints so click-drag from window to window works */ + nautilus_gdk_window_set_wm_hints_input (widget->window, FALSE); + + /* Add custom message filter to handle WM_TAKE_FOCUS */ + //gdk_add_client_message_filter (gdk_wm_protocols, nautilus_window_filter, widget); + /* Set the mini icon */ filename = nautilus_pixmap_file ("nautilus-mini-logo.png"); if (filename != NULL) { @@ -708,6 +748,7 @@ nautilus_window_size_request (GtkWidget *widget, } } + /* * Main API */ @@ -892,7 +933,7 @@ view_menu_choose_view_callback (GtkWidget *widget, gpointer data) */ nautilus_window_synch_content_view_menu (window); - nautilus_choose_component_for_file (window->details->viewed_file, + nautilus_choose_component_for_file (window->details->viewed_file, GTK_WINDOW (window), chose_component_callback, window); @@ -1804,7 +1845,7 @@ nautilus_window_show (GtkWidget *widget) nautilus_window_show_sidebar (window); } else { nautilus_window_hide_sidebar (window); - } + } } Bonobo_UIContainer |