The Dillo web browser and GTK+



Hi!

  I have two questions:

  1) What do I need to do to make the Dillo web browser listed in
     the GTK+ apps. at www.gtk.org?
     (Ref: www.dillo.org)

  2) Technical:

     If  I  have  three  focusable  widgets in a window, pressing
TAB/ShiftTAB cycles through them, _BUT_ like this:

            .-> One -> Two -> Three -> "Nirvana" --.
            |                                      |
            '--------------------------------------'

     (or backwards).

     And I want it to be:

            .-> One -> Two -> Three -> --.
            |                            |
            '----------------------------'


     I  have called "Nirvana" a widget(?), that seems to grab the
focus (as none of the three widgets has it when at "Nirvana" :)

     Appended is some example code that illustrates the problem.

     Thanks in advance
     Jorge.-

PS: Please CC me, as I'm not in the list.

-----------------------------------------------------------------

/* focus example.      -- GTK+-1.2.x */

#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>


gint delete_event( GtkWidget *widget,
                   GdkEvent  *event,
                   gpointer   data )
{
    return(FALSE);
}

/* Another callback */
void destroy( GtkWidget *widget,
              gpointer   data )
{
    gtk_main_quit();
}



int main( int argc, char *argv[] )
{
   GtkWidget *window;
   GtkWidget *entry;
   GtkWidget *vbox;

   gtk_init(&argc, &argv);

   /* create a new window */
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   GTK_WIDGET_UNSET_FLAGS (window, GTK_CAN_FOCUS);

   gtk_signal_connect (GTK_OBJECT (window), "delete_event",
                       GTK_SIGNAL_FUNC (delete_event), NULL);

   gtk_signal_connect (GTK_OBJECT (window), "destroy",
                       GTK_SIGNAL_FUNC (destroy), NULL);

   /* Create the entries */
   vbox = gtk_vbox_new (FALSE, 0);

   entry = gtk_entry_new();
   GTK_WIDGET_SET_FLAGS(entry, GTK_HAS_FOCUS);
   gtk_widget_set_usize(entry, 140, 0);
   gtk_entry_set_text(GTK_ENTRY(entry), "One");
   gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
   gtk_widget_show (entry);

   entry = gtk_entry_new();
   gtk_widget_set_usize(entry, 140, 0);
   gtk_entry_set_text(GTK_ENTRY(entry), "Two");
   gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
   gtk_widget_show (entry);

   entry = gtk_entry_new();
   gtk_widget_set_usize(entry, 140, 0);
   gtk_entry_set_text(GTK_ENTRY(entry), "Three");
   gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
   gtk_widget_show (entry);

   gtk_container_add(GTK_CONTAINER (window), vbox);
   gtk_widget_show (vbox);
   gtk_widget_show (window);

   /* Start */
   gtk_main ();

   return(0);
}

-----------------------------------------------------------------




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]