-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
/*
- * (GLABELS) Label and Business Card Creation program for GNOME
- *
- * object-editor.c: object properties editor module
+ * object-editor-data-page.c
+ * Copyright (C) 2003-2009 Jim Evins <evins@snaught.com>.
*
- * Copyright (C) 2003 Jim Evins <evins@snaught.com>.
+ * This file is part of gLabels.
*
- * This program is free software; you can redistribute it and/or modify
+ * gLabels is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * gLabels is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with gLabels. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include <config.h>
#include "object-editor.h"
#include <glib/gi18n.h>
-#include <gtk/gtkeditable.h>
-#include <gtk/gtkcombobox.h>
-#include <gtk/gtktogglebutton.h>
+#include <gtk/gtk.h>
#include <string.h>
#include <math.h>
#include "prefs.h"
-#include "util.h"
+#include "combo-util.h"
+#include "builder-util.h"
#include "object-editor-private.h"
#include "debug.h"
+
/*===========================================*/
/* Private macros */
/*===========================================*/
+
/*===========================================*/
/* Private data types */
/*===========================================*/
+
/*===========================================*/
/* Private globals */
/*===========================================*/
+
/*===========================================*/
/* Local function prototypes */
/*===========================================*/
static void data_radio_toggled_cb (glObjectEditor *editor);
-\f
/*--------------------------------------------------------------------------*/
/* PRIVATE. Prepare data page. */
/*--------------------------------------------------------------------------*/
gl_debug (DEBUG_EDITOR, "START");
/* Extract widgets from XML tree. */
- editor->priv->data_page_vbox = glade_xml_get_widget (editor->priv->gui,
- "data_page_vbox");
- editor->priv->data_literal_radio = glade_xml_get_widget (editor->priv->gui,
- "data_literal_radio");
- editor->priv->data_key_radio = glade_xml_get_widget (editor->priv->gui,
- "data_key_radio");
- editor->priv->data_text_entry = glade_xml_get_widget (editor->priv->gui,
- "data_text_entry");
- editor->priv->data_key_combo = glade_xml_get_widget (editor->priv->gui,
- "data_key_combo");
-
- gl_util_combo_box_add_text_model ( GTK_COMBO_BOX(editor->priv->data_key_combo));
+ gl_builder_util_get_widgets (editor->priv->builder,
+ "data_page_vbox", &editor->priv->data_page_vbox,
+ "data_literal_radio", &editor->priv->data_literal_radio,
+ "data_key_radio", &editor->priv->data_key_radio,
+ "data_text_entry", &editor->priv->data_text_entry,
+ "data_key_combo", &editor->priv->data_key_combo,
+ NULL);
+
+ gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->data_key_combo));
/* Un-hide */
gtk_widget_show_all (editor->priv->data_page_vbox);
gl_debug (DEBUG_EDITOR, "END");
}
+
/*--------------------------------------------------------------------------*/
/* PRIVATE. data radio callback. */
/*--------------------------------------------------------------------------*/
gl_debug (DEBUG_WDGT, "END");
}
+
/*****************************************************************************/
/* Set data. */
/*****************************************************************************/
!editor->priv->data_format_fixed_flag);
- gl_util_combo_box_set_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo),
- text_node->data);
+ gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo),
+ text_node->data);
}
gl_debug (DEBUG_EDITOR, "END");
}
+
/*****************************************************************************/
/* Query data. */
/*****************************************************************************/
return text_node;
}
+
+
+
+/*
+ * Local Variables: -- emacs
+ * mode: C -- emacs
+ * c-basic-offset: 8 -- emacs
+ * tab-width: 8 -- emacs
+ * indent-tabs-mode: nil -- emacs
+ * End: -- emacs
+ */