gitkrwcharacterinput.c

Go to the documentation of this file.
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   //if(box_vert) sub_container=gtk_vbox_new(FALSE, /*spacing=*/3);
00026   //else sub_container=gtk_hbox_new(FALSE, /*spacing=*/3);
00027   sub_container=gtk_hbox_new(FALSE, /*spacing=*/3);
00028   //gtk_box_pack_start_defaults(GTK_BOX(container),sub_container);
00029   gtk_container_add(container,sub_container);
00030   
00031   widget_label=gtk_label_new(label);
00032   //gtk_box_pack_start_defaults(GTK_BOX(sub_container),widget->impl);
00033   gtk_container_add(GTK_CONTAINER(sub_container),widget_label);
00034   
00035   widget->impl=gtk_entry_new();
00036   //-- set initial value
00037   if(value) gtk_entry_set_text(GTK_ENTRY(widget->impl),value);
00038   //-- signal handler
00039   gtk_signal_connect(GTK_OBJECT(widget->impl),"changed",GTK_SIGNAL_FUNC(sighandler_editable_widget_on_changed),widget);
00040   
00041   // use this to associate the label shortcut with the entry
00042   //gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget->impl);
00043   
00044   //gtk_box_pack_start_defaults(GTK_BOX(sub_container),widget->impl);
00045   gtk_container_add(GTK_CONTAINER(sub_container),widget->impl);
00046   g_free(value);
00047 }

Generated on Thu Oct 28 10:59:13 2004 for gitk by doxygen 1.3.6