diff --git a/gb.gtk/src/CMenu.cpp b/gb.gtk/src/CMenu.cpp index 3c480ebeb..8024869b1 100644 --- a/gb.gtk/src/CMenu.cpp +++ b/gb.gtk/src/CMenu.cpp @@ -365,16 +365,8 @@ END_METHOD BEGIN_METHOD_VOID(CMENU_clear) - gMenu *mn; - int i, max; - - max = MENU->childCount(); - - for (i = 0; i < max; i++) - { - mn = MENU->childMenu(i); - delete_menu(mn); - } + while (MENU->childCount()) + delete_menu(MENU->childMenu(0)); THIS->init_shortcut = FALSE; diff --git a/gb.gtk/src/gapplication.cpp b/gb.gtk/src/gapplication.cpp index 05e2d8fd6..cdd7ebeca 100644 --- a/gb.gtk/src/gapplication.cpp +++ b/gb.gtk/src/gapplication.cpp @@ -621,9 +621,9 @@ __FOUND_WIDGET: case GDK_SCROLL: save_control = control = find_child(control, (int)event->scroll.x_root, (int)event->scroll.y_root); - + __SCROLL_TRY_PROXY: - + if (control->onMouseEvent && control->canRaise(control, gEvent_MouseWheel)) { int dir, dt, ort; @@ -639,14 +639,16 @@ __FOUND_WIDGET: #ifdef GTK3 if (dir == GDK_SCROLL_SMOOTH) { - gdouble dx = 0, dy = 0; + /*gdouble dx = 0, dy = 0; gdk_event_get_scroll_deltas((GdkEvent *)event, &dx, &dy); if (fabs(dy) > fabs(dx)) dir = (dy < 0) ? GDK_SCROLL_UP : GDK_SCROLL_DOWN; else - dir = (dx < 0) ? GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT; + dir = (dx < 0) ? GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT;*/ + goto __HANDLE_EVENT; } #endif + switch (dir) { case GDK_SCROLL_DOWN: dt = -1; ort = 1; break; diff --git a/gb.gtk/src/gfont.cpp b/gb.gtk/src/gfont.cpp index c0a2ab152..06161dacd 100644 --- a/gb.gtk/src/gfont.cpp +++ b/gb.gtk/src/gfont.cpp @@ -449,7 +449,7 @@ void gFont::setGrade(int grade) { double desktop = gDesktop::font()->size(); - if (grade < -4 || grade > 16) + if (grade < -4 || grade > 24) return; setSize(GRADE_TO_SIZE(grade, desktop)); diff --git a/gb.gtk/src/gtabstrip.cpp b/gb.gtk/src/gtabstrip.cpp index e2e6adaf7..7d7e150fc 100644 --- a/gb.gtk/src/gtabstrip.cpp +++ b/gb.gtk/src/gtabstrip.cpp @@ -194,6 +194,9 @@ static void cb_scroll(GtkWidget *wid, GdkEvent *event, gTabStrip *data) int page; if (dir == GDK_SCROLL_SMOOTH) + return; + + /* { gdouble dx = 0, dy = 0; gdk_event_get_scroll_deltas((GdkEvent *)event, &dx, &dy); @@ -201,7 +204,7 @@ static void cb_scroll(GtkWidget *wid, GdkEvent *event, gTabStrip *data) dir = (dy < 0) ? GDK_SCROLL_UP : GDK_SCROLL_DOWN; else dir = (dx < 0) ? GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT; - } + }*/ page = gtk_notebook_get_current_page(GTK_NOTEBOOK(data->widget)); diff --git a/gb.gtk/src/gtrayicon.cpp b/gb.gtk/src/gtrayicon.cpp index e18ee7eae..71a3af484 100644 --- a/gb.gtk/src/gtrayicon.cpp +++ b/gb.gtk/src/gtrayicon.cpp @@ -132,14 +132,15 @@ static gboolean cb_scroll(GtkStatusIcon *plug, GdkEventScroll *event, gTrayIcon #ifdef GTK3 if (dir == GDK_SCROLL_SMOOTH) - { + return false; + /*{ gdouble dx = 0, dy = 0; gdk_event_get_scroll_deltas((GdkEvent *)event, &dx, &dy); if (fabs(dy) > fabs(dx)) dir = (dy < 0) ? GDK_SCROLL_UP : GDK_SCROLL_DOWN; else dir = (dx < 0) ? GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT; - } + }*/ #endif switch (dir)