Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Mon, 02 Nov 2020 13:45:44 UTC
Commit: 9c2b7da3f58474285338696bf0617c79bd3ee45c
https://github.com/geany/geany/commit/9c2b7da3f58474285338696bf0617c79bd3ee…
Log Message:
-----------
Remove some more GTK2 occurrences and adjust a few comments
Modified Paths:
--------------
.travis.yml
HACKING
doc/plugins.dox
plugins/splitwindow.c
scripts/gtk-bundle-from-msys2.sh
src/geanywraplabel.c
src/gtkcompat.h
src/msgwindow.c
src/plugindata.h
src/stash.c
src/ui_utils.c
src/vte.c
Modified: .travis.yml
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -26,9 +26,10 @@ script:
- NOCONFIGURE=1 ./autogen.sh
- >
if [ -n "$MINGW" ]; then
+ unset CC CXX;
sh ./scripts/cross-build-mingw.sh;
else
- CONFIGURE_FLAGS="--enable-gtk2=$GTK2 --enable-binreloc=$BINRELOC";
+ CONFIGURE_FLAGS="--enable-binreloc=$BINRELOC";
mkdir _build &&
cd _build &&
{ ../configure $CONFIGURE_FLAGS || { cat config.log; exit 1; } ; } &&
Modified: HACKING
12 lines changed, 6 insertions(+), 6 deletions(-)
===================================================================
@@ -167,11 +167,11 @@ unmanageable diffs.
GTK versions & API documentation
--------------------------------
-Geany requires GTK >= 2.24 or GTK 3 (with the --enable-gtk3 configure option)
-and GLib >= 2.32. API symbols from newer GTK/GLib versions should be
-avoided or made optional to keep the source code building on older systems.
+Geany requires GTK >= 3.0 and GLib >= 2.32. API symbols from newer GTK/GLib
+versions should be avoided or made optional to keep the source code building
+on older systems.
-It is recommended to use the 2.24 API documentation of the GTK
+It is recommended to use the 3.0 API documentation of the GTK
libs (including GLib, GDK and Pango) has the advantages
that you don't get confused by any newer API additions and you
don't have to take care about whether you can use them or not.
@@ -196,8 +196,8 @@ Coding
them down into smaller static functions where possible. This makes code
much easier to read and maintain.
* Use GLib types and functions - gint not int, g_free() not free().
-* Your code should build against GLib 2.32 and GTK 2.24. At least for the
- moment, we want to keep the minimum requirement for GTK at 2.24 (of
+* Your code should build against GLib 2.32 and GTK 3.0. At least for the
+ moment, we want to keep the minimum requirement for GTK at 3.0 (of
course, you can use the GTK_CHECK_VERSION macro to protect code using
later versions).
* Variables should be declared (and initialized) as close as practical
Modified: doc/plugins.dox
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -159,7 +159,7 @@ following.
First you need to have Geany installed. Then install the development files for GTK
and its dependencies. The easiest way to do this is to use your distribution's package
management system, e.g. on Debian and Ubuntu systems you can use
-@code apt-get install libgtk2.0-dev intltool @endcode
+@code apt-get install libgtk-3-dev intltool @endcode
This will install all necessary files to be able to compile plugins for Geany. On other
distributions, the package names and commands to use may differ.
Modified: plugins/splitwindow.c
4 lines changed, 0 insertions(+), 4 deletions(-)
===================================================================
@@ -256,7 +256,6 @@ static void on_doc_show_menu(GtkMenuToolButton *button, GtkMenu *menu)
}
-#if GTK_CHECK_VERSION(3, 0, 0)
/* Blocks the ::show-menu signal if the menu's parent toggle button was inactive in the previous run.
* This is a hack to workaround https://bugzilla.gnome.org/show_bug.cgi?id=769287
* and should NOT be used for any other version than 3.15.9 to 3.21.4, although the code tries and
@@ -281,7 +280,6 @@ static void show_menu_gtk316_fix(GtkMenuToolButton *button, gpointer data)
block_next = TRUE;
}
}
-#endif
static GtkWidget *create_toolbar(void)
@@ -302,11 +300,9 @@ static GtkWidget *create_toolbar(void)
item = gtk_menu_new();
gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(tool_item), item);
-#if GTK_CHECK_VERSION (3, 0, 0)
/* hack for https://bugzilla.gnome.org/show_bug.cgi?id=769287 */
if (! gtk_check_version(3, 15, 9) && gtk_check_version(3, 21, 4+1))
g_signal_connect(tool_item, "show-menu", G_CALLBACK(show_menu_gtk316_fix), NULL);
-#endif
g_signal_connect(tool_item, "show-menu", G_CALLBACK(on_doc_show_menu), item);
tool_item = gtk_tool_item_new();
Modified: scripts/gtk-bundle-from-msys2.sh
8 lines changed, 1 insertions(+), 7 deletions(-)
===================================================================
@@ -18,7 +18,6 @@ UNX_UTILS_URL="https://download.geany.org/contrib/UnxUpdates.zip"
MSYS2_ABI_PATH="/c/msys32"
package_urls=""
-gtk2_dependency_pkgs=""
gtk3_dependency_pkgs="
libepoxy
hicolor-icon-theme
@@ -61,23 +60,19 @@ handle_command_line_options() {
"-z"|"--zip")
make_zip="yes"
;;
- "-2")
- gtkv="2"
- ;;
"-3")
gtkv="3"
;;
"-n")
run_pi=""
;;
"-h"|"--help")
- echo "gtk-bundle-from-msys2.sh [-c] [-h] [-n] [-z] [-2 | -3] [CACHEDIR]"
+ echo "gtk-bundle-from-msys2.sh [-c] [-h] [-n] [-z] [-3] [CACHEDIR]"
echo " -c Use pacman cache. Otherwise pacman will download"
echo " archive files"
echo " -h Show this help screen"
echo " -n Do not run post install scripts of the packages"
echo " -z Create a zip afterwards"
- echo " -2 Prefer gtk2"
echo " -3 Prefer gtk3"
echo "CACHEDIR Directory where to look for cached packages (default: /var/cache/pacman/pkg)"
exit 1
@@ -199,7 +194,6 @@ cleanup_unnecessary_files() {
rm -rf share/glib-2.0/gdb
rm -rf share/glib-2.0/gettext
rm -rf share/graphite2
- rm -rf share/gtk-2.0
rm -rf share/gtk-3.0
rm -rf share/gtk-doc
rm -rf share/info
Modified: src/geanywraplabel.c
1 lines changed, 0 insertions(+), 1 deletions(-)
===================================================================
@@ -58,7 +58,6 @@ static void geany_wrap_label_get_preferred_width_for_height (GtkWidget *widget,
static void geany_wrap_label_get_preferred_height_for_width (GtkWidget *widget,
gint width, gint *minimal_height, gint *natural_height);
static GtkSizeRequestMode geany_wrap_label_get_request_mode(GtkWidget *widget);
-
static void geany_wrap_label_size_allocate (GtkWidget *widget, GtkAllocation *alloc);
static void geany_wrap_label_set_wrap_width (GtkWidget *widget, gint width);
static void geany_wrap_label_label_notify (GObject *object, GParamSpec *pspec, gpointer data);
Modified: src/gtkcompat.h
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -20,7 +20,8 @@
/* Compatibility macros to support older GTK+ versions
*
- * TODO: This file can be removed once the code is updated to use GTK3 keysyms.
+ * Although this file might not be useful anymore, it might be used by plugins
+ * so it cannot be removed without care.
*/
#ifndef GTK_COMPAT_H
Modified: src/msgwindow.c
10 lines changed, 0 insertions(+), 10 deletions(-)
===================================================================
@@ -120,7 +120,6 @@ void msgwin_set_messages_dir(const gchar *messages_dir)
static void load_color(const gchar *color_name, GdkColor *color)
{
-#if GTK_CHECK_VERSION(3, 0, 0)
GdkRGBA rgba_color;
GtkWidgetPath *path = gtk_widget_path_new();
GtkStyleContext *ctx = gtk_style_context_new();
@@ -137,15 +136,6 @@ static void load_color(const gchar *color_name, GdkColor *color)
gtk_widget_path_unref(path);
g_object_unref(ctx);
-#else
- gchar *path = g_strconcat("*.", color_name, NULL);
-
- GtkSettings *settings = gtk_settings_get_default();
- GtkStyle *style = gtk_rc_get_style_by_paths(settings, path, NULL, GTK_TYPE_WIDGET);
- *color = style->fg[GTK_STATE_NORMAL];
-
- g_free(path);
-#endif
}
Modified: src/plugindata.h
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -60,9 +60,9 @@ G_BEGIN_DECLS
*/
#define GEANY_API_VERSION 239
-
-/* when gtk2 and gtk3 were both supported at the same time this was used
- * to prevent loading gtk2 plugins with gtk3 Geany or vice versa. */
+/* hack to have a different ABI when built with different GTK major versions
+ * because loading plugins linked to a different one leads to crashes.
+ * Only GTK3 is currently supported. */
#define GEANY_ABI_SHIFT 8
/** The Application Binary Interface (ABI) version, incremented whenever
* existing fields in the plugin data types have to be changed or reordered.
Modified: src/stash.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -83,9 +83,9 @@
#include <stdlib.h> /* only for atoi() */
+/* GTK3 removed ComboBoxEntry, but we need a value to differentiate combo box with and
+ * without entries, and it must not collide with other GTypes */
#define TYPE_COMBO_BOX_ENTRY get_combo_box_entry_type()
-
-
static GType get_combo_box_entry_type(void)
{
static volatile gsize type = 0;
Modified: src/ui_utils.c
1 lines changed, 0 insertions(+), 1 deletions(-)
===================================================================
@@ -2525,7 +2525,6 @@ static void load_css_theme(const gchar *fn, guint priority)
}
-// see setup_gtk2_styles() in libmain.c for GTK+ 2-specific theme initialization
static void init_css_styles(void)
{
gchar *theme_fn;
Modified: src/vte.c
6 lines changed, 2 insertions(+), 4 deletions(-)
===================================================================
@@ -199,7 +199,7 @@ static void rgba_from_color(GdkRGBA *rgba, const GdkColor *color)
rgba->alpha = 1.0;
}
-# define WRAP_RGBA_SETTER(name) \
+#define WRAP_RGBA_SETTER(name) \
static void wrap_##name(VteTerminal *terminal, const GdkColor *color) \
{ \
GdkRGBA rgba; \
@@ -272,11 +272,9 @@ void vte_init(void)
#ifdef __APPLE__
"libvte-2.91.0.dylib", "libvte-2.91.dylib",
"libvte2_90.9.dylib", "libvte2_90.dylib",
-#else
+#endif
"libvte-2.91.so", "libvte-2.91.so.0",
"libvte2_90.so", "libvte2_90.so.9",
- "libvte.so", "libvte.so.9", "libvte.so.8", "libvte.so.4",
-#endif
NULL
};
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Mon, 02 Nov 2020 20:10:18 UTC
Commit: a99426b01953559863a11f6cb9101d5a4f38c7db
https://github.com/geany/geany/commit/a99426b01953559863a11f6cb9101d5a4f38c…
Log Message:
-----------
doc: Re-add the search fields font customization section
Modified Paths:
--------------
doc/geany.txt
Modified: doc/geany.txt
17 lines changed, 17 insertions(+), 0 deletions(-)
===================================================================
@@ -1195,6 +1195,23 @@ colored box. These markers can be removed by selecting the
Remove Markers command from the Document menu.
+Change font in search dialog text fields
+````````````````````````````````````````
+
+All search related dialogs use a Monospace font for the text input fields to
+increase the readability of input text. This is useful when you are
+typing input such as regular expressions with spaces, periods and commas which
+might be hard to read with a proportional font.
+
+If you want to change the font, you can do this easily by using the following
+custom CSS snippet, see `Customizing Geany's appearance using GTK+ CSS`_::
+
+ #GeanyDialogSearch GtkEntry /* GTK < 3.20 */,
+ #GeanyDialogSearch entry /* GTK >= 3.20 */ {
+ font: 8pt monospace;
+ }
+
+
Find selection
^^^^^^^^^^^^^^
The *Find Next/Previous Selection* commands perform a search for the
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Mon, 02 Nov 2020 20:10:54 UTC
Commit: 973623032716617defa4383232ab23dd03941d21
https://github.com/geany/geany/commit/973623032716617defa4383232ab23dd03941…
Log Message:
-----------
doc: Re-add the section about print preview, updated for GTK3
Modified Paths:
--------------
doc/geany.txt
Modified: doc/geany.txt
17 lines changed, 17 insertions(+), 0 deletions(-)
===================================================================
@@ -3216,6 +3216,23 @@ same as the ones which can be used with the ANSI C strftime function.
All of these settings can also be changed in the print dialog just before
actual printing is done.
+On Unix-like systems the provided print dialog offers a print preview. The
+preview file is opened with a PDF viewer and by default GTK uses ``evince``
+for print preview. If you have not installed evince or just want to use
+another PDF viewer, you can change the program to use in the file
+``settings.ini`` (usually found in ``~/.config/gtk-3.0``, see the
+`GTK documentation`_). For example, use::
+
+ [Settings]
+ gtk-print-preview-command = epdfview %f
+
+Of course, you can also use xpdf, kpdf or whatever as the print preview
+command. That command should ideally delete the temporary file referenced by
+``%f``. See the `GTK documentation for the setting`_ for more details.
+
+.. _GTK documentation: https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings.descri…
+.. _GTK documentation for the setting: https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-p…
+
Geany also provides an alternative basic printing support using a custom
print command. However, the printed document contains no syntax highlighting.
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Matthew Brush <matt(a)geany.org>
Committer: Matthew Brush <matt(a)geany.org>
Date: Sun, 04 Oct 2020 13:04:31 UTC
Commit: 12383562064b28ff11436106fb7a051eb267785c
https://github.com/geany/geany/commit/12383562064b28ff11436106fb7a051eb2677…
Log Message:
-----------
Remove GTK2 from `cross-build-mingw.sh` script
Modified Paths:
--------------
scripts/cross-build-mingw.sh
Modified: scripts/cross-build-mingw.sh
19 lines changed, 3 insertions(+), 16 deletions(-)
===================================================================
@@ -15,24 +15,18 @@
# You may change those
HOST=i686-w64-mingw32
-GTK2_BUNDLE_ZIP="https://download.geany.org/contrib/gtk/gtk+-bundle_2.24.10-20120208_win32.z…"
-GTK3_BUNDLE_ZIP="https://download.geany.org/contrib/gtk/gtk+-bundle_3.8.2-20131001_win32.zip"
+GTK_BUNDLE_ZIP="https://download.geany.org/contrib/gtk/gtk+-bundle_3.8.2-20131001_win32.zip"
BUILDDIR=_build-cross-mingw
-GTK3=yes
CONFIGUREFLAGS="--enable-nls"
MAKEFLAGS="${MAKEFLAGS:--j2}"
while getopts '32b:h' o; do
case "$o" in
- 3) GTK3=yes;;
- 2) GTK3=no;;
b) BUILDDIR="$OPTARG";;
h)
cat <<EOF
-USAGE: $0 [-2|-3] [-b DIR] [-h]
+USAGE: $0 [-b DIR] [-h]
--2 Build against GTK2 (deprecated)
--3 Build against GTK3 (default)
-b DIR Use DIR as build directory
-h Show this help and exit
EOF
@@ -81,14 +75,7 @@ cd "$BUILDDIR"
mkdir _deps
-# both the GTK2 and GTK3 build require files from the GTK3 bundle
-# so download and unzip it unconditionally
-fetch_and_unzip "$GTK3_BUNDLE_ZIP" _deps
-
-if [ "$GTK3" = no ]; then
- fetch_and_unzip "$GTK2_BUNDLE_ZIP" _deps
- CONFIGUREFLAGS="$CONFIGUREFLAGS --enable-gtk2=yes"
-fi
+fetch_and_unzip "$GTK_BUNDLE_ZIP" _deps
# fixup the prefix= in the pkg-config files
sed -i "s%^\(prefix=\).*$%\1$PWD/_deps%" _deps/lib/pkgconfig/*.pc
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Matthew Brush <matt(a)geany.org>
Committer: Matthew Brush <matt(a)geany.org>
Date: Sun, 04 Oct 2020 12:31:01 UTC
Commit: d065c5098508f660d5f8ac16700d1c5a3e4e653c
https://github.com/geany/geany/commit/d065c5098508f660d5f8ac16700d1c5a3e4e6…
Log Message:
-----------
Initial pass at remove GTK+2
Updating the build system and some of the conditional code.
More to come.
Modified Paths:
--------------
HACKING
README
configure.ac
data/Makefile.am
src/gtkcompat.h
src/plugindata.h
src/stash.c
Modified: HACKING
3 lines changed, 0 insertions(+), 3 deletions(-)
===================================================================
@@ -791,9 +791,6 @@ Building Plugins
The geany-plugins autotools script automatically detects the
installed system Geany and builds the plugins against that.
-Plugins will build with either GTK2 or GTK3, whichever the detected
-Geany was built with.
-
To use plugins with a development version of Geany built with
a different prefix, the plugins will need to be compiled against
that version if the ABI has changed.
Modified: README
8 lines changed, 4 insertions(+), 4 deletions(-)
===================================================================
@@ -49,10 +49,10 @@ Installation from sources
Requirements
++++++++++++
-For compiling Geany yourself, you will need the GTK2 (>= 2.24) or
-GTK3 libraries and header files. You will also need its dependency libraries
-and header files, such as Pango, Glib and ATK. All these files are
-available at https://www.gtk.org.
+For compiling Geany yourself, you will need the GTK3 libraries and
+header files. You will also need its dependency libraries and header
+files, such as Pango, Glib and ATK. All these files are available at
+https://www.gtk.org.
Furthermore you need, of course, a C compiler and the Make tool; a C++
compiler is also needed for the required Scintilla library included. The
Modified: configure.ac
29 lines changed, 4 insertions(+), 25 deletions(-)
===================================================================
@@ -71,38 +71,17 @@ AC_CHECK_DECLS([_NSGetEnviron],,,[[#include <crt_externs.h>]])
GEANY_CHECK_REVISION([dnl force debug mode for a VCS working copy
CFLAGS="-g -DGEANY_DEBUG $CFLAGS"])
-# GTK version check
-AC_ARG_ENABLE([gtk2],
- [AS_HELP_STRING([--enable-gtk2],
- [compile against deprecated GTK2 [default=no]])],
- [enable_gtk2=$enableval],
- [enable_gtk2=no])
-
-gtk2_package=gtk+-2.0
-gtk2_min_version=2.24
-gtk3_package=gtk+-3.0
-gtk3_min_version=3.0
-
-AS_IF([test "x$enable_gtk2" = "xyes"],
- [gtk_package=$gtk2_package
- gtk_min_version=$gtk2_min_version],
- [gtk_package=$gtk3_package
- gtk_min_version=$gtk3_min_version])
-
-AM_CONDITIONAL([GTK3], [test "x$gtk_package" = "x$gtk3_package"])
-
# GTK/GLib/GIO checks
-gtk_modules="$gtk_package >= $gtk_min_version glib-2.0 >= 2.32"
+gtk_modules="gtk+-3.0 >= 3.0 glib-2.0 >= 2.32"
gtk_modules_private="gio-2.0 >= 2.32 gmodule-no-export-2.0"
PKG_CHECK_MODULES([GTK], [$gtk_modules $gtk_modules_private])
AC_SUBST([DEPENDENCIES], [$gtk_modules])
AS_VAR_APPEND([GTK_CFLAGS], [" -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"])
-dnl Disable all GTK deprecations on 3.x so long as we want to keep 2.x support and only require 3.0.
-dnl No need on 2.x as we target the latest version.
-AM_COND_IF([GTK3], [AS_VAR_APPEND([GTK_CFLAGS], [" -DGDK_DISABLE_DEPRECATION_WARNINGS"])])
+dnl Disable all GTK deprecations
+AS_VAR_APPEND([GTK_CFLAGS], [" -DGDK_DISABLE_DEPRECATION_WARNINGS"])
AC_SUBST([GTK_CFLAGS])
AC_SUBST([GTK_LIBS])
-GTK_VERSION=`$PKG_CONFIG --modversion $gtk_package`
+GTK_VERSION=`$PKG_CONFIG --modversion gtk+-3.0`
AC_SUBST([GTK_VERSION])
GEANY_STATUS_ADD([Using GTK version], [${GTK_VERSION}])
# GTHREAD checks
Modified: data/Makefile.am
5 lines changed, 0 insertions(+), 5 deletions(-)
===================================================================
@@ -119,12 +119,7 @@ nobase_dist_pkgdata_DATA = \
ui_toolbar.xml \
geany.glade
-if GTK3
nobase_dist_pkgdata_DATA += \
geany-3.0.css \
geany-3.20.css \
geany.css
-else
-nobase_dist_pkgdata_DATA += geany.gtkrc
-endif
-
Modified: src/gtkcompat.h
81 lines changed, 5 insertions(+), 76 deletions(-)
===================================================================
@@ -18,86 +18,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* Compatibility macros to support older GTK+ versions */
+/* Compatibility macros to support older GTK+ versions
+ *
+ * TODO: This file can be removed once the code is updated to use GTK3 keysyms.
+ */
#ifndef GTK_COMPAT_H
#define GTK_COMPAT_H 1
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-# include <gdk/gdkkeysyms-compat.h>
-#endif
-
-G_BEGIN_DECLS
-
-
-/* GtkComboBoxText */
-/* This is actually available in GTK 2.24, but we expose GtkComboBoxText in the
- * API so we don't want the type to change for no good reason (although this
- * should probably be harmless since it's only a derivated type). However, since
- * a plugin needs to be rebuilt and tuned to work with GTK3 we don't mind that
- * a type changes between the GTK2 and GTK3 version */
-#if ! GTK_CHECK_VERSION(3, 0, 0)
-/* undef those not to get warnings about redefinitions under GTK 2.24 */
-# undef GTK_COMBO_BOX_TEXT
-# undef GTK_COMBO_BOX_TEXT_CLASS
-# undef GTK_COMBO_BOX_TEXT_GET_CLASS
-# undef GTK_IS_COMBO_BOX_TEXT
-# undef GTK_IS_COMBO_BOX_TEXT_CLASS
-# undef GTK_TYPE_COMBO_BOX_TEXT
-
-# define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
-# define GTK_COMBO_BOX_TEXT_CLASS GTK_COMBO_BOX_CLASS
-# define GTK_COMBO_BOX_TEXT_GET_CLASS GTK_COMBO_BOX_GET_CLASS
-# define GTK_IS_COMBO_BOX_TEXT GTK_IS_COMBO_BOX
-# define GTK_IS_COMBO_BOX_TEXT_CLASS GTK_IS_COMBO_BOX_CLASS
-# define GTK_TYPE_COMBO_BOX_TEXT GTK_TYPE_COMBO_BOX
-# define GtkComboBoxText GtkComboBox
-# define gtk_combo_box_text_new gtk_combo_box_new_text
-# define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
-# define gtk_combo_box_text_append_text gtk_combo_box_append_text
-# define gtk_combo_box_text_insert_text gtk_combo_box_insert_text
-# define gtk_combo_box_text_prepend_text gtk_combo_box_prepend_text
-# define gtk_combo_box_text_remove gtk_combo_box_remove_text
-# define gtk_combo_box_text_get_active_text gtk_combo_box_get_active_text
-#endif
-
-/* GtkWidget */
-#if ! GTK_CHECK_VERSION(3, 0, 0)
-# define gtk_widget_get_allocated_height(widget) (((GtkWidget *) (widget))->allocation.height)
-# define gtk_widget_get_allocated_width(widget) (((GtkWidget *) (widget))->allocation.width)
-#endif
-
-
-/* Mappings below only prevent some deprecation warnings on GTK3 for things
- * that didn't exist on GTK2. That's not future-proof. */
-#if GTK_CHECK_VERSION(3, 0, 0)
-/* Gtk[VH]Box */
-# define compat_gtk_box_new(orientation, homogeneous, spacing) \
- ((GtkWidget *)g_object_new(GTK_TYPE_BOX, \
- "orientation", (orientation), \
- "homogeneous", (homogeneous), \
- "spacing", (spacing), \
- NULL))
-# define gtk_vbox_new(homogeneous, spacing) \
- compat_gtk_box_new(GTK_ORIENTATION_VERTICAL, (homogeneous), (spacing))
-# define gtk_hbox_new(homogeneous, spacing) \
- compat_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, (homogeneous), (spacing))
-/* Gtk[VH]ButtonBox */
-# define gtk_vbutton_box_new() gtk_button_box_new(GTK_ORIENTATION_VERTICAL)
-# define gtk_hbutton_box_new() gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL)
-/* Gtk[VH]Separator */
-# define gtk_vseparator_new() gtk_separator_new(GTK_ORIENTATION_VERTICAL)
-# define gtk_hseparator_new() gtk_separator_new(GTK_ORIENTATION_HORIZONTAL)
-/* Gtk[VH]Paned */
-# define gtk_vpaned_new() gtk_paned_new(GTK_ORIENTATION_VERTICAL)
-# define gtk_hpaned_new() gtk_paned_new(GTK_ORIENTATION_HORIZONTAL)
-/* Gtk[VH]Scrollbar */
-# define gtk_vscrollbar_new(adj) gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, (adj))
-# define gtk_hscrollbar_new(adj) gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, (adj))
-#endif
-
-
-G_END_DECLS
+#include <gdk/gdkkeysyms-compat.h>
#endif /* GTK_COMPAT_H */
Modified: src/plugindata.h
11 lines changed, 4 insertions(+), 7 deletions(-)
===================================================================
@@ -60,13 +60,10 @@ G_BEGIN_DECLS
*/
#define GEANY_API_VERSION 239
-/* hack to have a different ABI when built with GTK3 because loading GTK2-linked plugins
- * with GTK3-linked Geany leads to crash */
-#if GTK_CHECK_VERSION(3, 0, 0)
-# define GEANY_ABI_SHIFT 8
-#else
-# define GEANY_ABI_SHIFT 0
-#endif
+
+/* when gtk2 and gtk3 were both supported at the same time this was used
+ * to prevent loading gtk2 plugins with gtk3 Geany or vice versa. */
+#define GEANY_ABI_SHIFT 8
/** The Application Binary Interface (ABI) version, incremented whenever
* existing fields in the plugin data types have to be changed or reordered.
* Changing this forces all plugins to be recompiled before Geany can load them. */
Modified: src/stash.c
10 lines changed, 3 insertions(+), 7 deletions(-)
===================================================================
@@ -83,12 +83,9 @@
#include <stdlib.h> /* only for atoi() */
-/* GTK3 removed ComboBoxEntry, but we need a value to differentiate combo box with and
- * without entries, and it must not collide with other GTypes */
-#ifdef GTK_TYPE_COMBO_BOX_ENTRY
-# define TYPE_COMBO_BOX_ENTRY GTK_TYPE_COMBO_BOX_ENTRY
-#else /* !GTK_TYPE_COMBO_BOX_ENTRY */
-# define TYPE_COMBO_BOX_ENTRY get_combo_box_entry_type()
+#define TYPE_COMBO_BOX_ENTRY get_combo_box_entry_type()
+
+
static GType get_combo_box_entry_type(void)
{
static volatile gsize type = 0;
@@ -100,7 +97,6 @@ static GType get_combo_box_entry_type(void)
}
return type;
}
-#endif /* !GTK_TYPE_COMBO_BOX_ENTRY */
struct StashPref
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).