00001
00012 #define GITK_RENDERER_C
00013 #define GITKR_WIDGET_CHARACTERINPUT_C
00014
00015 #include "gitkrincludes.h"
00016
00018 void gitkr_widget_characterinput_new(GitkrGtkWidgetPtr widget,gchar *id,GitkDialogPtr dialog,gchar *label,GtkContainer *container,gboolean box_vert,xmlNodePtr node) {
00019 GtkWidget *sub_container;
00020 GtkWidget *widget_label;
00021 gchar *value=gitk_widget_get_value(dialog,id,"value");
00022
00023 gitkr_widget_new(widget,id,dialog);
00024
00025
00026
00027 sub_container=gtk_hbox_new(FALSE, 3);
00028
00029 gtk_container_add(container,sub_container);
00030
00031 widget_label=gtk_label_new(label);
00032
00033 gtk_container_add(GTK_CONTAINER(sub_container),widget_label);
00034
00035 widget->impl=gtk_entry_new();
00036
00037 if(value) gtk_entry_set_text(GTK_ENTRY(widget->impl),value);
00038
00039 gtk_signal_connect(GTK_OBJECT(widget->impl),"changed",GTK_SIGNAL_FUNC(sighandler_editable_widget_on_changed),widget);
00040
00041
00042
00043
00044
00045 gtk_container_add(GTK_CONTAINER(sub_container),widget->impl);
00046 g_free(value);
00047 }