Re: GtkNotebook accelerators.



===
void gtk_notebook_append_page_label        (GtkNotebook   *notebook,
					    GtkWidget     *child,
					    const gchar   *uline_label,
					    GtkAccelGroup *accel_group);
void gtk_notebook_prepend_page_label       (GtkNotebook   *notebook,
					    GtkWidget     *child,
					    const gchar   *uline_label,
					    GtkAccelGroup *accel_group);
void gtk_notebook_insert_page_label        (GtkNotebook   *notebook,
					    GtkWidget     *child,
					    const gchar   *uline_label,
					    GtkAccelGroup *accel_group,
					    gint           position);
void gtk_notebook_set_tab_label_text_accel (GtkNotebook   *notebook,
					    GtkWidget     *child,
					    const gchar   *uline_text,
					    GtkAccelGroup *accel_group);
void gtk_notebook_set_tab_accel            (GtkNotebook   *notebook,
					    GtkWidget     *child,
					    guint          keyval,
					    guint          modifiers,
					    GtkAccelGroup *accel_group);
===

 * I think we probably should avoid adding more append/prepend
   variants and simply stick to the convention that to prepend you
   insert with an index of 0, to append, you insert with and index of
   -1.

 * gtk_notebook_insert_page_label() should almost certainly
   be gtk_notebook_insert_page_accel() to correspond 
   to gtk_button_new_accel()

 * But, more importantly, I'm not very happy with the way this
   works altogether - it's fiddly to set up, not flexible,
   and just more entry points than I like.

   I'm sort of coming to the conclusion here that we need 
   to make some more changes to the way accelerators work in GTK+
   for 2.0 - it's something we've discussed some here, but
   were figuring we'd be able to punt to 2.2.

   Two issues in this area, that if we address, may provide some better
   resolution of this are:
   
    - If we use the scheme for label properties I suggested (or
      any scheme that allows setting of the underline), then how
      do you find out the accelerator? How is that accelerator
      hooked up.

      It probably at least necessary to store the accelerator
      for the label in some place that can be retrieved.

    - We need some way of indicating what widget a label is "for"
      both for accelerators, and for accessibility applications.

   So, perhaps it is best to hold off on this patch until we think
   about these things some more.
   
Regards,
                                              Owen




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