I'm trying to add a new plugin with just a single text entry.  The text entry shows up, but for the life of me, I can't get any signals from there.  Can anyone spot the problem?  My callbacks don't do much right now because I've been so frustrated just trying to figure out why they're not getting called.  And I'm trying to add signals multiple ways in hopes that something will work.  I'm new to gtk, so please excuse newbie errors.  Here is the code:

Thank you!!!

typedef struct {

    plugin_instance plugin;

    char *action;

    GtkWidget *textEntry;

    guint32 textColor;

    guint32 bgColor;

} searchbar_priv;


static  gboolean

clicked(GtkWidget *widget, GdkEventButton *event, searchbar_priv *sp)

{

    ENTER;

    ERR("In clicked callback");

    if (event->type == GDK_BUTTON_PRESS && event->button == 3

          && event->state & GDK_CONTROL_MASK) {

    ERR("event button was 3");

        RET(FALSE);

    }

    ERR("grabbing focus");

    gtk_widget_grab_focus(sp->textEntry);

    RET(TRUE);

}


static gboolean

activated(GtkWidget *widget, searchbar_priv* sp)

{

ENTER;

ERR("activated cb");

gtk_entry_get_text(GTK_ENTRY(sp->textEntry));

RET(TRUE);

}


static gboolean

keypressed(GtkWidget *widget, GdkEventKey* event, searchbar_priv* sp)

{

ENTER;

ERR("In keypressed");

if (event->type == GDK_KEY_PRESS)

{

ERR("key press event");

if (event->keyval == GDK_Return)

{

ERR("got return key");

gtk_entry_get_text((GtkEntry *)(sp->textEntry));

//system(sp->action);

RET(TRUE);

}

}

RET(FALSE);

}


static gboolean

changed(GtkWidget *widget, searchbar_priv* sp)

{

ENTER;

ERR("in changed");

RET(TRUE);

}


static int

searchbar_constructor(plugin_instance *p)

{

    line s;

    searchbar_priv *sp;

    

    ENTER;

    sp = g_new0(searchbar_priv, 1);

    g_return_val_if_fail(sp != NULL, 0);

    p->priv = sp;


    //Create the text entry

    sp->textEntry = gtk_entry_new();

    gtk_entry_set_editable(GTK_ENTRY(sp->textEntry), TRUE);

   gtk_container_add(GTK_CONTAINER(p->pwid), sp->textEntry);

    //gtk_widget_show(dc->clockw);

    g_signal_connect (G_OBJECT (p->pwid), "button_press_event",

              G_CALLBACK (clicked), (gpointer) sp);

    gtk_signal_connect(GTK_OBJECT(sp->textEntry), "button_press_event",

    GTK_SIGNAL_FUNC(clicked), (gpointer) sp);

    ERR("connecting signals");

    gtk_signal_connect(GTK_OBJECT(sp->textEntry), "activate",

    GTK_SIGNAL_FUNC(activated), (gpointer) sp);

    gtk_signal_connect(GTK_OBJECT(sp->textEntry), "changed",

    GTK_SIGNAL_FUNC(changed), (gpointer) sp);

    //if (sp->action)

    g_signal_connect(G_OBJECT(p->pwid), "key_press_event", G_CALLBACK(keypressed), (gpointer) sp);

    gtk_widget_show_all(sp->textEntry);

    

    RET(1);


 error:

    gtk_widget_destroy(sp->textEntry);

    g_free(sp->action);

    g_free(sp);

    RET(0);

}


static void

searchbar_destructor(plugin_instance *p)

{

  searchbar_priv *sp = (searchbar_priv *)p->priv;


  ENTER;

  gtk_widget_destroy(sp->textEntry);

  g_free(sp->action);

  g_free(sp);

  RET();

}


static plugin_class class = {

    .fname       = NULL,

    .count       = 0,

    .type        = "searchbar",

    .name        = "Searchbar",

    .version     = "1.0",

    .description = "System search utility",

    .priv_size   = sizeof(searchbar_priv),


    .constructor = searchbar_constructor,

    .destructor  = searchbar_destructor,

};

static plugin_class *class_ptr = (plugin_class *) &class;