15#include <glade/glade.h>
16#include <gdk/gdkkeysyms.h>
27 gdk_color_parse(colorstring, &
color);
28 gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &
color);
29 gtk_widget_modify_base(widget, GTK_STATE_NORMAL, &
color);
34 gtk_entry_set_text((GtkEntry *)
35 glade_xml_get_widget(
xml,
"entryGraphFileName"),
41 GtkMessageDialog *Dlg = (GtkMessageDialog *)gtk_message_dialog_new(
NULL,
44 GTK_BUTTONS_OK,
"%s",
str);
46 gtk_dialog_run((GtkDialog *) Dlg);
47 gtk_object_destroy((GtkObject *) Dlg);
57 assert(filename !=
NULL);
62 dialog = gtk_file_chooser_dialog_new(
"Open File",
64 GTK_FILE_CHOOSER_ACTION_OPEN,
68 GTK_RESPONSE_ACCEPT,
NULL);
70 if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
71 *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
76 gtk_widget_destroy(dialog);
81 assert(filename !=
NULL);
86 dialog = gtk_file_chooser_dialog_new(
"Save File",
88 GTK_FILE_CHOOSER_ACTION_OPEN,
92 GTK_RESPONSE_ACCEPT,
NULL);
94 if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
95 *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
100 gtk_widget_destroy(dialog);
108 GtkTextBuffer *gtkbuf;
110 gtkbuf = gtk_text_view_get_buffer(textv);
112 gtk_text_buffer_get_end_iter(gtkbuf, &endit);
114 gtk_text_buffer_insert(gtkbuf, &endit,
s, (
int)bytes);
Memory allocation wrappers that exit on failure.
int openfiledlg(char **filename)
int savefiledlg(char **filename)
void load_graph_properties(void)
void Color_Widget_bg(char *colorstring, GtkWidget *widget)
void show_gui_warning(char *str)
void append_textview(GtkTextView *textv, const char *s, size_t bytes)
static void color(Agraph_t *g)
textitem scanner parser str
Non-owning string references.