Skip to content

Commit ebb1535

Browse files
committed
Remove remnants of GTK+ 2 support
GTK+ 3 is now required to build Poedit. This was probably the case in practice already…
1 parent 0459ee8 commit ebb1535

4 files changed

Lines changed: 3 additions & 54 deletions

File tree

configure.ac

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -191,28 +191,13 @@ AC_COMPILE_IFELSE(
191191
])],
192192
[
193193
AC_MSG_RESULT([yes])
194-
gtkspell_packages="gtkspell3-3.0 gtk+-3.0"
195194
],
196195
[
197196
AC_MSG_RESULT([no])
198-
AC_MSG_CHECKING([if wxWidgets toolkit uses GTK+ 2])
199-
AC_COMPILE_IFELSE(
200-
[AC_LANG_PROGRAM([#include <wx/defs.h>], [
201-
#ifndef __WXGTK20__
202-
#error "not GTK+ 2"
203-
#endif
204-
])],
205-
[
206-
AC_MSG_RESULT([yes])
207-
gtkspell_packages="gtkspell-2.0 gtk+-2.0 >= 2.20"
208-
],
209-
[
210-
AC_MSG_RESULT([no])
211-
AC_MSG_ERROR([GTK+ build of wxWidgets is required])
212-
])
197+
AC_MSG_ERROR([GTK3+ build of wxWidgets is required])
213198
])
214199

215-
PKG_CHECK_MODULES([GTKSPELL], [$gtkspell_packages],
200+
PKG_CHECK_MODULES([GTKSPELL], [gtkspell3-3.0 gtk+-3.0],
216201
[
217202
CXXFLAGS="$CXXFLAGS $GTKSPELL_CFLAGS"
218203
LIBS="$LIBS $GTKSPELL_LIBS"

src/icons.cpp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,6 @@
4646
namespace
4747
{
4848

49-
#if defined(__WXGTK20__) && !defined(__WXGTK3__)
50-
// translates poedit item id or Tango stock item id to "legacy" GNOME id:
51-
wxString GetGnomeStockId(const wxString& id)
52-
{
53-
#define MAP(poedit, gnome) if ( id == _T(poedit) ) return _T(gnome)
54-
55-
MAP("document-open", "gtk-open");
56-
MAP("document-save", "gtk-save");
57-
MAP("window-close", "gtk-close");
58-
59-
MAP("folder-open@symbolic", "gtk-jump-to");
60-
MAP("list-add@symbolic", "list-add");
61-
MAP("list-remove@symbolic", "list-remove");
62-
63-
#undef MAP
64-
65-
return wxEmptyString; // no match found
66-
}
67-
#endif // __WXGTK20__
68-
6949
// Check if a given icon needs mirroring in right-to-left locales:
7050
bool ShouldBeMirorredInRTL(const wxArtID& id, const wxArtClient& client)
7151
{
@@ -180,18 +160,6 @@ wxBitmap PoeditArtProvider::CreateBitmap(const wxArtID& id_,
180160
// theme provider (that uses current icon theme and files from
181161
// /usr/share/icons/<theme>) didn't find any matching icon.
182162

183-
#if defined(__WXGTK20__) && !defined(__WXGTK3__)
184-
// try legacy GNOME icons from standard theme:
185-
wxString gnomeId = GetGnomeStockId(id);
186-
if ( !gnomeId.empty() )
187-
{
188-
wxLogTrace("poedit.icons", "-> legacy '%s'", gnomeId.c_str());
189-
wxBitmap gbmp(wxArtProvider::GetBitmap(gnomeId, client, size));
190-
if ( gbmp.Ok() )
191-
return gbmp;
192-
}
193-
#endif // defined(__WXGTK20__) && !defined(__WXGTK3__)
194-
195163
#ifdef __WXGTK3__
196164
CHECK_FOR_VARIANT(symbolic);
197165
if (symbolicVariant)

src/icons.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828

2929
#include <wx/artprov.h>
3030

31-
#if defined(__WXGTK20__)
32-
#define HAS_THEMES_SUPPORT
33-
#endif
34-
3531
#ifndef __WXOSX__
3632
class PoeditArtProvider : public wxArtProvider
3733
{

src/wx/main_toolbar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include <wx/msw/uxtheme.h>
3939
#endif
4040

41-
#ifdef __WXGTK__
41+
#ifdef __WXGTK3__
4242
#include <gtk/gtk.h>
4343
#endif
4444

0 commit comments

Comments
 (0)