mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-1981 - Theming - Base Module
This commit is contained in:
@@ -8,13 +8,8 @@
|
||||
##MODULE IP: Tango Icons - Public Domain
|
||||
Module.manifest||GHIDRA||||END|
|
||||
data/ExtensionPoint.manifest||GHIDRA||||END|
|
||||
data/project.icons.theme.properties||GHIDRA||||END|
|
||||
data/project.theme.properties||GHIDRA||||END|
|
||||
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
|
||||
src/main/help/help/topics/Theming/Theming.htm||GHIDRA||||END|
|
||||
src/main/help/help/topics/Theming/images/ColorEditor.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/Theming/images/FontEditor.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/Theming/images/IconEditor.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/Theming/images/ThemeDialog.png||GHIDRA||||END|
|
||||
src/main/java/ghidra/framework/cmd/package.html||GHIDRA||reviewed||END|
|
||||
src/main/java/ghidra/framework/data/package.html||GHIDRA||reviewed||END|
|
||||
src/main/java/ghidra/framework/model/package.html||GHIDRA||||END|
|
||||
|
||||
16
Ghidra/Framework/Project/data/project.icons.theme.properties
Normal file
16
Ghidra/Framework/Project/data/project.icons.theme.properties
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
[Defaults]
|
||||
|
||||
|
||||
icon.project.data.file.ghidra.unsupported = unknownFile.gif
|
||||
icon.project.data.file.ghidra.checked.out = icon.check
|
||||
icon.project.data.file.ghidra.checked.out.exclusive = checkex.png
|
||||
icon.project.data.file.ghidra.hijacked = small_hijack.gif
|
||||
icon.project.data.file.ghidra.read.only = user-busy.png [size(10,10)]
|
||||
icon.project.data.file.ghidra.not.latest = checkNotLatest.gif
|
||||
|
||||
|
||||
|
||||
[Dark Defaults]
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import db.DBHandle;
|
||||
import db.Field;
|
||||
import db.buffers.*;
|
||||
import generic.theme.GColor;
|
||||
import generic.theme.GIcon;
|
||||
import ghidra.framework.client.ClientUtil;
|
||||
import ghidra.framework.client.NotConnectedException;
|
||||
import ghidra.framework.model.*;
|
||||
@@ -38,25 +39,21 @@ import ghidra.util.exception.*;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import resources.MultiIcon;
|
||||
import resources.ResourceManager;
|
||||
import resources.icons.TranslateIcon;
|
||||
|
||||
public class GhidraFileData {
|
||||
|
||||
private static boolean alwaysMerge = System.getProperty("ForceMerge") != null;
|
||||
private static final boolean ALWAYS_MERGE = System.getProperty("ForceMerge") != null;
|
||||
|
||||
public static final Icon UNSUPPORTED_FILE_ICON =
|
||||
ResourceManager.loadImage("images/unknownFile.gif");
|
||||
|
||||
public static final Icon CHECKED_OUT_ICON = ResourceManager.loadImage("images/check.png");
|
||||
public static final Icon CHECKED_OUT_EXCLUSIVE_ICON =
|
||||
ResourceManager.loadImage("images/checkex.png");
|
||||
public static final Icon HIJACKED_ICON = ResourceManager.loadImage("images/small_hijack.gif");
|
||||
//@formatter:off
|
||||
public static final Icon UNSUPPORTED_FILE_ICON = new GIcon("icon.project.data.file.ghidra.unsupported");
|
||||
public static final Icon CHECKED_OUT_ICON = new GIcon("icon.project.data.file.ghidra.checked.out");
|
||||
public static final Icon CHECKED_OUT_EXCLUSIVE_ICON = new GIcon("icon.project.data.file.ghidra.checked.out.exclusive");
|
||||
public static final Icon HIJACKED_ICON = new GIcon("icon.project.data.file.ghidra.hijacked");
|
||||
public static final Icon VERSION_ICON = new VersionIcon();
|
||||
public static final Icon READ_ONLY_ICON =
|
||||
ResourceManager.loadImage("images/user-busy.png", 10, 10);
|
||||
public static final Icon NOT_LATEST_CHECKED_OUT_ICON =
|
||||
ResourceManager.loadImage("images/checkNotLatest.gif");
|
||||
public static final Icon READ_ONLY_ICON = new GIcon("icon.project.data.file.ghidra.read.only");
|
||||
public static final Icon NOT_LATEST_CHECKED_OUT_ICON = new GIcon("icon.project.data.file.ghidra.not.latest");
|
||||
//@formatter:on
|
||||
|
||||
private ProjectFileManager fileManager;
|
||||
private LocalFileSystem fileSystem;
|
||||
@@ -1028,7 +1025,7 @@ public class GhidraFileData {
|
||||
busy = true;
|
||||
}
|
||||
try {
|
||||
boolean quickCheckin = alwaysMerge ? false : quickCheckin(checkinHandler, monitor);
|
||||
boolean quickCheckin = ALWAYS_MERGE ? false : quickCheckin(checkinHandler, monitor);
|
||||
|
||||
if (!quickCheckin) {
|
||||
|
||||
|
||||
@@ -43,11 +43,7 @@ public class UndoActionDialog extends DialogComponentProvider {
|
||||
private JCheckBox saveCopyCB;
|
||||
private int actionID;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param fileList list of DomainFile objects to show in the list
|
||||
*/
|
||||
public UndoActionDialog(String title, ImageIcon icon, String helpTag, String actionString,
|
||||
public UndoActionDialog(String title, Icon icon, String helpTag, String actionString,
|
||||
List<DomainFile> fileList) {
|
||||
super(title, true);
|
||||
setHelpLocation(new HelpLocation(GenericHelpTopics.REPOSITORY, helpTag));
|
||||
@@ -58,28 +54,18 @@ public class UndoActionDialog extends DialogComponentProvider {
|
||||
addCancelButton();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see ghidra.util.bean.GhidraDialog#cancelCallback()
|
||||
*/
|
||||
@Override
|
||||
protected void cancelCallback() {
|
||||
actionID = CANCEL;
|
||||
close();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see ghidra.util.bean.GhidraDialog#okCallback()
|
||||
*/
|
||||
@Override
|
||||
protected void okCallback() {
|
||||
actionID = OK;
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the dialog; return an ID for the action that the user chose.
|
||||
* @return OK, or CANCEL
|
||||
*/
|
||||
public int showDialog(PluginTool tool) {
|
||||
tool.showDialog(this);
|
||||
return actionID;
|
||||
@@ -93,7 +79,7 @@ public class UndoActionDialog extends DialogComponentProvider {
|
||||
return saveCopyCB.isSelected();
|
||||
}
|
||||
|
||||
private JPanel buildMainPanel(String actionString, ImageIcon icon) {
|
||||
private JPanel buildMainPanel(String actionString, Icon icon) {
|
||||
JPanel innerPanel = new JPanel();
|
||||
innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.Y_AXIS));
|
||||
innerPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
|
||||
|
||||
@@ -25,8 +25,7 @@ import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.*;
|
||||
|
||||
import org.jdom.Element;
|
||||
|
||||
@@ -214,7 +213,7 @@ public abstract class PluginTool extends AbstractDockingTool {
|
||||
|
||||
protected void installHomeButton() {
|
||||
|
||||
ImageIcon homeIcon = ApplicationInformationDisplayFactory.getHomeIcon();
|
||||
Icon homeIcon = ApplicationInformationDisplayFactory.getHomeIcon();
|
||||
if (homeIcon == null) {
|
||||
Msg.debug(this,
|
||||
"If you would like a button to show the Front End, then set the home icon");
|
||||
|
||||
Reference in New Issue
Block a user