55 |
GtkWidget *HandleBox; // toolbar |
GtkWidget *HandleBox; // toolbar |
56 |
GtkWidget *MainWindow; |
GtkWidget *MainWindow; |
57 |
GtkWidget *MainNotebook; |
GtkWidget *MainNotebook; |
58 |
|
GtkWidget *MainVBox; |
59 |
t_settings Settings; |
t_settings Settings; |
60 |
GArray *FileProperties; |
GArray *FileProperties; |
61 |
gint NewFilesCnt = 0; |
gint NewFilesCnt = 0; |
227 |
break; |
break; |
228 |
case FIND : |
case FIND : |
229 |
if (OpenedFilesCnt) |
if (OpenedFilesCnt) |
230 |
search (FALSE); |
search (); |
231 |
break; |
break; |
232 |
case REPLACE : |
case REPLACE : |
233 |
if (OpenedFilesCnt) |
if (OpenedFilesCnt) |
234 |
search (TRUE); |
search (); |
235 |
break; |
break; |
236 |
case LINE : |
case LINE : |
237 |
if (OpenedFilesCnt) |
if (OpenedFilesCnt) |
1128 |
void interface (gint argc, gchar *argv[]) |
void interface (gint argc, gchar *argv[]) |
1129 |
{ |
{ |
1130 |
GtkWidget *MenuBar; |
GtkWidget *MenuBar; |
1131 |
GtkWidget *VBox; |
|
|
|
|
1132 |
#ifdef DEBUG_FCN |
#ifdef DEBUG_FCN |
1133 |
g_print(__FILE__": %s(): Begin\n", __func__); |
g_print(__FILE__": %s(): Begin\n", __func__); |
1134 |
#endif |
#endif |
1141 |
g_signal_connect (G_OBJECT(MainWindow), "delete-event", |
g_signal_connect (G_OBJECT(MainWindow), "delete-event", |
1142 |
G_CALLBACK (quit), NULL); |
G_CALLBACK (quit), NULL); |
1143 |
FileProperties = g_array_new (TRUE, FALSE, sizeof(t_fprops)); |
FileProperties = g_array_new (TRUE, FALSE, sizeof(t_fprops)); |
1144 |
VBox = gtk_vbox_new (FALSE, 0); |
MainVBox = gtk_vbox_new (FALSE, 0); |
1145 |
gtk_container_add (GTK_CONTAINER(MainWindow), VBox); |
gtk_container_add (GTK_CONTAINER(MainWindow), MainVBox); |
1146 |
HandleBox = gtk_handle_box_new(); |
HandleBox = gtk_handle_box_new(); |
1147 |
gtk_container_set_border_width (GTK_CONTAINER(HandleBox), 2); |
gtk_container_set_border_width (GTK_CONTAINER(HandleBox), 2); |
1148 |
gtk_box_pack_start (GTK_BOX(VBox), HandleBox, FALSE, FALSE, 0); |
gtk_box_pack_start (GTK_BOX(MainVBox), HandleBox, FALSE, FALSE, 0); |
1149 |
init_toolbar (GTK_BOX(VBox)); |
init_toolbar (GTK_BOX(MainVBox)); |
1150 |
MainNotebook = gtk_notebook_new (); |
MainNotebook = gtk_notebook_new (); |
1151 |
read_uedit_wordfile (WORDFILE); |
read_uedit_wordfile (WORDFILE); |
1152 |
editor_init(); |
editor_init(); |
1154 |
gtk_container_add (GTK_CONTAINER(HandleBox), MenuBar); |
gtk_container_add (GTK_CONTAINER(HandleBox), MenuBar); |
1155 |
gtk_notebook_popup_enable (GTK_NOTEBOOK(MainNotebook)); |
gtk_notebook_popup_enable (GTK_NOTEBOOK(MainNotebook)); |
1156 |
gtk_notebook_set_scrollable (GTK_NOTEBOOK(MainNotebook), TRUE); |
gtk_notebook_set_scrollable (GTK_NOTEBOOK(MainNotebook), TRUE); |
1157 |
gtk_box_pack_start (GTK_BOX(VBox), MainNotebook, TRUE, TRUE, 0); |
gtk_box_pack_start (GTK_BOX(MainVBox), MainNotebook, TRUE, TRUE, 0); |
1158 |
g_signal_connect_after (G_OBJECT(MainNotebook), "switch-page", |
g_signal_connect_after (G_OBJECT(MainNotebook), "switch-page", |
1159 |
G_CALLBACK (page_changed), NULL); |
G_CALLBACK (page_changed), NULL); |
1160 |
init_msgbar (GTK_BOX(VBox)); |
init_msgbar (GTK_BOX(MainVBox)); |
1161 |
menu_set_files_open (FALSE); |
menu_set_files_open (FALSE); |
1162 |
command_line (argc, argv); |
command_line (argc, argv); |
1163 |
autosave (AUTOSAVE_DELAY); |
autosave (AUTOSAVE_DELAY); |