mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-18 12:54:25 +01:00
Removed leftover references to Base in BaseNoGui.
This commit is contained in:
parent
d6bd77ec2b
commit
bc6b488cf6
@ -2257,15 +2257,7 @@ public class Base {
|
||||
* much of a bummer, but something to notify the user about.
|
||||
*/
|
||||
static public void showMessage(String title, String message) {
|
||||
if (title == null) title = _("Message");
|
||||
|
||||
if (commandLine) {
|
||||
System.out.println(title + ": " + message);
|
||||
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(new Frame(), message, title,
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
BaseNoGui.showMessage(title, message);
|
||||
}
|
||||
|
||||
|
||||
|
@ -275,7 +275,7 @@ public class BaseNoGui {
|
||||
}
|
||||
platform = (Platform) platformClass.newInstance();
|
||||
} catch (Exception e) {
|
||||
Base.showError(_("Problem Setting the Platform"),
|
||||
showError(_("Problem Setting the Platform"),
|
||||
_("An unknown error occurred while trying to load\n" +
|
||||
"platform-specific code for your machine."), e);
|
||||
}
|
||||
@ -413,7 +413,7 @@ public class BaseNoGui {
|
||||
+ "Library names must contain only basic letters and numbers.\n"
|
||||
+ "(ASCII only and no spaces, and it cannot start with a number)"),
|
||||
libName);
|
||||
Base.showMessage(_("Ignoring bad library name"), mess);
|
||||
showMessage(_("Ignoring bad library name"), mess);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -443,4 +443,11 @@ public class BaseNoGui {
|
||||
notifier.showError(title, message, e, exit_code);
|
||||
}
|
||||
|
||||
/**
|
||||
* "No cookie for you" type messages. Nothing fatal or all that
|
||||
* much of a bummer, but something to notify the user about.
|
||||
*/
|
||||
static public void showMessage(String title, String message) {
|
||||
notifier.showMessage(title, message);
|
||||
}
|
||||
}
|
||||
|
@ -22,4 +22,10 @@ public class BasicNotifier implements UserNotifier {
|
||||
System.exit(exit_code);
|
||||
}
|
||||
|
||||
public void showMessage(String title, String message) {
|
||||
if (title == null) title = _("Message");
|
||||
|
||||
System.out.println(title + ": " + message);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,4 +26,16 @@ public class GUINotifier implements UserNotifier {
|
||||
if (e != null) e.printStackTrace();
|
||||
System.exit(exit_code);
|
||||
}
|
||||
|
||||
/**
|
||||
* "No cookie for you" type messages. Nothing fatal or all that
|
||||
* much of a bummer, but something to notify the user about.
|
||||
*/
|
||||
public void showMessage(String title, String message) {
|
||||
if (title == null) title = _("Message");
|
||||
|
||||
JOptionPane.showMessageDialog(new Frame(), message, title,
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,4 +6,6 @@ public interface UserNotifier {
|
||||
|
||||
public void showError(String title, String message, Throwable e, int exit_code);
|
||||
|
||||
public void showMessage(String title, String message);
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user