mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Removed mc_main_error_quark() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
4005b7924e
commit
746653fda2
@ -53,7 +53,7 @@ mc_event_init (GError ** mcerror)
|
||||
if (mc_event_grouplist != NULL)
|
||||
{
|
||||
g_propagate_error (mcerror,
|
||||
g_error_new (mc_main_error_quark (), 1,
|
||||
g_error_new (MC_ERROR, 1,
|
||||
_("Event system already initialized")));
|
||||
return FALSE;
|
||||
}
|
||||
@ -65,7 +65,7 @@ mc_event_init (GError ** mcerror)
|
||||
if (mc_event_grouplist == NULL)
|
||||
{
|
||||
g_propagate_error (mcerror,
|
||||
g_error_new (mc_main_error_quark (), 2,
|
||||
g_error_new (MC_ERROR, 2,
|
||||
_("Failed to initialize event system")));
|
||||
return FALSE;
|
||||
}
|
||||
@ -81,7 +81,7 @@ mc_event_deinit (GError ** mcerror)
|
||||
if (mc_event_grouplist == NULL)
|
||||
{
|
||||
g_propagate_error (mcerror,
|
||||
g_error_new (mc_main_error_quark (), 1,
|
||||
g_error_new (MC_ERROR, 1,
|
||||
_("Event system not initialized")));
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ mc_event_add (const gchar * event_group_name, const gchar * event_name,
|
||||
|| event_callback == NULL)
|
||||
{
|
||||
g_propagate_error (mcerror,
|
||||
g_error_new (mc_main_error_quark (), 1,
|
||||
g_error_new (MC_ERROR, 1,
|
||||
_("Check input data! Some of parameters are NULL!")));
|
||||
return FALSE;
|
||||
}
|
||||
@ -171,7 +171,7 @@ mc_event_get_event_group_by_name (const gchar * event_group_name, gboolean creat
|
||||
if (event_group == NULL)
|
||||
{
|
||||
g_propagate_error (mcerror,
|
||||
g_error_new (mc_main_error_quark (), 1,
|
||||
g_error_new (MC_ERROR, 1,
|
||||
_("Unable to create group '%s' for events!"),
|
||||
event_group_name));
|
||||
return NULL;
|
||||
@ -196,7 +196,7 @@ mc_event_get_event_by_name (GTree * event_group, const gchar * event_name, gbool
|
||||
if (callbacks == NULL)
|
||||
{
|
||||
g_propagate_error (mcerror,
|
||||
g_error_new (mc_main_error_quark (), 1,
|
||||
g_error_new (MC_ERROR, 1,
|
||||
_("Unable to create event '%s'!"), event_name));
|
||||
return NULL;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#define MC_ERROR mc_main_error_quark ()
|
||||
#define MC_ERROR g_quark_from_static_string (PACKAGE)
|
||||
|
||||
/*** enums ***************************************************************************************/
|
||||
|
||||
@ -268,7 +268,6 @@ extern mc_global_t mc_global;
|
||||
/*** declarations of public functions ************************************************************/
|
||||
|
||||
void refresh_screen (void *);
|
||||
GQuark mc_main_error_quark (void);
|
||||
|
||||
/*** inline functions ****************************************************************************/
|
||||
#endif
|
||||
|
@ -65,9 +65,7 @@ mc_config_new_or_override_file (mc_config_t * mc_config, const gchar * ini_path,
|
||||
fd = mc_open (ini_path, O_WRONLY | O_TRUNC | O_SYNC, 0);
|
||||
if (fd == -1)
|
||||
{
|
||||
g_propagate_error (error,
|
||||
g_error_new (mc_main_error_quark (), 0, "%s",
|
||||
unix_error_string (errno)));
|
||||
g_propagate_error (error, g_error_new (MC_ERROR, 0, "%s", unix_error_string (errno)));
|
||||
g_free (data);
|
||||
return FALSE;
|
||||
}
|
||||
@ -81,9 +79,7 @@ mc_config_new_or_override_file (mc_config_t * mc_config, const gchar * ini_path,
|
||||
if (cur_written == -1)
|
||||
{
|
||||
mc_util_restore_from_backup_if_possible (ini_path, "~");
|
||||
g_propagate_error (error,
|
||||
g_error_new (mc_main_error_quark (), 0, "%s",
|
||||
unix_error_string (errno)));
|
||||
g_propagate_error (error, g_error_new (MC_ERROR, 0, "%s", unix_error_string (errno)));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -268,15 +268,6 @@ init_sigchld (void)
|
||||
/*** public functions ****************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
/** Define this function for glib-style error handling */
|
||||
GQuark
|
||||
mc_main_error_quark (void)
|
||||
{
|
||||
return g_quark_from_static_string (PACKAGE);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
int
|
||||
do_cd (const char *new_dir, enum cd_enum exact)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user