40 gtk_widget_set_sensitive(GTK_WIDGET(g), (value==0)?FALSE:TRUE);
44 gtk_widget_grab_focus(GTK_WIDGET(g));
48 gtk_combo_box_set_active(GTK_COMBO_BOX(g), value);
54 store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g)));
56 gtk_list_store_clear(store);
67 "Function is not appropriate for this type of widget (%s)",
87 return (gtk_widget_get_sensitive(GTK_WIDGET(g))==TRUE)?1:0;
90 return (gtk_widget_has_focus(GTK_WIDGET(g))==TRUE)?1:0;
96 i=gtk_combo_box_get_active(GTK_COMBO_BOX(g));
107 store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g)));
109 i=gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store),
NULL);
118 "Function is not appropriate for this type of widget (%s)",
150 store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g)));
153 gtk_list_store_append(store, &iter);
154 gtk_list_store_set(store, &iter, 0, value, -1);
162 store=GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(g)));
164 gtk_list_store_clear(store);
174 "Function is not appropriate for this type of widget (%s)",
185 const char *defaultValue) {
212 "Function is not appropriate for this type of widget (%s)",
253 gulong changed_handler_id;
256 wParent=GWEN_Widget_Tree_GetParent(w);
259 store=gtk_list_store_new(1, G_TYPE_STRING);
261 g=gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
264 g=gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(store), 0);
265 g_object_unref(store);
267 cr=gtk_cell_renderer_text_new();
268 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (g), cr, TRUE);
269 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(g), cr,
"text", 0,
NULL);
283 changed_handler_id=g_signal_connect(g,
int Gtk2Gui_WComboBox_Setup(GWEN_WIDGET *w)
GWEN_STRINGLIST * entries
void GWEN_StringList_Clear(GWEN_STRINGLIST *sl)
#define GWEN_ERROR_INVALID
#define GWEN_FREE_OBJECT(varname)
static GWENHYWFAR_CB const char * Gtk2Gui_WComboBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
#define DBG_WARN(dbg_logger, format, args...)
#define GWEN_WIDGET_FLAGS_READONLY
const char * GWEN_StringList_StringAt(const GWEN_STRINGLIST *sl, int idx)
void GWEN_StringList_free(GWEN_STRINGLIST *sl)
#define GWEN_NEW_OBJECT(typ, varname)
int GWEN_StringList_AppendString(GWEN_STRINGLIST *sl, const char *s, int take, int checkDouble)
static void GWENHYWFAR_CB Gtk2Gui_WComboBox_FreeData(void *bp, void *p)
#define GTK2_DIALOG_WIDGET_REAL
struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST
static void changed_handler(GtkWidget *comboBox, gpointer data)
int GWEN_Dialog_EmitSignal(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender)
static GWENHYWFAR_CB int Gtk2Gui_WComboBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
static GWENHYWFAR_CB int Gtk2Gui_WComboBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
#define GTK2_DIALOG_WIDGET_CONTENT
void Gtk2Gui_Dialog_Leave(GWEN_DIALOG *dlg, int result)
#define GWEN_INHERIT(bt, t)
#define GWEN_INHERIT_SETDATA(bt, t, element, data, fn)
GWEN_STRINGLIST * GWEN_StringList_new(void)
static GWENHYWFAR_CB int Gtk2Gui_WComboBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
#define GWEN_INHERIT_GETDATA(bt, t, element)