#include <config.h>
#include <gtk/gtk.h>
-#include <glade/glade.h>
#include <stdlib.h>
#include <string.h>
/* Create the structure from the XML definitions */
struct var_type_dialog *
-var_type_dialog_create (GladeXML *xml)
+var_type_dialog_create (GtkBuilder *xml)
{
gint i;
struct var_type_dialog *dialog = g_malloc (sizeof (struct var_type_dialog));
g_assert (xml);
dialog->window = get_widget_assert (xml,"var_type_dialog");
+ dialog->active_button = -1;
g_signal_connect (dialog->window, "delete-event",
g_object_unref (list_store);
- g_signal_connect (GTK_OBJECT (dialog->date_format_treeview), "cursor-changed",
+ g_signal_connect (dialog->date_format_treeview, "cursor-changed",
GTK_SIGNAL_FUNC (set_format_from_treeview), dialog);
for ( i = 0 ; i < sizeof (dollar_format)/sizeof (dollar_format[0]) ; ++i )
{
- char *template = fmt_dollar_template (&dollar_format[i]);
+ char *template = settings_dollar_template (&dollar_format[i]);
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
0, template,
g_object_unref (list_store);
- g_signal_connect (GTK_OBJECT (dialog->dollar_treeview),
+ g_signal_connect (dialog->dollar_treeview,
"cursor-changed",
GTK_SIGNAL_FUNC (set_format_from_treeview), dialog);
- g_signal_connect_swapped (GTK_OBJECT (dialog->dollar_treeview),
+ g_signal_connect_swapped (dialog->dollar_treeview,
"cursor-changed",
GTK_SIGNAL_FUNC (update_width_decimals), dialog);
g_object_unref (list_store);
- g_signal_connect (GTK_OBJECT (dialog->custom_treeview),
+ g_signal_connect (dialog->custom_treeview,
"cursor-changed",
GTK_SIGNAL_FUNC (set_format_type_from_treeview), dialog);
- g_signal_connect (GTK_OBJECT (dialog->custom_treeview),
+ g_signal_connect (dialog->custom_treeview,
"cursor-changed",
GTK_SIGNAL_FUNC (preview_custom), dialog);
- g_signal_connect (GTK_OBJECT (dialog->entry_width),
+ g_signal_connect (dialog->entry_width,
"changed",
GTK_SIGNAL_FUNC (preview_custom), dialog);
- g_signal_connect (GTK_OBJECT (dialog->entry_decimals),
+ g_signal_connect (dialog->entry_decimals,
"changed",
GTK_SIGNAL_FUNC (preview_custom), dialog);
gint decimals = atoi (gtk_entry_get_text
(GTK_ENTRY (dialog->entry_decimals)));
- gint new_type = VAR_NUMERIC;
+ gint new_type = VAL_NUMERIC;
gint new_width = 0;
bool result = false;
struct fmt_spec spec;
switch (dialog->active_button)
{
case BUTTON_STRING:
- new_type = VAR_STRING;
+ new_type = VAL_STRING;
new_width = width;
result = make_output_format_try (&spec, FMT_A, width, 0);
break;