Commit b3864097 authored by Pierre Wieser's avatar Pierre Wieser

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.
parent f6a70475
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.
......
......@@ -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 );
}
......
......@@ -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.
*/
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
}
......
......@@ -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 );
......
......@@ -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 );
......
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