[nautilus-actions] Remove base_window_error_dlg() and base_window_yesno_dlg() functions
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Remove base_window_error_dlg() and base_window_yesno_dlg() functions
- Date: Mon, 24 Jan 2011 19:39:46 +0000 (UTC)
commit b3864097806adf5996e3c06856269bebbdd95f77
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Jan 21 23:27:15 2011 +0100
Remove base_window_error_dlg() and base_window_yesno_dlg() functions
+ src/nact/base-assistant.c:
+ src/nact/nact-main-menubar-edit.c:
+ src/nact/nact-main-menubar-file.c:
+ src/nact/nact-main-window.c:
+ src/nact/nact-window.c: Updated accordingly.
ChangeLog | 10 +++++++++-
src/nact/base-assistant.c | 2 +-
src/nact/base-window.c | 16 ++--------------
src/nact/base-window.h | 3 ---
src/nact/nact-main-menubar-edit.c | 6 ++----
src/nact/nact-main-menubar-file.c | 6 +++---
src/nact/nact-main-window.c | 4 ++--
src/nact/nact-window.c | 2 +-
8 files changed, 20 insertions(+), 29 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8c673b8..2bdbad6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,15 @@
2011-01-21 Pierre Wieser <pwieser trychlos org>
* src/nact/base-window.c:
- * src/nact/base-window.h: Remove unused properties.
+ * src/nact/base-window.h:
+ Remove unused properties.
+ (base_window_error_dlg, base_window_yesno_dlg): Removed functions.
+
+ * src/nact/base-assistant.c:
+ * src/nact/nact-main-menubar-edit.c:
+ * src/nact/nact-main-menubar-file.c:
+ * src/nact/nact-main-window.c
+ * src/nact/nact-window.c: Updated accordingly.
* src/nact/base-window-class.h: Removed file.
diff --git a/src/nact/base-assistant.c b/src/nact/base-assistant.c
index 60a21fd..c7dcd4f 100644
--- a/src/nact/base-assistant.c
+++ b/src/nact/base-assistant.c
@@ -575,7 +575,7 @@ assistant_do_cancel( BaseAssistant *window, GtkAssistant *assistant )
( window->private->warn_on_escape && window->private->escape_key_pressed )){
first = g_strdup( _( "Are you sure you want to quit this assistant ?" ));
- ok = base_window_yesno_dlg( BASE_WINDOW( window ), GTK_MESSAGE_QUESTION, first, NULL );
+ ok = base_window_display_yesno_dlg( BASE_WINDOW( window ), first, NULL );
g_free( first );
}
diff --git a/src/nact/base-window.c b/src/nact/base-window.c
index 3b8d8a0..e75c3b2 100644
--- a/src/nact/base-window.c
+++ b/src/nact/base-window.c
@@ -1303,7 +1303,7 @@ search_for_child_widget( GtkContainer *container, const gchar *name )
void
base_window_display_error_dlg( const BaseWindow *parent, const gchar *primary, const gchar *secondary )
{
- display_dlg( parent, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, primary, secondary );
+ display_dlg( parent, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, primary, secondary );
}
/**
@@ -1323,7 +1323,7 @@ base_window_display_yesno_dlg( const BaseWindow *parent, const gchar *primary, c
{
gint result;
- result = display_dlg( parent, GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, primary, secondary );
+ result = display_dlg( parent, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, primary, secondary );
return( result == GTK_RESPONSE_YES );
}
@@ -1380,18 +1380,6 @@ display_dlg( const BaseWindow *parent, GtkMessageType type_message, GtkButtonsTy
return( result );
}
-void
-base_window_error_dlg( const BaseWindow *window, GtkMessageType type, const gchar *primary, const gchar *secondary )
-{
- base_window_display_error_dlg( window, primary, secondary );
-}
-
-gboolean
-base_window_yesno_dlg( const BaseWindow *window, GtkMessageType type, const gchar *first, const gchar *second )
-{
- return( base_window_display_yesno_dlg( window, first, second ));
-}
-
/**
* Records a connected signal, to be disconnected at NactWindow dispose.
*/
diff --git a/src/nact/base-window.h b/src/nact/base-window.h
index df9318e..aeb18a0 100644
--- a/src/nact/base-window.h
+++ b/src/nact/base-window.h
@@ -241,9 +241,6 @@ void base_window_display_error_dlg ( const BaseWindow *parent, cons
gboolean base_window_display_yesno_dlg ( const BaseWindow *parent, const gchar *primary, const gchar *secondary );
void base_window_display_message_dlg( const BaseWindow *parent, GSList *message );
-void base_window_error_dlg( const BaseWindow *window, GtkMessageType type, const gchar *primary, const gchar *secondary );
-gboolean base_window_yesno_dlg( const BaseWindow *window, GtkMessageType type, const gchar *first, const gchar *second );
-
gulong base_window_signal_connect( BaseWindow *window, GObject *instance, const gchar *signal, GCallback fn );
gulong base_window_signal_connect_after( BaseWindow *window, GObject *instance, const gchar *signal, GCallback fn );
gulong base_window_signal_connect_by_name( BaseWindow *window, const gchar *name, const gchar *signal, GCallback fn );
diff --git a/src/nact/nact-main-menubar-edit.c b/src/nact/nact-main-menubar-edit.c
index a137ade..fcd33d3 100644
--- a/src/nact/nact-main-menubar-edit.c
+++ b/src/nact/nact-main-menubar-edit.c
@@ -236,9 +236,8 @@ nact_main_menubar_edit_on_cut( GtkAction *gtk_action, NactMainWindow *window )
if( non_deletables ){
gchar *second = na_core_utils_slist_join_at_end( non_deletables, "\n" );
- base_window_error_dlg(
+ base_window_display_error_dlg(
BASE_WINDOW( window ),
- GTK_MESSAGE_INFO,
_( "Not all items have been cut as following ones are not modifiable:" ),
second );
g_free( second );
@@ -486,9 +485,8 @@ nact_main_menubar_edit_on_delete( GtkAction *gtk_action, NactMainWindow *window
if( non_deletables ){
gchar *second = na_core_utils_slist_join_at_end( non_deletables, "\n" );
- base_window_error_dlg(
+ base_window_display_error_dlg(
BASE_WINDOW( window ),
- GTK_MESSAGE_INFO,
_( "Not all items have been deleted as following ones are not modifiable:" ),
second );
g_free( second );
diff --git a/src/nact/nact-main-menubar-file.c b/src/nact/nact-main-menubar-file.c
index 6cb3eda..667a0bc 100644
--- a/src/nact/nact-main-menubar-file.c
+++ b/src/nact/nact-main-menubar-file.c
@@ -322,7 +322,7 @@ nact_main_menubar_file_save_items( NactMainWindow *window )
} else {
msg = g_strdup( gettext( st_level_zero_write ));
}
- base_window_error_dlg( BASE_WINDOW( window ), GTK_MESSAGE_ERROR, gettext( st_save_error ), msg );
+ base_window_display_error_dlg( BASE_WINDOW( window ), gettext( st_save_error ), msg );
g_free( msg );
na_core_utils_slist_free( messages );
return;
@@ -340,7 +340,7 @@ nact_main_menubar_file_save_items( NactMainWindow *window )
} else {
msg = g_strdup( gettext( st_delete_error ));
}
- base_window_error_dlg( BASE_WINDOW( window ), GTK_MESSAGE_ERROR, gettext( st_save_error ), msg );
+ base_window_display_error_dlg( BASE_WINDOW( window ), gettext( st_save_error ), msg );
g_free( msg );
na_core_utils_slist_free( messages );
return;
@@ -373,7 +373,7 @@ nact_main_menubar_file_save_items( NactMainWindow *window )
if( g_slist_length( messages )){
msg = na_core_utils_slist_join_at_end( messages, "\n" );
- base_window_error_dlg( BASE_WINDOW( window ), GTK_MESSAGE_WARNING, gettext( st_save_warning ), msg );
+ base_window_display_error_dlg( BASE_WINDOW( window ), gettext( st_save_warning ), msg );
g_free( msg );
na_core_utils_slist_free( messages );
}
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 649671c..9a4c90f 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -1469,7 +1469,7 @@ confirm_for_giveup_from_menu( NactMainWindow *window )
second = g_strdup( _( "Do you really want to do this ?" ));
- reload_ok = base_window_yesno_dlg( BASE_WINDOW( window ), GTK_MESSAGE_QUESTION, first, second );
+ reload_ok = base_window_display_yesno_dlg( BASE_WINDOW( window ), first, second );
g_free( second );
g_free( first );
@@ -1505,7 +1505,7 @@ confirm_for_giveup_from_pivot( NactMainWindow *window )
second = g_strdup( _( "Do you want to reload a fresh list of actions ?" ));
- reload_ok = base_window_yesno_dlg( BASE_WINDOW( window ), GTK_MESSAGE_QUESTION, first, second );
+ reload_ok = base_window_display_yesno_dlg( BASE_WINDOW( window ), first, second );
g_free( second );
g_free( first );
diff --git a/src/nact/nact-window.c b/src/nact/nact-window.c
index 2db951c..9bec5d4 100644
--- a/src/nact/nact-window.c
+++ b/src/nact/nact-window.c
@@ -465,7 +465,7 @@ nact_window_warn_modified( NactWindow *window )
first = g_strdup_printf( _( "Some items have been modified." ));
second = g_strdup( _( "Are you sure you want to quit without saving them ?" ));
- confirm = base_window_yesno_dlg( BASE_WINDOW( window ), GTK_MESSAGE_QUESTION, first, second );
+ confirm = base_window_display_yesno_dlg( BASE_WINDOW( window ), first, second );
g_free( second );
g_free( first );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]