[Frugalware-darcs] fw-control-center: gnetconfig: get rid of the
errortype arg in gn_error()
Priyank
priyank at frugalware.org
Wed Jun 20 10:08:37 CEST 2007
Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=fw-control-center;a=darcs_commitdiff;h=20070620071131-5ce2c-a7cc74299203f68b795411cf19a007dd9f8e88b1.gz;
[gnetconfig: get rid of the errortype arg in gn_error()
Priyank <priyank at frugalware.org>**20070620071131] {
hunk ./gnetconfig/src/gnetconfig-interface.c 462
- gn_error ("Couldn't read hostname.", ERROR_GUI);
+ gn_error (_("Couldn't read hostname."));
hunk ./gnetconfig/src/gnetconfig-interface.c 584
- gn_error (_("The was an error deleting the profile."), ERROR_GUI);
+ gn_error (_("The was an error deleting the profile."));
hunk ./gnetconfig/src/gnetconfig-interface.c 598
- gn_error ("You cannot delete an active network profile.", ERROR_GUI);
+ gn_error ("You cannot delete an active network profile.");
hunk ./gnetconfig/src/gnetconfig-interface.c 642
- gn_error ("Unknown error.", ERROR_GUI);
+ gn_error ("Unknown error.");
hunk ./gnetconfig/src/gnetconfig-interface.c 646
- gn_error ("Interface is already started.", ERROR_GUI);
+ gn_error ("Interface is already started.");
hunk ./gnetconfig/src/gnetconfig-interface.c 687
- gn_error ("Unknown error.", ERROR_GUI);
+ gn_error ("Unknown error.");
hunk ./gnetconfig/src/gnetconfig-interface.c 691
- gn_error ("Interface is not running.", ERROR_GUI);
+ gn_error ("Interface is not running.");
hunk ./gnetconfig/src/gnetconfig-interface.c 842
- gn_error ("No network interface found.", ERROR_GUI);
+ gn_error ("No network interface found.");
hunk ./gnetconfig/src/gnetconfig-interface.c 880
- gn_error ("Unknown error.", ERROR_GUI);
+ gn_error ("Unknown error.");
hunk ./gnetconfig/src/gnetconfig-interface.c 888
- gn_error ("The selected interface is running. Please stop it first.", ERROR_GUI);
+ gn_error ("The selected interface is running. Please stop it first.");
hunk ./gnetconfig/src/gnetconfig-interface.c 1123
- gn_error ("Enter a valid ip address", ERROR_GUI);
+ gn_error ("Enter a valid ip address");
hunk ./gnetconfig/src/gnetconfig-interface.c 1282
- gn_error (_("Required fields for DSL connection cannot be left blank."), ERROR_GUI);
+ gn_error (_("Required fields for DSL connection cannot be left blank."));
hunk ./gnetconfig/src/gnetconfig-interface.c 1287
- gn_error (_("PPPoE passwords do not match. Please re-enter."), ERROR_GUI);
+ gn_error (_("PPPoE passwords do not match. Please re-enter."));
hunk ./gnetconfig/src/gnetconfig-interface_detect.c 131
- gn_error ("Error opening /proc/net/dev", ERROR_CONSOLE);
+ gn_error (_("Error opening /proc/net/dev"));
hunk ./gnetconfig/src/gnetconfig-interface_detect.c 206
- gn_error ("The selected interface is already configured. Please select another interface", ERROR_GUI);
+ gn_error ("The selected interface is already configured. Please select another interface");
hunk ./gnetconfig/src/gnetconfig-messages.c 29
-gn_error (const char *error_str, ErrorType type)
+gn_error (const char *error_str)
hunk ./gnetconfig/src/gnetconfig-messages.c 31
+ GtkWidget *error_dlg = NULL;
+
hunk ./gnetconfig/src/gnetconfig-messages.c 35
- if (type == ERROR_CONSOLE)
- {
- fprintf (stderr, "\n\033[1;31m%s ==>\033[0;1m %s\033[1;0m\n", _("ERROR"), error_str);
- }
- else if (type == ERROR_GUI)
- {
- GtkWidget *error_dlg;
hunk ./gnetconfig/src/gnetconfig-messages.c 36
- error_dlg = gtk_message_dialog_new (GTK_WINDOW(gn_main_window),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- "%s",
- error_str);
- gtk_window_set_resizable (GTK_WINDOW(error_dlg), FALSE);
- gtk_dialog_run (GTK_DIALOG(error_dlg));
- gtk_widget_destroy (error_dlg);
- }
+ error_dlg = gtk_message_dialog_new (GTK_WINDOW(gn_main_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ "%s",
+ error_str);
+ gtk_window_set_resizable (GTK_WINDOW(error_dlg), FALSE);
+ gtk_dialog_run (GTK_DIALOG(error_dlg));
+ gtk_widget_destroy (error_dlg);
+
hunk ./gnetconfig/src/gnetconfig-messages.h 14
-typedef enum _errortype
-{
- ERROR_CONSOLE = 1, /* Display error on the console */
- ERROR_GUI /* Display error on gui */
-} ErrorType;
-
-void gn_error (const char *, ErrorType);
+void gn_error (const char *);
hunk ./gnetconfig/src/gnetconfig-new_interface.c 190
- gn_error (_("There is already an interface configured for DSL connection."), ERROR_GUI);
+ gn_error (_("There is already an interface configured for DSL connection."));
hunk ./gnetconfig/src/gnetconfig-new_interface.c 252
- gn_error ("Error allocating memory for new interface.", ERROR_GUI);
+ gn_error ("Error allocating memory for new interface.");
hunk ./gnetconfig/src/gnetconfig-new_interface.c 257
- gn_error ("No connection type selected. Please select a connection type first.", ERROR_GUI);
+ gn_error ("No connection type selected. Please select a connection type first.");
hunk ./gnetconfig/src/gnetconfig-new_interface.c 269
- gn_error ("Required fields cannot be blank.", ERROR_GUI);
+ gn_error ("Required fields cannot be blank.");
hunk ./gnetconfig/src/gnetconfig-new_interface.c 315
- gn_error (_("Required fields for DSL connection cannot be left blank."), ERROR_GUI);
+ gn_error (_("Required fields for DSL connection cannot be left blank."));
hunk ./gnetconfig/src/gnetconfig-new_interface.c 321
- gn_error (_("PPPoE passwords do not match. Please re-enter."), ERROR_GUI);
+ gn_error (_("PPPoE passwords do not match. Please re-enter."));
hunk ./gnetconfig/src/gnetconfig-new_profile.c 64
- gn_error (_("A profile with this name already exists. Please provide a unique profile name."), ERROR_GUI);
+ gn_error (_("A profile with this name already exists. Please provide a unique profile name."));
hunk ./gnetconfig/src/gnetconfig-new_profile.c 73
- gn_error ("Error setting up new profile", ERROR_GUI);
+ gn_error ("Error setting up new profile");
hunk ./gnetconfig/src/gnetconfig-new_profile.c 95
- gn_error ("Error creating profile.", ERROR_GUI);
+ gn_error ("Error creating profile.");
hunk ./gnetconfig/src/gnetconfig-new_profile.c 114
- gn_error (_("Please enter a valid description for the new profile or click the Cancel button to contiune without entering a description."), ERROR_GUI);
+ gn_error (_("Please enter a valid description for the new profile or click the Cancel button to contiune without entering a description."));
hunk ./gnetconfig/src/gnetconfig.c 53
- gn_error (_("Gnetconfig should be run as root."), ERROR_GUI);
+ gn_error (_("Gnetconfig should be run as root."));
hunk ./gnetconfig/src/gnetconfig.c 63
- gn_error (_("Failed to initialize interface."), ERROR_CONSOLE);
+ g_error (_("Failed to initialize interface."));
}
More information about the Frugalware-darcs
mailing list