Commit f6920980 authored by Alexander Schwinn's avatar Alexander Schwinn

adwdwad

parent 8229a222
......@@ -772,7 +772,7 @@ thunar_window_init (ThunarWindow *window)
/* The UCA shortcuts and the bookmarks need to be checked 'by hand', since we dont want to permanently keep menu items for them */
//g_signal_connect (window, "key-press-event", G_CALLBACK (thunar_window_check_uca_key_activation), NULL);
//g_signal_connect (window, "key-press-event", G_CALLBACK (thunar_window_check_bookmark_key_activation), NULL);
g_signal_connect (window, "key-press-event", G_CALLBACK (thunar_window_check_bookmark_key_activation), NULL);
/* add the location bar to the toolbar */
tool_item = gtk_tool_item_new ();
......@@ -2274,6 +2274,12 @@ thunar_window_bookmark_add_menu_item (GFile *g_file,
tooltip = g_strdup_printf (_("Open the location \"%s\""), parse_name);
g_free (parse_name);
XfceGtkActionEntry entry[1];
entry[0].accel_path = accel_path;
entry[0].callback = thunar_window_action_open_bookmark;
xfce_gtk_accel_map_add_entries (entry, G_N_ELEMENTS (entry));
xfce_gtk_accel_group_connect_action_entries (window->accel_group, entry, G_N_ELEMENTS (entry), window);
icon_theme = gtk_icon_theme_get_for_screen (gtk_window_get_screen (GTK_WINDOW (window)));
if (g_file_has_uri_scheme (g_file, "file"))
......@@ -3194,10 +3200,12 @@ thunar_window_bookmark_check_key (GFile *g_file,
GtkAccelKey key;
accel_path = thunar_window_bookmark_get_accel_path (g_file);
printf("accel_path: $s\n", accel_path);
if (gtk_accel_map_lookup_entry (accel_path, &key) == TRUE)
{
if (g_ascii_tolower (window->latest_key_event->keyval) == g_ascii_tolower (key.accel_key))
{
printf("keyval match\n");
if ((window->latest_key_event->state & gtk_accelerator_get_default_mod_mask ()) == key.accel_mods)
thunar_window_set_current_directory_gfile (window, g_file);
}
......@@ -3271,8 +3279,10 @@ thunar_window_action_open_bookmark (ThunarWindow *window,
{
GFile *bookmark_location;
GtkWidget *win=gdk_screen_get_active_window(gdk_screen_get_default());
bookmark_location = g_object_get_data (G_OBJECT (menu_item), I_("g-file"));
thunar_window_set_current_directory_gfile (THUNAR_WINDOW (window), bookmark_location);
thunar_window_set_current_directory_gfile (THUNAR_WINDOW (win), bookmark_location);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment