Ticket #545: attempt.patch

File attempt.patch, 3.0 KB (added by westram, 10 years ago)
  • EDIT4/ED4_search.cxx

     
    980980// --------------------------------------------------------------------------------
    981981
    982982void ED4_SearchResults::addSearchPosition(ED4_SearchPosition *pos) {
    983     static int max_allowed_results = 100000;
     983    // static int max_allowed_results = 100000;
     984    static int max_allowed_results = 1000;
    984985
    985986    if (ignore_more_results) return;
    986987
  • WINDOW/AW_dialog.cxx

     
    5151}
    5252
    5353void AW_dialog::run() {
     54    LocallyModify<bool> flag(AW_root::SINGLETON->disable_callbacks, true);
     55
    5456    gtk_widget_show_all(GTK_WIDGET(prvt->dialog));
    5557    prvt->result = gtk_dialog_run(prvt->dialog);
    5658    gtk_widget_hide(GTK_WIDGET(prvt->dialog));
  • WINDOW/AW_area_management.cxx

     
    2323
    2424#include <iostream>
    2525
    26 //#define DUMP_EVENTS
     26#if defined(DEBUG)
     27#define DUMP_EVENTS
     28#endif
    2729
    2830#if defined(DUMP_EVENTS)
    2931#  define DUMP_EVENT(type)                                              \
     
    4143   
    4244#else
    4345#  define DUMP_EVENT(type)
    44 #endif // DEBUG
     46#endif
    4547
    4648
    4749class AW_area_management::Pimpl : virtual Noncopyable {
     
    9193    aww->event.character   = '\0';
    9294}
    9395
     96static bool dont_nest_events = false;
     97
    9498extern "C" gboolean aw_handle_configure_event(GtkWidget *, GdkEventConfigure *event, gpointer self) {
    9599    AW_area_management* area = (AW_area_management*) self;
    96100    AW_window* aww = area->prvt->aww;
     101
     102    if (dont_nest_events) {
     103        DUMP_EVENT("resize (ignored)");
     104        return false;
     105    }
     106    LocallyModify<bool> flag(dont_nest_events, true);
     107
    97108    aw_event_clear(aww);
    98109
    99110    aww->event.type   = (AW_event_type) event->type;
     
    108119    DUMP_EVENT("resize");
    109120    return true; // event handled
    110121}
    111    
     122
    112123extern "C" gboolean aw_handle_expose_event(GtkWidget *, GdkEventExpose *event, gpointer self)  {
    113124    AW_area_management* area = (AW_area_management*) self;
    114125    AW_window* aww = area->prvt->aww;
     126
     127    if (dont_nest_events) {
     128        DUMP_EVENT("expose (ignored)");
     129        return false;
     130    }
     131    LocallyModify<bool> flag(dont_nest_events, true);
     132
    115133    aw_event_clear(aww);
     134
    116135    aww->event.type        = (AW_event_type) event->type;
    117136    aww->event.x           = event->area.x;
    118137    aww->event.y           = event->area.y;
     
    123142    area->expose.emit();
    124143    area->prvt->screen_device->set_cr(0);
    125144    DUMP_EVENT("expose");
    126     return false;
     145    return false; // @@@ does this mean "not handled"?
    127146}
    128147   
    129148extern "C" gboolean aw_handle_button_event(GtkWidget *, GdkEventButton *event, gpointer self) {