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)
|
if (mc_event_grouplist != NULL)
|
||||||
{
|
{
|
||||||
g_propagate_error (mcerror,
|
g_propagate_error (mcerror,
|
||||||
g_error_new (mc_main_error_quark (), 1,
|
g_error_new (MC_ERROR, 1,
|
||||||
_("Event system already initialized")));
|
_("Event system already initialized")));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ mc_event_init (GError ** mcerror)
|
|||||||
if (mc_event_grouplist == NULL)
|
if (mc_event_grouplist == NULL)
|
||||||
{
|
{
|
||||||
g_propagate_error (mcerror,
|
g_propagate_error (mcerror,
|
||||||
g_error_new (mc_main_error_quark (), 2,
|
g_error_new (MC_ERROR, 2,
|
||||||
_("Failed to initialize event system")));
|
_("Failed to initialize event system")));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ mc_event_deinit (GError ** mcerror)
|
|||||||
if (mc_event_grouplist == NULL)
|
if (mc_event_grouplist == NULL)
|
||||||
{
|
{
|
||||||
g_propagate_error (mcerror,
|
g_propagate_error (mcerror,
|
||||||
g_error_new (mc_main_error_quark (), 1,
|
g_error_new (MC_ERROR, 1,
|
||||||
_("Event system not initialized")));
|
_("Event system not initialized")));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ mc_event_add (const gchar * event_group_name, const gchar * event_name,
|
|||||||
|| event_callback == NULL)
|
|| event_callback == NULL)
|
||||||
{
|
{
|
||||||
g_propagate_error (mcerror,
|
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!")));
|
_("Check input data! Some of parameters are NULL!")));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -171,7 +171,7 @@ mc_event_get_event_group_by_name (const gchar * event_group_name, gboolean creat
|
|||||||
if (event_group == NULL)
|
if (event_group == NULL)
|
||||||
{
|
{
|
||||||
g_propagate_error (mcerror,
|
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!"),
|
_("Unable to create group '%s' for events!"),
|
||||||
event_group_name));
|
event_group_name));
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -196,7 +196,7 @@ mc_event_get_event_by_name (GTree * event_group, const gchar * event_name, gbool
|
|||||||
if (callbacks == NULL)
|
if (callbacks == NULL)
|
||||||
{
|
{
|
||||||
g_propagate_error (mcerror,
|
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));
|
_("Unable to create event '%s'!"), event_name));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MC_ERROR mc_main_error_quark ()
|
#define MC_ERROR g_quark_from_static_string (PACKAGE)
|
||||||
|
|
||||||
/*** enums ***************************************************************************************/
|
/*** enums ***************************************************************************************/
|
||||||
|
|
||||||
@ -268,7 +268,6 @@ extern mc_global_t mc_global;
|
|||||||
/*** declarations of public functions ************************************************************/
|
/*** declarations of public functions ************************************************************/
|
||||||
|
|
||||||
void refresh_screen (void *);
|
void refresh_screen (void *);
|
||||||
GQuark mc_main_error_quark (void);
|
|
||||||
|
|
||||||
/*** inline functions ****************************************************************************/
|
/*** inline functions ****************************************************************************/
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <errno.h> /* extern int errno */
|
#include <errno.h> /* extern int errno */
|
||||||
|
|
||||||
#include "lib/global.h"
|
#include "lib/global.h"
|
||||||
#include "lib/vfs/vfs.h" /* mc_stat */
|
#include "lib/vfs/vfs.h" /* mc_stat */
|
||||||
#include "lib/util.h"
|
#include "lib/util.h"
|
||||||
#include "lib/mcconfig.h"
|
#include "lib/mcconfig.h"
|
||||||
|
|
||||||
@ -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);
|
fd = mc_open (ini_path, O_WRONLY | O_TRUNC | O_SYNC, 0);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
g_propagate_error (error,
|
g_propagate_error (error, g_error_new (MC_ERROR, 0, "%s", unix_error_string (errno)));
|
||||||
g_error_new (mc_main_error_quark (), 0, "%s",
|
|
||||||
unix_error_string (errno)));
|
|
||||||
g_free (data);
|
g_free (data);
|
||||||
return FALSE;
|
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)
|
if (cur_written == -1)
|
||||||
{
|
{
|
||||||
mc_util_restore_from_backup_if_possible (ini_path, "~");
|
mc_util_restore_from_backup_if_possible (ini_path, "~");
|
||||||
g_propagate_error (error,
|
g_propagate_error (error, g_error_new (MC_ERROR, 0, "%s", unix_error_string (errno)));
|
||||||
g_error_new (mc_main_error_quark (), 0, "%s",
|
|
||||||
unix_error_string (errno)));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,15 +268,6 @@ init_sigchld (void)
|
|||||||
/*** public functions ****************************************************************************/
|
/*** public functions ****************************************************************************/
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/** Define this function for glib-style error handling */
|
|
||||||
GQuark
|
|
||||||
mc_main_error_quark (void)
|
|
||||||
{
|
|
||||||
return g_quark_from_static_string (PACKAGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
int
|
int
|
||||||
do_cd (const char *new_dir, enum cd_enum exact)
|
do_cd (const char *new_dir, enum cd_enum exact)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user