Commit cb037e32 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Remove show/hide buttons. The entries can be toggled directly using mouse

2008-04-07  Christian Neumair  <cneumair@gnome.org>

	* libnautilus-private/nautilus-column-chooser.c (update_buttons),
	(add_buttons):
	Remove show/hide buttons. The entries can be toggled directly using
	mouse or keyboard. Do not remove buttons to move entries, since
	list DND may not be obvious for some users (#514394). Thanks to Marcin
	Galazka.

svn path=/trunk/; revision=14044
parent fbb8e2f2
2008-04-07 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-column-chooser.c (update_buttons),
(add_buttons):
Remove show/hide buttons. The entries can be toggled directly using
mouse or keyboard. Do not remove buttons to move entries, since
list DND may not be obvious for some users (#514394). Thanks to Marcin
Galazka.
2008-04-05 Cosimo Cecchi <cosimoc@gnome.org>
* libnautilus-private/nautilus-autorun.c:
......
......@@ -50,8 +50,6 @@ struct _NautilusColumnChooserDetails
GtkWidget *move_up_button;
GtkWidget *move_down_button;
GtkWidget *show_button;
GtkWidget *hide_button;
GtkWidget *use_default_button;
};
......@@ -134,19 +132,11 @@ update_buttons (NautilusColumnChooser *chooser)
!top);
gtk_widget_set_sensitive (chooser->details->move_down_button,
!bottom);
gtk_widget_set_sensitive (chooser->details->show_button,
!visible);
gtk_widget_set_sensitive (chooser->details->hide_button,
visible);
} else {
gtk_widget_set_sensitive (chooser->details->move_up_button,
FALSE);
gtk_widget_set_sensitive (chooser->details->move_down_button,
FALSE);
gtk_widget_set_sensitive (chooser->details->show_button,
FALSE);
gtk_widget_set_sensitive (chooser->details->hide_button,
FALSE);
}
}
......@@ -257,24 +247,6 @@ add_tree_view (NautilusColumnChooser *chooser)
gtk_box_pack_start (GTK_BOX (chooser), scrolled, TRUE, TRUE, 0);
}
static void
set_selection_visible (NautilusColumnChooser *chooser, gboolean visible)
{
GtkTreeIter iter;
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection (chooser->details->view);
if (gtk_tree_selection_get_selected (selection, NULL, &iter)) {
gtk_list_store_set (chooser->details->store,
&iter,
COLUMN_VISIBLE, visible,
-1);
}
list_changed (chooser);
}
static void
move_up_clicked_callback (GtkWidget *button, gpointer user_data)
{
......@@ -329,18 +301,6 @@ move_down_clicked_callback (GtkWidget *button, gpointer user_data)
list_changed (chooser);
}
static void
show_clicked_callback (GtkWidget *button, gpointer user_data)
{
set_selection_visible (NAUTILUS_COLUMN_CHOOSER (user_data), TRUE);
}
static void
hide_clicked_callback (GtkWidget *button, gpointer user_data)
{
set_selection_visible (NAUTILUS_COLUMN_CHOOSER (user_data), FALSE);
}
static void
use_default_clicked_callback (GtkWidget *button, gpointer user_data)
{
......@@ -391,25 +351,6 @@ add_buttons (NautilusColumnChooser *chooser)
gtk_box_pack_start (GTK_BOX (box), chooser->details->move_down_button,
FALSE, FALSE, 0);
chooser->details->show_button = gtk_button_new_with_mnemonic (_("_Show"));
g_signal_connect (chooser->details->show_button,
"clicked", G_CALLBACK (show_clicked_callback),
chooser);
gtk_widget_set_sensitive (chooser->details->show_button, FALSE);
gtk_widget_show (chooser->details->show_button);
gtk_box_pack_start (GTK_BOX (box), chooser->details->show_button,
FALSE, FALSE, 0);
chooser->details->hide_button = gtk_button_new_with_mnemonic (_("Hi_de"));
g_signal_connect (chooser->details->hide_button,
"clicked", G_CALLBACK (hide_clicked_callback),
chooser);
gtk_widget_set_sensitive (chooser->details->hide_button, FALSE);
gtk_widget_show (chooser->details->hide_button);
gtk_box_pack_start (GTK_BOX (box), chooser->details->hide_button,
FALSE, FALSE, 0);
separator = gtk_hseparator_new ();
gtk_widget_show (separator);
gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0);
......
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