No gui way to reset a GtkPaned to auto mode
Submitted by Morten Welinder
Link to original bug (#562405)
Description
Once the slider in a GtkPaned has been used, it cannot be returned to "auto" mode.
Double-clicking seems like a nice way to perform that action. This code (from Gnumeric) might be inspirational:
static gboolean cb_paned_button_press (GtkWidget *widget, GdkEventButton *event) { GtkPaned *paned = (GtkPaned )widget; if (event->type == GDK_2BUTTON_PRESS && event->button == 1) { / Cancel the drag that the first click started. / GTK_WIDGET_GET_CLASS(paned)->button_release_event (widget, event); / Then turn off set position that was set. */ gtk_paned_set_position (paned, -1); signal_paned_repartition (paned); return TRUE; }
return FALSE;
}