Try to confirm before close
This commit is contained in:
parent
654b5b77f4
commit
a74b26218f
@ -48,7 +48,7 @@ MainWindows::MainWindows(void) : MsgBroadcast("Main Windows", EDN_CAT_GUI)
|
|||||||
gtk_window_set_default_size(GTK_WINDOW(m_mainWindow), 800, 600);
|
gtk_window_set_default_size(GTK_WINDOW(m_mainWindow), 800, 600);
|
||||||
|
|
||||||
// enable the close signal of the windows
|
// enable the close signal of the windows
|
||||||
g_signal_connect(G_OBJECT(m_mainWindow), "destroy", G_CALLBACK(gtk_main_quit), NULL);
|
//g_signal_connect(G_OBJECT(m_mainWindow), "destroy", G_CALLBACK(OnQuit), this);
|
||||||
|
|
||||||
// Create a vertical box for stacking the menu and editor widgets in.
|
// Create a vertical box for stacking the menu and editor widgets in.
|
||||||
GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
|
GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
|
||||||
@ -126,7 +126,11 @@ void MainWindows::OnMessage(int32_t id, int32_t dataID)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindows::OnQuit(GtkWidget *widget, gpointer data)
|
||||||
|
{
|
||||||
|
EDN_INFO("quit requested");
|
||||||
|
gtk_main_quit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -50,6 +50,7 @@ class MainWindows: public Singleton<MainWindows>, public MsgBroadcast
|
|||||||
public:
|
public:
|
||||||
GtkWidget * GetWidget(void) { return m_mainWindow;};
|
GtkWidget * GetWidget(void) { return m_mainWindow;};
|
||||||
void OnMessage(int32_t id, int32_t dataID);
|
void OnMessage(int32_t id, int32_t dataID);
|
||||||
|
static void OnQuit(GtkWidget *widget, gpointer data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetTitle(Edn::String &fileName, bool isModify);
|
void SetTitle(Edn::String &fileName, bool isModify);
|
||||||
|
@ -152,7 +152,7 @@ void Search::Display(void)
|
|||||||
m_BtReplaceAndNext = gtk_button_new_with_label("Replace & Find");
|
m_BtReplaceAndNext = gtk_button_new_with_label("Replace & Find");
|
||||||
gtk_container_add(GTK_CONTAINER (hbox), m_BtReplaceAndNext);
|
gtk_container_add(GTK_CONTAINER (hbox), m_BtReplaceAndNext);
|
||||||
// Exit
|
// Exit
|
||||||
m_BtQuit = gtk_button_new_with_label("Quit");
|
m_BtQuit = gtk_button_new_with_label("Close");
|
||||||
gtk_container_add(GTK_CONTAINER (hbox), m_BtQuit);
|
gtk_container_add(GTK_CONTAINER (hbox), m_BtQuit);
|
||||||
|
|
||||||
// Connect signals :
|
// Connect signals :
|
||||||
|
@ -9,53 +9,9 @@
|
|||||||
<end>\n</end>
|
<end>\n</end>
|
||||||
<EscapeChar>\</EscapeChar>
|
<EscapeChar>\</EscapeChar>
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="Assignement">
|
|
||||||
<color>preprocesseur</color>
|
|
||||||
<start>( *| [ \t]*)[A-Za-z0-9_+][^ \t]*[ \t]*(\+|:)?=</start>
|
|
||||||
<end>\n</end>
|
|
||||||
<EscapeChar>\</EscapeChar>
|
|
||||||
</rule>
|
|
||||||
Dependency Line
|
|
||||||
^( *| [ \t]*)(.DEFAULT|.DELETE_ON_ERROR|.EXPORT_ALL_VARIABLES.IGNORE|.INTERMEDIATE|.PHONY|.POSIX|.PRECIOUS|.SECONDARY|.SILENT|.SUFFIXES)*(([A-Za-z0-9./$(){} _@^<*?%+-]*(\\\n)){,8}[A-Za-z0-9./$(){} _@^<*?%+-]*)::?
|
|
||||||
</pass1>
|
</pass1>
|
||||||
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
|
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
|
||||||
|
|
||||||
</pass2>
|
</pass2>
|
||||||
</EdnLang>
|
</EdnLang>
|
||||||
|
|
||||||
<!--
|
|
||||||
Parsing : to add :
|
|
||||||
$ ==> End of line
|
|
||||||
^ ==> ???
|
|
||||||
|
|
||||||
P1 Comment
|
|
||||||
#
|
|
||||||
$
|
|
||||||
P1 Assignement
|
|
||||||
^( *| [ \t]*)[A-Za-z0-9_+][^ \t]*[ \t]*(\+|:)?=
|
|
||||||
$
|
|
||||||
P1 Dependency Line
|
|
||||||
^( *| [ \t]*)(.DEFAULT|.DELETE_ON_ERROR|.EXPORT_ALL_VARIABLES.IGNORE|.INTERMEDIATE|.PHONY|.POSIX|.PRECIOUS|.SECONDARY|.SILENT|.SUFFIXES)*(([A-Za-z0-9./$(){} _@^<*?%+-]*(\\\n)){,8}[A-Za-z0-9./$(){} _@^<*?%+-]*)::?
|
|
||||||
$|;
|
|
||||||
P1 Macro
|
|
||||||
\$([A-Za-z0-9_]|\([^)]*\)|\{[^}]*})
|
|
||||||
P1 Internal Macro
|
|
||||||
\$([<@*?%]|\$@)
|
|
||||||
P1 Include
|
|
||||||
^( *| [ \t]*)include[ \t]
|
|
||||||
P1 Exports
|
|
||||||
^( *| [ \t]*)<export|unexport>[ \t]
|
|
||||||
P2 Conditionals
|
|
||||||
^( *| [ \t]*)<ifeq|ifneq>[ \t]
|
|
||||||
P2 Conditionals ifdefs
|
|
||||||
^( *| [ \t]*)<ifdef|ifndef>[ \t]
|
|
||||||
P2 Conditional Ends
|
|
||||||
^( *| [ \t]*)<else|endif>
|
|
||||||
P2 vpath
|
|
||||||
^( *| [ \t]*)<vpath>[ \t]
|
|
||||||
P2 define
|
|
||||||
^( *| [ \t]*)<define>[ \t]
|
|
||||||
P2 define Ends
|
|
||||||
^( *| [ \t]*)<endef>
|
|
||||||
|
|
||||||
-->
|
|
@ -103,7 +103,7 @@
|
|||||||
</rule>
|
</rule>
|
||||||
<rule name="BIG LETTER">
|
<rule name="BIG LETTER">
|
||||||
<color>macro</color>
|
<color>macro</color>
|
||||||
<start>\@[A-Z_]{4,500}\@</start>
|
<start>\@[A-Z_][A-Z_0-9]{3,500}\@</start>
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="Function name">
|
<rule name="Function name">
|
||||||
<color>functionName</color>
|
<color>functionName</color>
|
||||||
|
@ -13,51 +13,3 @@
|
|||||||
</pass2>
|
</pass2>
|
||||||
</EdnLang>
|
</EdnLang>
|
||||||
|
|
||||||
<!--
|
|
||||||
Parsing : to add :
|
|
||||||
$ ==> End of line
|
|
||||||
^ ==> ???
|
|
||||||
|
|
||||||
P1 Comment
|
|
||||||
\< !--
|
|
||||||
--\ >
|
|
||||||
P1 ignored section
|
|
||||||
\<!\[\s*IGNORE\s*\[
|
|
||||||
\]\]\>
|
|
||||||
P1 declaration
|
|
||||||
\<\?(?ixml)
|
|
||||||
\?\>
|
|
||||||
P1 doctype
|
|
||||||
(\<!(?idoctype))\s+(\<?(?!(?ixml))[\l_][\w:-]*\>?)
|
|
||||||
\>
|
|
||||||
error : \]
|
|
||||||
p1 processing instruction
|
|
||||||
\<\?\S+
|
|
||||||
\?\>
|
|
||||||
P1 cdata
|
|
||||||
\<!\[(?icdata)\[
|
|
||||||
\]\]\>
|
|
||||||
P1 element declaration
|
|
||||||
\<!ELEMENT
|
|
||||||
\>
|
|
||||||
P1 entity declaration
|
|
||||||
\<!ENTITY
|
|
||||||
\>
|
|
||||||
p1 notation
|
|
||||||
\<!NOTATION
|
|
||||||
\>
|
|
||||||
P1 attribute declaration
|
|
||||||
\<!ATTLIST
|
|
||||||
\>
|
|
||||||
P1 element
|
|
||||||
(\</?)((?!(?ixml))[\l_][\w:-]*)
|
|
||||||
/?\>
|
|
||||||
P1 entity
|
|
||||||
&((amp|lt|gt|quot|apos)|#x[\da-fA-F]*|[\l_]\w*);
|
|
||||||
P1 marked section
|
|
||||||
\<!\[\s*(?:INCLUDE|(%(?!(?ixml))[\l_][\w:-]*;))\s*\[|\]\]\>
|
|
||||||
P2 internal subset delims
|
|
||||||
[\[\]>]
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
80
data/parsingRegExp.txt
Normal file
80
data/parsingRegExp.txt
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
Makefile :
|
||||||
|
$ ==> End of line
|
||||||
|
^ ==> ???
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
P1 Comment
|
||||||
|
#
|
||||||
|
$
|
||||||
|
P1 Assignement
|
||||||
|
^( *| [ \t]*)[A-Za-z0-9_+][^ \t]*[ \t]*(\+|:)?=
|
||||||
|
$
|
||||||
|
P1 Dependency Line
|
||||||
|
^( *| [ \t]*)(.DEFAULT|.DELETE_ON_ERROR|.EXPORT_ALL_VARIABLES.IGNORE|.INTERMEDIATE|.PHONY|.POSIX|.PRECIOUS|.SECONDARY|.SILENT|.SUFFIXES)*(([A-Za-z0-9./$(){} _@^<*?%+-]*(\\\n)){,8}[A-Za-z0-9./$(){} _@^<*?%+-]*)::?
|
||||||
|
$|;
|
||||||
|
P1 Macro
|
||||||
|
\$([A-Za-z0-9_]|\([^)]*\)|\{[^}]*})
|
||||||
|
P1 Internal Macro
|
||||||
|
\$([<@*?%]|\$@)
|
||||||
|
P1 Include
|
||||||
|
^( *| [ \t]*)include[ \t]
|
||||||
|
P1 Exports
|
||||||
|
^( *| [ \t]*)<export|unexport>[ \t]
|
||||||
|
P2 Conditionals
|
||||||
|
^( *| [ \t]*)<ifeq|ifneq>[ \t]
|
||||||
|
P2 Conditionals ifdefs
|
||||||
|
^( *| [ \t]*)<ifdef|ifndef>[ \t]
|
||||||
|
P2 Conditional Ends
|
||||||
|
^( *| [ \t]*)<else|endif>
|
||||||
|
P2 vpath
|
||||||
|
^( *| [ \t]*)<vpath>[ \t]
|
||||||
|
P2 define
|
||||||
|
^( *| [ \t]*)<define>[ \t]
|
||||||
|
P2 define Ends
|
||||||
|
^( *| [ \t]*)<endef>
|
||||||
|
|
||||||
|
XML :
|
||||||
|
$ ==> End of line
|
||||||
|
^ ==> ???
|
||||||
|
|
||||||
|
P1 Comment
|
||||||
|
\< !--
|
||||||
|
--\ >
|
||||||
|
P1 ignored section
|
||||||
|
\<!\[\s*IGNORE\s*\[
|
||||||
|
\]\]\>
|
||||||
|
P1 declaration
|
||||||
|
\<\?(?ixml)
|
||||||
|
\?\>
|
||||||
|
P1 doctype
|
||||||
|
(\<!(?idoctype))\s+(\<?(?!(?ixml))[\l_][\w:-]*\>?)
|
||||||
|
\>
|
||||||
|
error : \]
|
||||||
|
p1 processing instruction
|
||||||
|
\<\?\S+
|
||||||
|
\?\>
|
||||||
|
P1 cdata
|
||||||
|
\<!\[(?icdata)\[
|
||||||
|
\]\]\>
|
||||||
|
P1 element declaration
|
||||||
|
\<!ELEMENT
|
||||||
|
\>
|
||||||
|
P1 entity declaration
|
||||||
|
\<!ENTITY
|
||||||
|
\>
|
||||||
|
p1 notation
|
||||||
|
\<!NOTATION
|
||||||
|
\>
|
||||||
|
P1 attribute declaration
|
||||||
|
\<!ATTLIST
|
||||||
|
\>
|
||||||
|
P1 element
|
||||||
|
(\</?)((?!(?ixml))[\l_][\w:-]*)
|
||||||
|
/?\>
|
||||||
|
P1 entity
|
||||||
|
&((amp|lt|gt|quot|apos)|#x[\da-fA-F]*|[\l_]\w*);
|
||||||
|
P1 marked section
|
||||||
|
\<!\[\s*(?:INCLUDE|(%(?!(?ixml))[\l_][\w:-]*;))\s*\[|\]\]\>
|
||||||
|
P2 internal subset delims
|
||||||
|
[\[\]>]
|
Loading…
x
Reference in New Issue
Block a user