30 |
#include <stdio.h> |
#include <stdio.h> |
31 |
#include <stdlib.h> |
#include <stdlib.h> |
32 |
#include <string.h> |
#include <string.h> |
33 |
|
#include "main.h" |
34 |
#include "editor.h" |
#include "editor.h" |
35 |
#include "struct.h" |
#include "struct.h" |
36 |
#include "msgbar.h" |
#include "msgbar.h" |
87 |
WidgetInfo.Lg); |
WidgetInfo.Lg); |
88 |
if (Lg == -1) |
if (Lg == -1) |
89 |
{ |
{ |
90 |
print_msg ("Cannot complete: language not recognized..."); |
print_msg(_("Cannot auto-complete: language not recognized...")); |
91 |
return -1; |
return -1; |
92 |
} |
} |
93 |
EditorBuffer = gtk_text_view_get_buffer (Editor); |
EditorBuffer = gtk_text_view_get_buffer (Editor); |
164 |
} |
} |
165 |
if (!bok || (dlist == NULL)) |
if (!bok || (dlist == NULL)) |
166 |
{ |
{ |
167 |
print_msg ("No matching string..."); |
print_msg(_("No matching string.")); |
168 |
return 0; |
return 0; |
169 |
} |
} |
170 |
if (!dlist->next) |
if (!dlist->next) |
181 |
gtk_text_buffer_delete(EditorBuffer, &start, &end); |
gtk_text_buffer_delete(EditorBuffer, &start, &end); |
182 |
gtk_text_buffer_insert_at_cursor(EditorBuffer, |
gtk_text_buffer_insert_at_cursor(EditorBuffer, |
183 |
label, strlen(label)); |
label, strlen(label)); |
184 |
msg = g_strconcat ("String \"", label, "\" inserted...", NULL); |
msg = g_strdup_printf(_("String \"%s\" inserted."), label); |
185 |
print_msg (msg); |
print_msg (msg); |
186 |
g_free (msg); |
g_free (msg); |
187 |
return 0; |
return 0; |
319 |
gtk_text_buffer_delete (Buffer, &start, &end); |
gtk_text_buffer_delete (Buffer, &start, &end); |
320 |
} |
} |
321 |
gtk_text_buffer_insert_at_cursor(Buffer, label, -1); |
gtk_text_buffer_insert_at_cursor(Buffer, label, -1); |
322 |
msg = g_strconcat ("String \"", label, "\" inserted...", NULL); |
msg = g_strdup_printf(_("String \"%s\" inserted."), label); |
323 |
print_msg (msg); |
print_msg (msg); |
324 |
g_free (msg); |
g_free (msg); |
325 |
gtk_widget_destroy(gtk_widget_get_toplevel(widget)); |
gtk_widget_destroy(gtk_widget_get_toplevel(widget)); |
379 |
gtk_text_buffer_delete (Buffer, &start, &end); |
gtk_text_buffer_delete (Buffer, &start, &end); |
380 |
} |
} |
381 |
gtk_text_buffer_insert_at_cursor(Buffer, label, -1); |
gtk_text_buffer_insert_at_cursor(Buffer, label, -1); |
382 |
msg = g_strconcat ("String \"", label, "\" inserted...", NULL); |
msg = g_strdup_printf(_("String \"%s\" inserted."), label); |
383 |
print_msg (msg); |
print_msg (msg); |
384 |
g_free (msg); |
g_free (msg); |
385 |
gtk_widget_destroy(window); |
gtk_widget_destroy(window); |
412 |
else |
else |
413 |
{ |
{ |
414 |
if (BEEP) gdk_beep(); |
if (BEEP) gdk_beep(); |
415 |
print_msg ("Beginning of auto-completion buffer..."); |
print_msg (_("Beginning of auto-completion buffer.")); |
416 |
} |
} |
417 |
} |
} |
418 |
else if (event->string[0] > ' ' && event->string[0] <= '~') |
else if (event->string[0] > ' ' && event->string[0] <= '~') |
439 |
else |
else |
440 |
{ |
{ |
441 |
if (BEEP) gdk_beep(); |
if (BEEP) gdk_beep(); |
442 |
print_msg ("No matching string..."); |
print_msg(_("No matching string.")); |
443 |
} |
} |
444 |
g_free (word); |
g_free (word); |
445 |
} |
} |