diff options
| author | nyamatongwe <unknown> | 2015-09-05 09:35:25 +1000 |
|---|---|---|
| committer | nyamatongwe <unknown> | 2015-09-05 09:35:25 +1000 |
| commit | 8139c396aa6575de004f07cb0708f5185842a443 (patch) | |
| tree | 3f88cf1b12d0ca085e18ef920e06163380369a5d /gtk/PlatGTK.cxx | |
| parent | 987242ff2c26b1f2223679407eeb5d848f019b66 (diff) | |
| download | scintilla-mirror-8139c396aa6575de004f07cb0708f5185842a443.tar.gz | |
Remove #if sections which are not required for GTK+ 2.18.
Diffstat (limited to 'gtk/PlatGTK.cxx')
| -rw-r--r-- | gtk/PlatGTK.cxx | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 3cb81ceab..fac29fd9f 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -74,11 +74,7 @@ static cairo_surface_t *CreateSimilarSurface(GdkWindow *window, cairo_content_t } static GdkWindow *WindowFromWidget(GtkWidget *w) { -#if GTK_CHECK_VERSION(3,0,0) return gtk_widget_get_window(w); -#else - return w->window; -#endif } #ifdef _MSC_VER @@ -1248,11 +1244,7 @@ PRectangle Window::GetPosition() { PRectangle rc(0, 0, 1000, 1000); if (wid) { GtkAllocation allocation; -#if GTK_CHECK_VERSION(3,0,0) gtk_widget_get_allocation(PWidget(wid), &allocation); -#else - allocation = PWidget(wid)->allocation; -#endif rc.left = allocation.x; rc.top = allocation.y; if (allocation.width > 20) { @@ -1911,14 +1903,12 @@ void ListBoxX::Select(int n) { #if GTK_CHECK_VERSION(3,0,0) GtkAdjustment *adj = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(list)); - gfloat value = ((gfloat)n / total) * (gtk_adjustment_get_upper(adj) - gtk_adjustment_get_lower(adj)) - + gtk_adjustment_get_lower(adj) - gtk_adjustment_get_page_size(adj) / 2; #else GtkAdjustment *adj = gtk_tree_view_get_vadjustment(GTK_TREE_VIEW(list)); - gfloat value = ((gfloat)n / total) * (adj->upper - adj->lower) - + adj->lower - adj->page_size / 2; #endif + gfloat value = ((gfloat)n / total) * (gtk_adjustment_get_upper(adj) - gtk_adjustment_get_lower(adj)) + + gtk_adjustment_get_lower(adj) - gtk_adjustment_get_page_size(adj) / 2; // Get cell height int row_height = GetRowHeight(); @@ -1932,13 +1922,8 @@ void ListBoxX::Select(int n) { } // Clamp it. value = (value < 0)? 0 : value; -#if GTK_CHECK_VERSION(3,0,0) value = (value > (gtk_adjustment_get_upper(adj) - gtk_adjustment_get_page_size(adj)))? (gtk_adjustment_get_upper(adj) - gtk_adjustment_get_page_size(adj)) : value; -#else - value = (value > (adj->upper - adj->page_size))? - (adj->upper - adj->page_size) : value; -#endif // Set it. gtk_adjustment_set_value(adj, value); |
