title: widget not within a Gtk Window
body: <p>I am working with trying to set a button as the default within a program so that as soon as data is entered within the entry boxes the user simply has to press enter to continue instead of dragging up the mouse or tabbing awkwardly.</p>
  
  <p>My code for this is:</p>
  
  <pre><code>gtk_entry_set_activates_default(__w_passwdEntry, true);
  gtk_entry_set_activates_default(__w_uNameEntry, true);
  gtk_widget_set_can_default(GTK_WIDGET(__w_loginBtn), true);
  gtk_widget_grab_default(GTK_WIDGET(__w_loginBtn));
  </code></pre>
  
  <p>and I get an error on the last line, the error reads:</p>
  
  <pre><code>(app_name:2345): Gtk-WARNING **: gtkwidget.c:6796: widget not within a GtkWindow
  </code></pre>
  
  <p>How do I go about associating the button with a window? That and how would I determine what the window I would need to associate the button with is?</p>
  
  <p>I created the basics of the GUI in Glade and I am working on doing everything besides the layout in code.</p>