Re: TextPad and GtkEText



From: Tim Janik <timj@gtk.org>
> On Sat, 11 Mar 2000, Emmanuel DELOGET wrote:
>
> > [cc'ed to timj for the syntax highlight break: you
> > should have more chance than me! :)]
> >
> > Hi Derek!
> >
> > I just downloaded TextPad (since you said it is the
> > best hex/text editor you found on the market). it
>
> well, i don't have windows at all, so much for that... ;)
>
> > * display white chars in a consistent way (all apps
> > which uses GtkEText would display the same symbols)
>
> what way do you actually want to diplay them? (middle char
> dot or so?)

    Exactly : we need only a few symbols (just the '.' == ' ',
    '->' == '\t' and the '§' == '\n' or some equivalent to these).

    I know this comes from the Windows world (and Windows
    is also known as The Bad Thing - as I understood it
    by reading tons of articles on /. [aargh... Those
    Linux users which do not know how to do anything
    without Windows are really stupid guys :)]) but
    it is fairly useful when editing source files. And
    since it is useful, I think it's good idea to get
    it in the text widget (something like
    gtk_etext_show_whitechars(bool))

    What about it ?

>
> > * some of the TextPad Edit Menu features should be good
> > too (join lines, change case, and so on) [or at least
> > providing an interface to register keybings and edit
> > functions]
>
> there's the GtkBinding mechanism readily available for this,
> configurable even through rc files.

    GtkBindingSet has a rather complex interface. I never
    used it before and so my conclusions may be wrong but:

    1) they cannot be used to generate user signals (which
    would be helpful in some particular cases when I want to
    add some very special bindings to an existing widget
    without poluting the whole widget class with ). This comes from
    the gtk_binding_entry_activate func:

for (sig = entry->signals; sig; sig = sig->next)
  {
    /* ... */
    signal_id = gtk_signal_lookup (sig->signal_name, GTK_OBJECT_TYPE (object));
    if (!signal_id)
      {
        g_warning ("gtk_binding_entry_activate(): binding \"%s::%s\": "
           "could not find signal \"%s\" in the `%s' class ancestry",
           entry->binding_set->set_name,
           accelerator,
           sig->signal_name,
           gtk_type_name (GTK_OBJECT_TYPE (object)));
      }
      /* ... */
  }

    Of course, I can create a widget with a "binding-activate" signal,
    this signal should have some useful params (the keyval & modifiers
    and perhaps a function pointer) and finnaly sucessfully handle these.

    This means that I must say to my users : << if you want to
    provide additional functionnalities, you need to add a
    binding entry to the "etext-bindings" binding set. Then you need
    to connect a callback to "binding-activate". Then I promise to
    throw some useful informations at your face. Are you happy? >>

    I think it should be better to provide a clear user interface
    (like gtk_etext_add_edit_func(etext, keyval, modifier, function)
    for example). This should really ease development with the EText
    widget - and this interface function could use the GtkBindings
    implementation of course.

    2) there is no (2) for the moment :)

    Yours,

    Emmanuel

> ---
> ciaoTJ




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