[nautilus-actions] Do not let the user click twice on a sort button
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Do not let the user click twice on a sort button
- Date: Fri, 9 Apr 2010 07:17:07 +0000 (UTC)
commit f5fcfcd5aa135eb0f98fd8ad11dfe9e87ac2ac9c
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Apr 9 01:04:51 2010 +0200
Do not let the user click twice on a sort button
ChangeLog | 4 ++++
TODO | 4 ++--
src/nact/nact-sort-buttons.c | 18 ++++++++++++++++++
3 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7202138..b9d6955 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-04-08 Pierre Wieser <pwieser trychlos org>
+ * src/nact/nact-sort-buttons.c (on_sort_down_button_toggled,
+ on_sort_manual_button_toggled, on_sort_up_button_toggled):
+ Do not let the user click twice on a sort button.
+
* src/nact/nact-main-window.c (setup_dialog_title):
Review/normalize debug entry message.
diff --git a/TODO b/TODO
index 67bd7d3..44c0b30 100644
--- a/TODO
+++ b/TODO
@@ -140,7 +140,7 @@
- 20100408: gconf_concat_dir_and_key: have seen this as deprecated, but do not
find again the reference :(
+ not even in unstable library on the web
+ http://library.gnome.org/devel/gconf/unstable/gconf-gconf.html#gconf-concat-dir-and-key
- "x-nautilus-desktop:///" is rather a scheme than a folder
-
-- should not be able to click twice on a sort button
diff --git a/src/nact/nact-sort-buttons.c b/src/nact/nact-sort-buttons.c
index b07229b..cb0a00a 100644
--- a/src/nact/nact-sort-buttons.c
+++ b/src/nact/nact-sort-buttons.c
@@ -207,13 +207,19 @@ on_sort_down_button_toggled( GtkToggleButton *toggled_button, NactMainWindow *wi
{
GtkToggleButton *button;
+ g_debug( "nact_sort_buttons_on_sort_down_button_toggled: is_active=%s", gtk_toggle_button_get_active( toggled_button ) ? "True":"False" );
+
if( gtk_toggle_button_get_active( toggled_button )){
+ gtk_widget_set_sensitive( GTK_WIDGET( toggled_button ), FALSE );
+
button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "SortUpButton" ));
gtk_toggle_button_set_active( button, FALSE );
+ gtk_widget_set_sensitive( GTK_WIDGET( button ), TRUE );
button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "SortManualButton" ));
gtk_toggle_button_set_active( button, FALSE );
+ gtk_widget_set_sensitive( GTK_WIDGET( button ), TRUE );
set_new_sort_order( window, IPREFS_ORDER_ALPHA_DESCENDING );
}
@@ -224,13 +230,19 @@ on_sort_manual_button_toggled( GtkToggleButton *toggled_button, NactMainWindow *
{
GtkToggleButton *button;
+ g_debug( "nact_sort_buttons_on_sort_manual_button_toggled: is_active=%s", gtk_toggle_button_get_active( toggled_button ) ? "True":"False" );
+
if( gtk_toggle_button_get_active( toggled_button )){
+ gtk_widget_set_sensitive( GTK_WIDGET( toggled_button ), FALSE );
+
button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "SortUpButton" ));
gtk_toggle_button_set_active( button, FALSE );
+ gtk_widget_set_sensitive( GTK_WIDGET( button ), TRUE );
button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "SortDownButton" ));
gtk_toggle_button_set_active( button, FALSE );
+ gtk_widget_set_sensitive( GTK_WIDGET( button ), TRUE );
set_new_sort_order( window, IPREFS_ORDER_MANUAL );
}
@@ -241,13 +253,19 @@ on_sort_up_button_toggled( GtkToggleButton *toggled_button, NactMainWindow *wind
{
GtkToggleButton *button;
+ g_debug( "nact_sort_buttons_on_sort_up_button_toggled: is_active=%s", gtk_toggle_button_get_active( toggled_button ) ? "True":"False" );
+
if( gtk_toggle_button_get_active( toggled_button )){
+ gtk_widget_set_sensitive( GTK_WIDGET( toggled_button ), FALSE );
+
button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "SortDownButton" ));
gtk_toggle_button_set_active( button, FALSE );
+ gtk_widget_set_sensitive( GTK_WIDGET( button ), TRUE );
button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "SortManualButton" ));
gtk_toggle_button_set_active( button, FALSE );
+ gtk_widget_set_sensitive( GTK_WIDGET( button ), TRUE );
set_new_sort_order( window, IPREFS_ORDER_ALPHA_ASCENDING );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]