mirror of
https://github.com/cemu-project/idapython.git
synced 2024-12-29 03:01:52 +01:00
graph.i: fixed a small bug with gettext / background color
- removed some whitespaces - added some code markers
This commit is contained in:
parent
7ea3709021
commit
e2a0ee8204
15
swig/graph.i
15
swig/graph.i
@ -1,5 +1,5 @@
|
||||
%{
|
||||
|
||||
//<code(py_graph)>
|
||||
#ifndef __PY_IDA_GRAPH__
|
||||
#define __PY_IDA_GRAPH__
|
||||
|
||||
@ -252,8 +252,8 @@ private:
|
||||
|
||||
if (py_str == NULL || !PyString_Check(py_str) || (s = PyString_AsString(py_str)) == NULL)
|
||||
s = "";
|
||||
if (py_color != NULL && !PyInt_Check(py_color))
|
||||
cl = bgcolor_t(PyInt_AsLong(py_color));
|
||||
if (py_color != NULL && PyNumber_Check(py_color))
|
||||
cl = bgcolor_t(PyLong_AsUnsignedLong(py_color));
|
||||
|
||||
c = node_cache.add(node, s, cl);
|
||||
|
||||
@ -776,10 +776,11 @@ void pyg_select_node(PyObject *self, int nid)
|
||||
#undef S_M_TITLE
|
||||
|
||||
#endif
|
||||
|
||||
//</code(py_graph)>
|
||||
%}
|
||||
|
||||
%pythoncode %{
|
||||
#<pycode(py_graph)>
|
||||
class GraphViewer:
|
||||
"""This class wraps the user graphing facility provided by the graph.hpp file"""
|
||||
def __init__(self, title, close_open = False):
|
||||
@ -928,14 +929,16 @@ class GraphViewer:
|
||||
# Triggered when a menu command is selected through the menu or its hotkey
|
||||
# """
|
||||
# print "command:", cmd_id
|
||||
|
||||
#</pycode(py_graph)>
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
//<inline(py_graph)>
|
||||
void pyg_refresh(PyObject *self);
|
||||
void pyg_close(PyObject *self);
|
||||
|
||||
Py_ssize_t pyg_add_command(PyObject *self, const char *title, const char *hotkey);
|
||||
void pyg_select_node(PyObject *self, int nid);
|
||||
bool pyg_show(PyObject *self);
|
||||
|
||||
//</inline(py_graph)>
|
||||
%}
|
||||
|
Loading…
Reference in New Issue
Block a user