<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<child>
<object class="GtkVBox" id="editor_vbox">
<property name="visible">True</property>
<property name="border_width">6</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="title_hbox">
<object class="GtkVBox" id="edit_page_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox30">
<object class="GtkVBox" id="text_page_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="hbox65">
<child>
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox42">
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox45">
+ <object class="GtkHBox" id="text_color_key_hbox">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
- <object class="GtkComboBox" id="text_color_key_combo">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
+ <placeholder/>
</child>
</object>
<packing>
<object class="GtkVBox" id="line_page_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="hbox71">
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox38">
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox41">
+ <object class="GtkHBox" id="line_key_hbox">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
- <object class="GtkComboBox" id="line_key_combo">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
+ <placeholder/>
</child>
</object>
<packing>
<object class="GtkVBox" id="fill_page_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
+ <property name="orientation">vertical</property>
<child>
<object class="GtkHBox" id="hbox73">
<property name="visible">True</property>
<child>
<object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox50">
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox53">
+ <object class="GtkHBox" id="fill_key_hbox">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
- <object class="GtkComboBox" id="fill_key_combo">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
+ <placeholder/>
</child>
</object>
<packing>
<object class="GtkVBox" id="img_page_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="hbox74">
</packing>
</child>
<child>
- <object class="GtkComboBox" id="img_key_combo">
+ <object class="GtkHBox" id="img_key_hbox">
<property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">1</property>
<object class="GtkVBox" id="data_page_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="hbox76">
</packing>
</child>
<child>
- <object class="GtkComboBox" id="data_key_combo">
+ <object class="GtkHBox" id="data_key_hbox">
<property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">1</property>
<object class="GtkVBox" id="bc_page_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="hbox79">
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox46">
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox49">
+ <object class="GtkHBox" id="bc_key_hbox">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
- <object class="GtkComboBox" id="bc_key_combo">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
+ <placeholder/>
</child>
</object>
<packing>
<object class="GtkVBox" id="lsize_page_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkTable" id="table7">
<object class="GtkVBox" id="shadow_page_vbox">
<property name="visible">True</property>
<property name="border_width">12</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkCheckButton" id="shadow_enable_check">
<child>
<object class="GtkVBox" id="shadow_controls_table">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="hbox63">
<child>
<object class="GtkVBox" id="vbox7">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox57">
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox60">
+ <object class="GtkHBox" id="shadow_key_hbox">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
- <object class="GtkComboBox" id="shadow_key_combo">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
+ <placeholder/>
</child>
</object>
<packing>
/** GL_FIELD_BUTTON Private fields */
struct _glFieldButtonPrivate {
+ gboolean label_is_key;
+ gchar *key;
+
GtkWidget *label;
GtkWidget *menu;
enum {
KEY_SELECTED,
+ CHANGED,
LAST_SIGNAL
};
NULL, NULL,
gl_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
+
+ signals[CHANGED] =
+ g_signal_new ("changed",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (glFieldButtonClass, changed),
+ NULL, NULL,
+ gl_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
this = g_object_new (TYPE_GL_FIELD_BUTTON, NULL);
- gtk_label_set_text (GTK_LABEL (this->priv->label), name);
+ if ( name )
+ {
+ gtk_label_set_text (GTK_LABEL (this->priv->label), name);
+ }
+ else
+ {
+ this->priv->label_is_key = TRUE;
+ }
this->priv->menu = gl_field_button_menu_new ();
{
gl_field_button_menu_set_keys (GL_FIELD_BUTTON_MENU (this->priv->menu),
key_list);
+ this->priv->key = g_strdup (key_list->data);
+ if ( this->priv->label_is_key )
+ {
+ gtk_label_set_text (GTK_LABEL (this->priv->label), key_list->data);
+ }
gtk_widget_show_all (this->priv->menu);
}
+/*****************************************************************************/
+/* Set current key. */
+/*****************************************************************************/
+void
+gl_field_button_set_key (glFieldButton *this,
+ const gchar *key)
+{
+ g_free (this->priv->key);
+ this->priv->key = g_strdup (key);
+
+ if ( this->priv->label_is_key )
+ {
+ gtk_label_set_text (GTK_LABEL (this->priv->label), key);
+ }
+}
+
+
+/*****************************************************************************/
+/* Get current key. */
+/*****************************************************************************/
+gchar *
+gl_field_button_get_key (glFieldButton *this)
+{
+ return g_strdup (this->priv->key);
+}
+
+
/*****************************************************************************/
/* Menu positioning function. */
/*****************************************************************************/
/*****************************************************************************/
static void
menu_key_selected_cb (glFieldButtonMenu *menu,
- gchar *field,
+ gchar *key,
glFieldButton *this)
{
- g_signal_emit (this, signals[KEY_SELECTED], 0, field);
+ if (this->priv->label_is_key)
+ {
+ gtk_label_set_text (GTK_LABEL (this->priv->label), key);
+ }
+
+ g_free (this->priv->key);
+ this->priv->key = g_strdup (key);
+
+ g_signal_emit (this, signals[KEY_SELECTED], 0, key);
+ g_signal_emit (this, signals[CHANGED], 0);
}
gchar *key,
gpointer user_data);
+ void (*changed) (glFieldButton *object,
+ gpointer user_data);
+
};
void gl_field_button_set_keys (glFieldButton *this,
GList *key_list);
+void gl_field_button_set_key (glFieldButton *this,
+ const gchar *key);
+
+gchar *gl_field_button_get_key (glFieldButton *this);
+
+
G_END_DECLS
#endif /* __GL_COLOR_COMBO_H__ */
#include "prefs.h"
#include "color-combo.h"
#include "color.h"
+#include "field-button.h"
#include "combo-util.h"
#include "builder-util.h"
"bc_text_check", &editor->priv->bc_text_check,
"bc_cs_check", &editor->priv->bc_cs_check,
"bc_color_hbox", &editor->priv->bc_color_hbox,
- "bc_key_combo", &editor->priv->bc_key_combo,
+ "bc_key_hbox", &editor->priv->bc_key_hbox,
"bc_key_radio", &editor->priv->bc_key_radio,
"bc_color_radio", &editor->priv->bc_color_radio,
"data_format_label", &editor->priv->data_format_label,
editor->priv->bc_color_combo,
FALSE, FALSE, 0);
+ editor->priv->bc_key_combo = gl_field_button_new (NULL);
+ gtk_box_pack_start (GTK_BOX (editor->priv->bc_key_hbox),
+ editor->priv->bc_key_combo,
+ TRUE, TRUE, 0);
+
gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->bc_style_combo));
- gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->bc_key_combo));
/* Load barcode styles */
styles = gl_barcode_get_styles_list ();
g_free (ex_string);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->data_digits_spin),
- format_digits);
+ format_digits);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->data_literal_radio))) {
gtk_widget_set_sensitive (editor->priv->data_format_label, FALSE);
gtk_widget_set_sensitive (editor->priv->bc_color_combo, FALSE);
gtk_widget_set_sensitive (editor->priv->bc_key_combo, TRUE);
- gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->bc_key_combo),
- color_node->key);
+ gl_field_button_set_key (GL_FIELD_BUTTON (editor->priv->bc_key_combo),
+ color_node->key);
}
editor->priv->stop_signals = FALSE;
color_node->field_flag = TRUE;
color_node->color = gl_prefs_model_get_default_line_color (gl_prefs);
color_node->key =
- gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_key_combo));
+ gl_field_button_get_key (GL_FIELD_BUTTON (editor->priv->bc_key_combo));
} else {
color_node->field_flag = FALSE;
color_node->key = NULL;
#include <math.h>
#include "prefs.h"
-#include "combo-util.h"
+#include "field-button.h"
#include "builder-util.h"
#include "object-editor-private.h"
"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,
+ "data_key_hbox", &editor->priv->data_key_hbox,
NULL);
- gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->data_key_combo));
+ editor->priv->data_key_combo = gl_field_button_new (NULL);
+ gtk_box_pack_start (GTK_BOX (editor->priv->data_key_hbox),
+ editor->priv->data_key_combo,
+ TRUE, TRUE, 0);
/* Un-hide */
gtk_widget_show_all (editor->priv->data_page_vbox);
!editor->priv->data_format_fixed_flag);
- gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo),
- text_node->data);
+ gl_field_button_set_key (GL_FIELD_BUTTON (editor->priv->data_key_combo),
+ text_node->data);
}
} else {
text_node->field_flag = TRUE;
text_node->data =
- gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo));
+ gl_field_button_get_key (GL_FIELD_BUTTON (editor->priv->data_key_combo));
}
gl_debug (DEBUG_EDITOR, "text_node: field_flag=%d, data=%s",
#include "prefs.h"
#include "color-combo.h"
#include "color.h"
-#include "combo-util.h"
+#include "field-button.h"
#include "builder-util.h"
#include "object-editor-private.h"
gl_builder_util_get_widgets (editor->priv->builder,
"fill_page_vbox", &editor->priv->fill_page_vbox,
"fill_color_hbox", &editor->priv->fill_color_hbox,
- "fill_key_combo", &editor->priv->fill_key_combo,
+ "fill_key_hbox", &editor->priv->fill_key_hbox,
"fill_key_radio", &editor->priv->fill_key_radio,
"fill_color_radio", &editor->priv->fill_color_radio,
NULL);
editor->priv->fill_color_combo,
FALSE, FALSE, 0);
- gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->fill_key_combo));
+ editor->priv->fill_key_combo = gl_field_button_new (NULL);
+ gtk_box_pack_start (GTK_BOX (editor->priv->fill_key_hbox),
+ editor->priv->fill_key_combo,
+ TRUE, TRUE, 0);
/* Modify widgets based on configuration */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->fill_color_radio), TRUE);
gtk_widget_set_sensitive (editor->priv->fill_color_combo, FALSE);
gtk_widget_set_sensitive (editor->priv->fill_key_combo, TRUE);
- gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->fill_key_combo),
- color_node->key);
+ gl_field_button_set_key (GL_FIELD_BUTTON (editor->priv->fill_key_combo),
+ color_node->key);
}
editor->priv->stop_signals = FALSE;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->fill_key_radio))) {
color_node->field_flag = TRUE;
color_node->key =
- gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->fill_key_combo));
+ gl_field_button_get_key (GL_FIELD_BUTTON (editor->priv->fill_key_combo));
} else {
color_node->field_flag = FALSE;
color_node->key = NULL;
#include <math.h>
#include "prefs.h"
-#include "combo-util.h"
+#include "field-button.h"
#include "builder-util.h"
#include "object-editor-private.h"
"img_file_radio", &editor->priv->img_file_radio,
"img_key_radio", &editor->priv->img_key_radio,
"img_file_button", &editor->priv->img_file_button,
- "img_key_combo", &editor->priv->img_key_combo,
+ "img_key_hbox", &editor->priv->img_key_hbox,
NULL);
- gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->img_key_combo));
+ editor->priv->img_key_combo = gl_field_button_new (NULL);
+ gtk_box_pack_start (GTK_BOX (editor->priv->img_key_hbox),
+ editor->priv->img_key_combo,
+ TRUE, TRUE, 0);
+
/* Modify file button properties. */
add_image_filters_to_chooser (GTK_FILE_CHOOSER (editor->priv->img_file_button));
gtk_widget_set_sensitive (editor->priv->img_file_button, FALSE);
gtk_widget_set_sensitive (editor->priv->img_key_combo, TRUE);
- gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->img_key_combo),
- text_node->data);
+ gl_field_button_set_key (GL_FIELD_BUTTON (editor->priv->img_key_combo),
+ text_node->data);
}
editor->priv->stop_signals = FALSE;
} else {
text_node->field_flag = TRUE;
text_node->data =
- gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->img_key_combo));
+ gl_field_button_get_key (GL_FIELD_BUTTON (editor->priv->img_key_combo));
}
gl_debug (DEBUG_EDITOR, "text_node: field_flag=%d, data=%s",
#include "prefs.h"
#include "color-combo.h"
#include "color.h"
-#include "combo-util.h"
+#include "field-button.h"
#include "builder-util.h"
#include "object-editor-private.h"
"line_page_vbox", &editor->priv->line_page_vbox,
"line_width_spin", &editor->priv->line_width_spin,
"line_color_hbox", &editor->priv->line_color_hbox,
- "line_key_combo", &editor->priv->line_key_combo,
+ "line_key_hbox", &editor->priv->line_key_hbox,
"line_key_radio", &editor->priv->line_key_radio,
"line_color_radio", &editor->priv->line_color_radio,
NULL);
editor->priv->line_color_combo,
FALSE, FALSE, 0);
- gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->line_key_combo));
+ editor->priv->line_key_combo = gl_field_button_new (NULL);
+ gtk_box_pack_start (GTK_BOX (editor->priv->line_key_hbox),
+ editor->priv->line_key_combo,
+ TRUE, TRUE, 0);
/* Modify widgets based on configuration */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->line_color_radio), TRUE);
gtk_widget_set_sensitive (editor->priv->line_color_combo, FALSE);
gtk_widget_set_sensitive (editor->priv->line_key_combo, TRUE);
- gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->line_key_combo),
- color_node->key);
+ gl_field_button_set_key (GL_FIELD_BUTTON (editor->priv->line_key_combo),
+ color_node->key);
}
editor->priv->stop_signals = FALSE;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->line_key_radio))) {
color_node->field_flag = TRUE;
color_node->key =
- gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->line_key_combo));
+ gl_field_button_get_key (GL_FIELD_BUTTON (editor->priv->line_key_combo));
} else {
color_node->field_flag = FALSE;
color_node->key = NULL;
GtkWidget *fill_page_vbox;
GtkWidget *fill_color_hbox;
GtkWidget *fill_color_combo;
+ GtkWidget *fill_key_hbox;
GtkWidget *fill_key_combo;
GtkWidget *fill_key_radio;
GtkWidget *fill_color_radio;
GtkWidget *line_color_hbox;
GtkWidget *line_color_combo;
GtkWidget *line_key_radio;
+ GtkWidget *line_key_hbox;
GtkWidget *line_key_combo;
GtkWidget *img_page_vbox;
GtkWidget *img_file_radio;
GtkWidget *img_key_radio;
GtkWidget *img_file_button;
+ GtkWidget *img_key_hbox;
GtkWidget *img_key_combo;
GtkWidget *text_page_vbox;
GtkWidget *text_color_hbox;
GtkWidget *text_color_combo;
GtkWidget *text_color_key_radio;
+ GtkWidget *text_color_key_hbox;
GtkWidget *text_color_key_combo;
GtkWidget *text_left_toggle;
GtkWidget *text_center_toggle;
GtkWidget *bc_color_hbox;
GtkWidget *bc_color_combo;
GtkWidget *bc_key_radio;
+ GtkWidget *bc_key_hbox;
GtkWidget *bc_key_combo;
GtkWidget *data_page_vbox;
GtkWidget *data_literal_radio;
GtkWidget *data_key_radio;
GtkWidget *data_text_entry;
+ GtkWidget *data_key_hbox;
GtkWidget *data_key_combo;
GtkWidget *data_format_label;
GtkWidget *data_ex_label;
GtkWidget *shadow_key_radio;
GtkWidget *shadow_color_hbox;
GtkWidget *shadow_color_combo;
+ GtkWidget *shadow_key_hbox;
GtkWidget *shadow_key_combo;
GtkWidget *shadow_opacity_spin;
gdouble shadow_x;
#include "prefs.h"
#include "color-combo.h"
#include "color.h"
-#include "combo-util.h"
+#include "field-button.h"
#include "builder-util.h"
#include "units-util.h"
"shadow_color_radio", &editor->priv->shadow_color_radio,
"shadow_key_radio", &editor->priv->shadow_key_radio,
"shadow_color_hbox", &editor->priv->shadow_color_hbox,
- "shadow_key_combo", &editor->priv->shadow_key_combo,
+ "shadow_key_hbox", &editor->priv->shadow_key_hbox,
"shadow_opacity_spin", &editor->priv->shadow_opacity_spin,
NULL);
gtk_container_add (GTK_CONTAINER (editor->priv->shadow_color_hbox),
editor->priv->shadow_color_combo);
- gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->shadow_key_combo));
+ editor->priv->shadow_key_combo = gl_field_button_new (NULL);
+ gtk_box_pack_start (GTK_BOX (editor->priv->shadow_key_hbox),
+ editor->priv->shadow_key_combo,
+ TRUE, TRUE, 0);
+
/* Get configuration information */
units = gl_prefs_model_get_units (gl_prefs);
gtk_widget_set_sensitive (editor->priv->shadow_color_combo, FALSE);
gtk_widget_set_sensitive (editor->priv->shadow_key_combo, TRUE);
- gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->shadow_key_combo),
- color_node->key);
+ gl_field_button_set_key (GL_FIELD_BUTTON (editor->priv->shadow_key_combo),
+ color_node->key);
}
editor->priv->stop_signals = FALSE;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_key_radio))) {
color_node->field_flag = TRUE;
color_node->key =
- gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->shadow_key_combo));
+ gl_field_button_get_key (GL_FIELD_BUTTON (editor->priv->shadow_key_combo));
} else {
color_node->field_flag = FALSE;
color_node->key = NULL;
#include "color.h"
#include "font-combo.h"
#include "font-util.h"
-#include "combo-util.h"
+#include "field-button.h"
#include "builder-util.h"
#include "object-editor-private.h"
"text_color_hbox", &editor->priv->text_color_hbox,
"text_color_radio", &editor->priv->text_color_radio,
"text_color_key_radio", &editor->priv->text_color_key_radio,
- "text_color_key_combo", &editor->priv->text_color_key_combo,
+ "text_color_key_hbox", &editor->priv->text_color_key_hbox,
"text_left_toggle", &editor->priv->text_left_toggle,
"text_center_toggle", &editor->priv->text_center_toggle,
"text_right_toggle", &editor->priv->text_right_toggle,
editor->priv->text_color_combo,
FALSE, FALSE, 0);
- gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->text_color_key_combo));
+ editor->priv->text_color_key_combo = gl_field_button_new (NULL);
+ gtk_box_pack_start (GTK_BOX (editor->priv->text_color_key_hbox),
+ editor->priv->text_color_key_combo,
+ TRUE, TRUE, 0);
+
/* Modify widgets */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_radio), TRUE);
gtk_widget_set_sensitive (editor->priv->text_color_combo, FALSE);
gtk_widget_set_sensitive (editor->priv->text_color_key_combo, TRUE);
- gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo), "");
+ gl_field_button_set_key (GL_FIELD_BUTTON (editor->priv->text_color_key_combo), "");
}
editor->priv->stop_signals = FALSE;
color_node->field_flag = TRUE;
color_node->color = gl_prefs_model_get_default_text_color (gl_prefs);
color_node->key =
- gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo));
+ gl_field_button_get_key (GL_FIELD_BUTTON (editor->priv->text_color_key_combo));
} else {
color_node->field_flag = FALSE;
color_node->key = NULL;
glMerge *merge)
{
GList *keys;
- GtkWidget *combo;
GtkWidget *button;
gboolean fixed_flag;
gboolean state;
keys = g_list_append (keys, g_strdup (""));
}
- combo = editor->priv->img_key_combo;
- gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys);
+ button = editor->priv->img_key_combo;
+ gl_field_button_set_keys (GL_FIELD_BUTTON (button), keys);
button = editor->priv->edit_insert_field_button;
gl_field_button_set_keys (GL_FIELD_BUTTON(button), keys);
- combo = editor->priv->data_key_combo;
- gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys);
+ button = editor->priv->data_key_combo;
+ gl_field_button_set_keys (GL_FIELD_BUTTON (button), keys);
- combo = editor->priv->fill_key_combo;
- gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys);
+ button = editor->priv->fill_key_combo;
+ gl_field_button_set_keys (GL_FIELD_BUTTON (button), keys);
- combo = editor->priv->text_color_key_combo;
- gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys);
+ button = editor->priv->text_color_key_combo;
+ gl_field_button_set_keys (GL_FIELD_BUTTON (button), keys);
- combo = editor->priv->line_key_combo;
- gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys);
+ button = editor->priv->line_key_combo;
+ gl_field_button_set_keys (GL_FIELD_BUTTON (button), keys);
- combo = editor->priv->bc_key_combo;
- gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys);
+ button = editor->priv->bc_key_combo;
+ gl_field_button_set_keys (GL_FIELD_BUTTON (button), keys);
- combo = editor->priv->shadow_key_combo;
- gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys);
+ button = editor->priv->shadow_key_combo;
+ gl_field_button_set_keys (GL_FIELD_BUTTON (button), keys);
gl_merge_free_key_list (&keys);