Don't focus the path bar buttons (and the others on the same 'toolbar') on

2007-07-24  Christian Persch  <chpe@gnome.org>

	* src/nautilus-navigation-window.c: (location_button_create),
	(nautilus_navigation_window_init):
	* src/nautilus-pathbar.c: (get_slider_button),
	(make_directory_button):
	* src/nautilus-zoom-control.c: (nautilus_zoom_control_finalize),
	(nautilus_zoom_control_instance_init),
	(nautilus_zoom_control_class_init): Don't focus the path bar buttons
	(and the others on the same 'toolbar') on click, for consistency with
	toolbars, and the gtk filechooser path bar. Bug #326774.

svn path=/trunk/; revision=13024
This commit is contained in:
Christian Persch 2007-07-24 15:19:29 +00:00 committed by Christian Persch
parent a24d945a95
commit 32ec3056f6
4 changed files with 22 additions and 2 deletions

View file

@ -1,3 +1,15 @@
2007-07-24 Christian Persch <chpe@gnome.org>
* src/nautilus-navigation-window.c: (location_button_create),
(nautilus_navigation_window_init):
* src/nautilus-pathbar.c: (get_slider_button),
(make_directory_button):
* src/nautilus-zoom-control.c: (nautilus_zoom_control_finalize),
(nautilus_zoom_control_instance_init),
(nautilus_zoom_control_class_init): Don't focus the path bar buttons
(and the others on the same 'toolbar') on click, for consistency with
toolbars, and the gtk filechooser path bar. Bug #326774.
2007-07-24 Alexander Larsson <alexl@redhat.com>
* configure.in:

View file

@ -179,6 +179,7 @@ location_button_create (NautilusNavigationWindow *window)
button = g_object_new (GTK_TYPE_TOGGLE_BUTTON,
"image", image,
"focus-on-click", FALSE,
"active", location_button_should_be_active (window),
NULL);
@ -315,6 +316,7 @@ nautilus_navigation_window_init (NautilusNavigationWindow *window)
item, -1);
window->view_as_combo_box = gtk_combo_box_new_text ();
gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (window->view_as_combo_box), FALSE);
gtk_box_pack_end (GTK_BOX (view_as_menu_vbox), window->view_as_combo_box, TRUE, FALSE, 0);
gtk_widget_show (window->view_as_combo_box);
g_signal_connect_object (window->view_as_combo_box, "changed",

View file

@ -150,6 +150,7 @@ get_slider_button (NautilusPathBar *path_bar,
gtk_widget_push_composite_child ();
button = gtk_button_new ();
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
gtk_container_add (GTK_CONTAINER (button), gtk_arrow_new (arrow_type, GTK_SHADOW_OUT));
gtk_container_add (GTK_CONTAINER (path_bar), button);
gtk_widget_show_all (button);
@ -1330,6 +1331,7 @@ make_directory_button (NautilusPathBar *path_bar,
button_data->type = find_button_type (path_bar, path, button_data);
button_data->button = gtk_toggle_button_new ();
gtk_button_set_focus_on_click (GTK_BUTTON (button_data->button), FALSE);
switch (button_data->type) {
case ROOT_BUTTON:

View file

@ -114,7 +114,6 @@ static void
nautilus_zoom_control_finalize (GObject *object)
{
g_list_free (NAUTILUS_ZOOM_CONTROL (object)->details->preferred_zoom_levels);
g_free (NAUTILUS_ZOOM_CONTROL (object)->details);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -278,7 +277,7 @@ nautilus_zoom_control_instance_init (NautilusZoomControl *zoom_control)
GtkWidget *image;
int i;
zoom_control->details = g_new0 (NautilusZoomControlDetails, 1);
zoom_control->details = G_TYPE_INSTANCE_GET_PRIVATE (zoom_control, NAUTILUS_TYPE_ZOOM_CONTROL, NautilusZoomControlDetails);
zoom_control->details->zoom_level = NAUTILUS_ZOOM_LEVEL_STANDARD;
zoom_control->details->min_zoom_level = NAUTILUS_ZOOM_LEVEL_SMALLEST;
@ -294,6 +293,7 @@ nautilus_zoom_control_instance_init (NautilusZoomControl *zoom_control)
image = gtk_image_new_from_stock (GTK_STOCK_ZOOM_OUT, GTK_ICON_SIZE_MENU);
zoom_control->details->zoom_out = gtk_button_new ();
gtk_button_set_focus_on_click (GTK_BUTTON (zoom_control->details->zoom_out), FALSE);
gtk_button_set_relief (GTK_BUTTON (zoom_control->details->zoom_out),
GTK_RELIEF_NONE);
g_signal_connect (G_OBJECT (zoom_control->details->zoom_out),
@ -304,6 +304,7 @@ nautilus_zoom_control_instance_init (NautilusZoomControl *zoom_control)
zoom_control->details->zoom_out, FALSE, FALSE, 0);
zoom_control->details->zoom_button = gtk_button_new ();
gtk_button_set_focus_on_click (GTK_BUTTON (zoom_control->details->zoom_button), FALSE);
gtk_button_set_relief (GTK_BUTTON (zoom_control->details->zoom_button),
GTK_RELIEF_NONE);
@ -339,6 +340,7 @@ nautilus_zoom_control_instance_init (NautilusZoomControl *zoom_control)
image = gtk_image_new_from_stock (GTK_STOCK_ZOOM_IN, GTK_ICON_SIZE_MENU);
zoom_control->details->zoom_in = gtk_button_new ();
gtk_button_set_focus_on_click (GTK_BUTTON (zoom_control->details->zoom_in), FALSE);
gtk_button_set_relief (GTK_BUTTON (zoom_control->details->zoom_in),
GTK_RELIEF_NONE);
g_signal_connect (G_OBJECT (zoom_control->details->zoom_in),
@ -714,6 +716,8 @@ nautilus_zoom_control_class_init (NautilusZoomControlClass *class)
"change_value",
1, GTK_TYPE_SCROLL_TYPE,
GTK_SCROLL_STEP_UP);
g_type_class_add_private (G_OBJECT_CLASS (class), sizeof (NautilusZoomControlDetails));
}
static gboolean