[nautilus-actions] No more check for non-empty profile label



commit 66e98915364f665fb6ee434738580edf3ec3e4a5
Author: Pierre Wieser <pwieser trychlos org>
Date:   Tue Aug 10 20:18:27 2010 +0200

    No more check for non-empty profile label

 ChangeLog                    |    6 ++++-
 TODO                         |    2 +
 src/nact/nact-icommand-tab.c |   43 ------------------------------------------
 3 files changed, 7 insertions(+), 44 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 47b2fb9..3174de6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
-2010-08-09 Pierre Wieser <pwieser trychlos org>
+2010-08-10 Pierre Wieser <pwieser trychlos org>
+
+	* src/nact/nact-icommand-tab.c: No more check for a non-empty profile name.
 
 	Allow writing of empty data.
 
@@ -69,6 +71,8 @@
 	(on_key_pressed_event): Only insert/delete rows if item is editable.
 	(on_must_match_toggled, on_must_not_match_toggled): Manage radio buttons.
 
+2010-08-09 Pierre Wieser <pwieser trychlos org>
+
 	Review notification bufferization.
 
 	* src/core/na-ipivot-consumer.c:
diff --git a/TODO b/TODO
index 32668c9..dc56351 100644
--- a/TODO
+++ b/TODO
@@ -28,6 +28,8 @@ N-A ENHANCEMENTS
 - 2010-07-27: while editing a new filter, making it duplicate, try to keep editing
   instead of terminating the edition and letting the old value
 
+- 2010-08-10: non-notification delay after save should be a preference
+
 - 2010-08-09: na-pivot:st_burst_timeout should be a preference
 
 - 2010-08-09: plugins should be able to provide a preference page
diff --git a/src/nact/nact-icommand-tab.c b/src/nact/nact-icommand-tab.c
index 2b0501b..b4c6990 100644
--- a/src/nact/nact-icommand-tab.c
+++ b/src/nact/nact-icommand-tab.c
@@ -84,7 +84,6 @@ static void       interface_base_finalize( NactICommandTabInterface *klass );
 static void       on_iactions_list_column_edited( NactICommandTab *instance, NAObject *object, gchar *text, gint column );
 static void       on_tab_updatable_selection_changed( NactICommandTab *instance, gint count_selected );
 
-static void       check_for_label( NactICommandTab *instance, GtkEntry *entry, const gchar *label );
 static GtkWidget *get_label_entry( NactICommandTab *instance );
 static GtkButton *get_legend_button( NactICommandTab *instance );
 static GtkWindow *get_legend_dialog( NactICommandTab *instance );
@@ -102,7 +101,6 @@ static void       on_path_changed( GtkEntry *entry, NactICommandTab *instance );
 static void       on_wdir_browse( GtkButton *button, NactICommandTab *instance );
 static void       on_wdir_changed( GtkEntry *entry, NactICommandTab *instance );
 static gchar     *parse_parameters( NactICommandTab *instance );
-static void       set_label_label( NactICommandTab *instance, const gchar *color );
 static void       update_example_label( NactICommandTab *instance, NAObjectProfile *profile );
 
 GType
@@ -386,7 +384,6 @@ on_tab_updatable_selection_changed( NactICommandTab *instance, gint count_select
 		label = profile ? na_object_get_label( profile ) : g_strdup( "" );
 		label = label ? label : g_strdup( "" );
 		gtk_entry_set_text( GTK_ENTRY( label_entry ), label );
-		check_for_label( instance, GTK_ENTRY( label_entry ), label );
 		g_free( label );
 		gtk_widget_set_sensitive( label_entry, profile != NULL );
 		nact_gtk_utils_set_editable( GTK_OBJECT( label_entry ), editable );
@@ -430,34 +427,6 @@ on_tab_updatable_selection_changed( NactICommandTab *instance, gint count_select
 	}
 }
 
-static void
-check_for_label( NactICommandTab *instance, GtkEntry *entry, const gchar *label )
-{
-	NAObjectProfile *profile;
-
-	nact_main_statusbar_hide_status(
-			NACT_MAIN_WINDOW( instance ),
-			ICOMMAND_TAB_STATUSBAR_CONTEXT );
-
-	set_label_label( instance, "black" );
-
-	g_object_get(
-			G_OBJECT( instance ),
-			TAB_UPDATABLE_PROP_SELECTED_PROFILE, &profile,
-			NULL );
-
-	if( profile && g_utf8_strlen( label, -1 ) == 0 ){
-
-		/* i18n: status bar message when the profile label is empty */
-		nact_main_statusbar_display_status(
-				NACT_MAIN_WINDOW( instance ),
-				ICOMMAND_TAB_STATUSBAR_CONTEXT,
-				_( "Caution: a label is mandatory for the profile." ));
-
-		set_label_label( instance, "red" );
-	}
-}
-
 static GtkWidget *
 get_label_entry( NactICommandTab *instance )
 {
@@ -554,7 +523,6 @@ on_label_changed( GtkEntry *entry, NactICommandTab *instance )
 			label = gtk_entry_get_text( entry );
 			na_object_set_label( profile, label );
 			g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, profile, TRUE );
-			check_for_label( instance, entry, label );
 		}
 	}
 }
@@ -869,17 +837,6 @@ parse_parameters( NactICommandTab *instance )
 }
 
 static void
-set_label_label( NactICommandTab *instance, const gchar *color_str )
-{
-	GtkWidget *label;
-	GdkColor color;
-
-	label = base_window_get_widget( BASE_WINDOW( instance ), "ProfileLabelLabel" );
-	gdk_color_parse( color_str, &color );
-	gtk_widget_modify_fg( label, GTK_STATE_NORMAL, &color );
-}
-
-static void
 update_example_label( NactICommandTab *instance, NAObjectProfile *profile )
 {
 	/*static const char *thisfn = "nact_iconditions_update_example_label";*/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]