summaryrefslogtreecommitdiff
path: root/saedit
diff options
context:
space:
mode:
authorVasily_Makarov <danilka.pro@gmail.com>2011-06-10 17:31:18 +0400
committerVasily_Makarov <danilka.pro@gmail.com>2011-06-10 17:31:18 +0400
commit812e57f84346474da4712de6c821e32d11907a6e (patch)
tree643e6cd57efc2acde7436b533ec83dc8ee4edc8b /saedit
parent7aa809718e77504d9ebccde25c3f06770f768384 (diff)
downloadtools-812e57f84346474da4712de6c821e32d11907a6e.tar.gz
tools-812e57f84346474da4712de6c821e32d11907a6e.tar.bz2
tools-812e57f84346474da4712de6c821e32d11907a6e.tar.xz
tools-812e57f84346474da4712de6c821e32d11907a6e.zip
saedit: Remove open button and change grid color to gray
Diffstat (limited to 'saedit')
-rw-r--r--saedit/main.c13
-rw-r--r--saedit/main.h2
2 files changed, 2 insertions, 13 deletions
diff --git a/saedit/main.c b/saedit/main.c
index 97e5320..09cf8cf 100644
--- a/saedit/main.c
+++ b/saedit/main.c
@@ -27,6 +27,7 @@ cairo_surface_t *get_grid_surface(int w, int h) {
cairo_t *scr = cairo_create(gridsurf);
cairo_set_line_width(scr, 1);
+ cairo_set_source_rgba(scr, 0.5, 0.5, 0.5, 1);
for (x = 0; x < w; x++)
for (y = 0; y < h; y++) {
@@ -103,10 +104,6 @@ void save_to_xml_file(GtkButton *button, gpointer buffer) {
g_file_set_contents(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(xmlfcbutton)), buffer, sizeof(buffer), NULL);
}
-void xml_file_set_handler(GtkFileChooserButton *widget, gpointer data) {
- gtk_widget_set_sensitive(xmlfobutton, TRUE);
-}
-
void data_folder_set_handler(GtkFileChooserButton *widget, gpointer data) {
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(xmlfcbutton), gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget)));
}
@@ -484,19 +481,13 @@ void set_up_interface() {
xmlfcbutton = gtk_file_chooser_button_new(_("XML source file"), 0);
gtk_box_pack_start(GTK_BOX(vbbox), xmlfcbutton, TRUE, TRUE, 0);
-
- xmlfobutton = gtk_button_new_from_stock(GTK_STOCK_OPEN);
- gtk_widget_set_sensitive(xmlfobutton, FALSE);
- gtk_box_pack_start(GTK_BOX(vbbox), xmlfobutton, TRUE, TRUE, 0);
- g_signal_connect(xmlfobutton, "clicked", G_CALLBACK(open_xml_file), sbuf);
+ g_signal_connect(xmlfcbutton, "file-set", G_CALLBACK(open_xml_file), sbuf);
xmlfsbutton = gtk_button_new_from_stock(GTK_STOCK_SAVE);
gtk_widget_set_sensitive(xmlfsbutton, FALSE);
gtk_box_pack_start(GTK_BOX(vbbox), xmlfsbutton, TRUE, TRUE, 0);
g_signal_connect(xmlfsbutton, "clicked", G_CALLBACK(save_to_xml_file), sbuf);
- g_signal_connect(xmlfcbutton, "file-set", G_CALLBACK(xml_file_set_handler), NULL);
-
button = gtk_button_new_with_label("Parse XML buffer");
gtk_box_pack_start(GTK_BOX(vbbox), button, TRUE, TRUE, 0);
g_signal_connect(button, "clicked", G_CALLBACK(parse_xml_buffer), sbuf);
diff --git a/saedit/main.h b/saedit/main.h
index 53314f0..5c37058 100644
--- a/saedit/main.h
+++ b/saedit/main.h
@@ -59,7 +59,6 @@ GtkWidget *darea = NULL;
GtkWidget *datafoldcbutton = NULL;
GtkWidget *xmlfcbutton = NULL;
GtkWidget *xmlfsbutton = NULL;
-GtkWidget *xmlfobutton = NULL;
GtkWidget *imagesetscombobox = NULL;
GtkWidget *actionscombobox = NULL;
GtkWidget *animationscombobox = NULL;
@@ -83,7 +82,6 @@ static void free_imagesets();
static void free_actions();
static void free_animations();
static void save_to_xml_file(GtkButton *button, gpointer buffer);
-static void xml_file_set_handler(GtkFileChooserButton *widget, gpointer data);
static void data_folder_set_handler(GtkFileChooserButton *widget, gpointer data);
static void show_wrong_source_buffer_dialog();
static gchar* xml_node_get_attr_value(const XMLNode *node, const gchar *attr_name);