Commit f590e923 authored by Matthew Brush's avatar Matthew Brush

Remove support for GTK+2

Of note is that the code for the "multi-select" feature was
removed entirely since it was only compatible with GTK+2 and
was only enabled for it. It can be added back if anyone wants
to contribute a GTK+3-compatible version of the feature.
parent 07f6061f
Pipeline #944 failed with stages
in 1 minute and 15 seconds
......@@ -17,10 +17,10 @@ and integrate this new feature in **Mousepad**.
Mousepad depends on the following packages:
* [GTK](https://www.gtk.org) >=2.24.0 or >=3.20.0
* [GTK](https://www.gtk.org) >=3.20.0
* [GLib](https://wiki.gnome.org/Projects/GLib) >=2.42.0
* [xfconf](https://gitlab.xfce.org/xfce/xfconf) >=4.12.0
* [GtkSourceView](https://wiki.gnome.org/Projects/GtkSourceView) >=2.0 or >=3.0
* [GtkSourceView](https://wiki.gnome.org/Projects/GtkSourceView) >=3.20
The following packages are optional:
......
......@@ -85,32 +85,8 @@ dnl ***********************************
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.42.0])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.42.0])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0])
dnl **********************
dnl *** GTK+ 3 support ***
dnl **********************
AC_ARG_ENABLE([gtk3],
[AS_HELP_STRING([--enable-gtk3],
[Build against GTK+ 3 instead of GTK+ 2])],
[enable_gtk3=$enableval],
[enable_gtk3=auto])
AS_IF([test "x$enable_gtk3" = "xyes"],
[PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.20])])
AS_IF([test "x$enable_gtk3" = "xauto"],
[PKG_CHECK_MODULES([GTK], [gtk+-3.0],
[enable_gtk3=yes], [enable_gtk3=no])])
AS_IF([test "x$enable_gtk3" = "xno"],
[PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.24])])
AS_IF([test "x$enable_gtk3" = "xyes"],
[PKG_CHECK_MODULES([GTKSOURCEVIEW], [gtksourceview-3.0])],
[PKG_CHECK_MODULES([GTKSOURCEVIEW], [gtksourceview-2.0])])
AM_CONDITIONAL([WITH_GTK3], [test "x$enable_gtk3" = "xyes"])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.20.0])
XDT_CHECK_PACKAGE([GTKSOURCEVIEW], [gtksourceview-3.0], [3.20.0])
dnl ************************************
dnl *** Enable support for GSettings ***
......@@ -182,5 +158,4 @@ echo
echo "* D-BUS support: $enable_dbus"
echo "* Debug Support: $enable_debug"
echo "* Use keyfile backend: $enable_keyfile_settings"
echo "* Build with GTK+ 3: $enable_gtk3"
echo
......@@ -16,17 +16,12 @@
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-action-group.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-language-action.h>
#include <mousepad/mousepad-style-scheme-action.h>
#include <mousepad/mousepad-settings.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcelanguagemanager.h>
#include <gtksourceview/gtksourcestyleschememanager.h>
#endif
enum
......
......@@ -18,12 +18,8 @@
#define __MOUSEPAD_ACTION_GROUP_H__ 1
#include <gtk/gtk.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcelanguage.h>
#include <gtksourceview/gtksourcestylescheme.h>
#endif
G_BEGIN_DECLS
......
......@@ -18,40 +18,9 @@ G_DEFINE_TYPE (MousepadCloseButton, mousepad_close_button, GTK_TYPE_BUTTON)
#if ! GTK_CHECK_VERSION(3, 0, 0)
static void
mousepad_close_button_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
GtkSettings *settings;
gint w, h;
settings = gtk_widget_get_settings (widget);
gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU, &w, &h);
gtk_widget_set_size_request(widget, w + 2, h + 2);
}
#endif
static void
mousepad_close_button_class_init (MousepadCloseButtonClass *klass)
{
#if !GTK_CHECK_VERSION(3, 0, 0)
GtkWidgetClass *widget_class;
gtk_rc_parse_string (
"style \"mousepad-close-button-style\" {\n"
" GtkWidget::focus-padding = 0\n"
" GtkWidget::focus-line-width = 0\n"
" xthickness = 0\n"
" ythickness = 0\n"
"}\n"
"widget \"*.mousepad-close-button\" style \"mousepad-close-button-style\"\n");
widget_class = GTK_WIDGET_CLASS (klass);
widget_class->style_set = mousepad_close_button_style_set;
#endif
}
......@@ -60,8 +29,6 @@ static void
mousepad_close_button_init (MousepadCloseButton *button)
{
GtkWidget *image;
#if GTK_CHECK_VERSION(3, 0, 0)
GtkCssProvider *css_provider;
GtkStyleContext *context;
......@@ -80,9 +47,6 @@ mousepad_close_button_init (MousepadCloseButton *button)
GTK_STYLE_PROVIDER (css_provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (css_provider);
#else
gtk_widget_set_name (GTK_WIDGET (button), "mousepad-close-button");
#endif
image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (button), image);
......
......@@ -15,16 +15,11 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-dialogs.h>
#include <mousepad/mousepad-util.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcestylescheme.h>
#include <gtksourceview/gtksourcestyleschememanager.h>
#endif
void
......
......@@ -15,7 +15,6 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-close-button.h>
#include <mousepad/mousepad-settings.h>
#include <mousepad/mousepad-util.h>
......@@ -24,11 +23,7 @@
#include <mousepad/mousepad-view.h>
#include <mousepad/mousepad-window.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcebuffer.h>
#endif
#ifdef HAVE_MEMORY_H
#include <memory.h>
......
......@@ -15,7 +15,6 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-document.h>
#include <mousepad/mousepad-encoding.h>
#include <mousepad/mousepad-encoding-dialog.h>
......@@ -23,11 +22,7 @@
#include <glib/gstdio.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourceview.h>
#endif
......@@ -120,7 +115,6 @@ mousepad_encoding_dialog_init (MousepadEncodingDialog *dialog)
GtkCellRenderer *cell;
/* set some dialog properties */
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_window_set_default_size (GTK_WINDOW (dialog), 550, 350);
/* add buttons */
......
......@@ -15,18 +15,11 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-file.h>
#include <glib/gstdio.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcebuffer.h>
#include <gtksourceview/gtksourcelanguage.h>
#include <gtksourceview/gtksourcelanguagemanager.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
......@@ -44,6 +37,7 @@
#include <errno.h>
enum
{
/* EXTERNALLY_MODIFIED, */
......
......@@ -21,11 +21,8 @@ G_BEGIN_DECLS
#include <mousepad/mousepad-encoding.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcelanguage.h>
#endif
typedef struct _MousepadFileClass MousepadFileClass;
typedef struct _MousepadFile MousepadFile;
......
#ifndef __MOUSEPAD_GTK_COMPAT_H__
#define __MOUSEPAD_GTK_COMPAT_H__ 1
#include <gtk/gtk.h>
#if GTK_CHECK_VERSION(3, 0, 0)
# include <gdk/gdkkeysyms-compat.h>
#else
# include <gdk/gdkkeysyms.h>
#endif
G_BEGIN_DECLS
#if ! GTK_CHECK_VERSION(2, 24, 0)
# define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
# define gtk_combo_box_text_new gtk_combo_box_new_text
# define gtk_combo_box_text_append_text gtk_combo_box_append_text
# define GtkComboBoxText GtkComboBox
# define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
# define gtk_notebook_set_group_name gtk_notebook_set_group
#endif
#if ! GTK_CHECK_VERSION(3, 0, 0)
# define gtk_scale_new_with_range(orientation, min, max, step) \
(((orientation) == GTK_ORIENTATION_HORIZONTAL) ? \
gtk_hscale_new_with_range (min, max, step) : \
gtk_vscale_new_with_range (min, max, step))
# define gtk_box_new(orientation, spacing) \
(((orientation) == GTK_ORIENTATION_HORIZONTAL) ? \
gtk_hbox_new (FALSE, spacing) : gtk_vbox_new (FALSE, spacing))
# define gtk_separator_new(orientation) \
(((orientation) == GTK_ORIENTATION_HORIZONTAL) ? \
gtk_hseparator_new () : gtk_vseparator_new ())
static inline gint
gtk_widget_get_allocated_width (GtkWidget *widget)
{
GtkAllocation alloc = { 0, 0, 0, 0 };
g_return_val_if_fail (GTK_IS_WIDGET (widget), -1);
gtk_widget_get_allocation (widget, &alloc);
return alloc.width;
}
static inline gint
gtk_widget_get_allocated_height (GtkWidget *widget)
{
GtkAllocation alloc = { 0, 0, 0, 0 };
g_return_val_if_fail (GTK_IS_WIDGET (widget), -1);
gtk_widget_get_allocation (widget, &alloc);
return alloc.height;
}
#else
/* Does nothing */
# define gtk_dialog_set_has_separator(dialog, setting) do { } while (0)
#endif
#if ! GTK_CHECK_VERSION(3, 2, 0)
# define GTK_FONT_CHOOSER_DIALOG(obj) GTK_FONT_SELECTION_DIALOG (obj)
# define gtk_font_chooser_dialog_new(title, window) \
g_object_new (GTK_TYPE_FONT_SELECTION_DIALOG, "title", title, \
"transient-for", window, NULL)
/* These don't exist in any version, just for compatibility */
# define gtk_font_chooser_dialog_set_font_name(dialog, fontname) \
gtk_font_selection_dialog_set_font_name (dialog, fontname)
# define gtk_font_chooser_dialog_get_font_name(dialog) \
gtk_font_selection_dialog_get_font_name (dialog)
# else
/* These don't exist in any version, just for compatibility */
# define gtk_font_chooser_dialog_set_font_name(dialog, fontname) \
gtk_font_chooser_set_font (GTK_FONT_CHOOSER (dialog), fontname)
# define gtk_font_chooser_dialog_get_font_name(dialog) \
gtk_font_chooser_get_font (GTK_FONT_CHOOSER (dialog))
#endif
/* GtkSourceView3 compatibility */
#if ! GTK_CHECK_VERSION(3, 0, 0)
# define GTK_SOURCE_TYPE_LANGUAGE GTK_TYPE_SOURCE_LANGUAGE
# define GTK_SOURCE_IS_LANGUAGE GTK_IS_SOURCE_LANGUAGE
# define GTK_SOURCE_TYPE_STYLE_SCHEME GTK_TYPE_SOURCE_STYLE_SCHEME
# define GTK_SOURCE_IS_STYLE_SCHEME GTK_IS_SOURCE_STYLE_SCHEME
# define GTK_SOURCE_IS_BUFFER GTK_IS_SOURCE_BUFFER
# define GTK_SOURCE_TYPE_VIEW GTK_TYPE_SOURCE_VIEW
#endif
G_END_DECLS
#endif /* __MOUSEPAD_GTK_COMPAT_H__ */
......@@ -15,7 +15,6 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-language-action.h>
#include <mousepad/mousepad-util.h>
......
......@@ -18,11 +18,9 @@
#define __MOUSEPAD_LANGUAGE_ACTION_H__ 1
#include <gtk/gtk.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcelanguage.h>
#endif
G_BEGIN_DECLS
......
......@@ -19,12 +19,7 @@
#include <mousepad/mousepad-prefs-dialog-ui.h>
#include <mousepad/mousepad-settings.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcestylescheme.h>
#include <gtksourceview/gtksourcestyleschememanager.h>
#endif
......
......@@ -15,17 +15,12 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-document.h>
#include <mousepad/mousepad-util.h>
#include <mousepad/mousepad-print.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcebuffer.h>
#include <gtksourceview/gtksourceprintcompositor.h>
#endif
#define DOCUMENT_SPACING (10)
......
......@@ -21,7 +21,6 @@
#include <mousepad/mousepad-dialogs.h>
#include <mousepad/mousepad-util.h>
#include <mousepad/mousepad-marshal.h>
#include <mousepad/mousepad-gtkcompat.h>
......@@ -136,7 +135,6 @@ mousepad_replace_dialog_init (MousepadReplaceDialog *dialog)
/* set dialog properties */
gtk_window_set_title (GTK_WINDOW (dialog), _("Replace"));
gtk_window_set_default_size (GTK_WINDOW (dialog), 400, -1);
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (mousepad_replace_dialog_response), NULL);
/* dialog buttons */
......
......@@ -15,7 +15,6 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-settings.h>
#include <mousepad/mousepad-marshal.h>
#include <mousepad/mousepad-document.h>
......@@ -131,7 +130,7 @@ mousepad_search_bar_class_init (MousepadSearchBarClass *klass)
/* setup key bindings for the search bar */
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, "hide-bar", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, "hide-bar", 0);
/* In GTK3, gtkrc is deprecated */
#if GTK_CHECK_VERSION(3, 0, 0) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
......@@ -169,8 +168,8 @@ mousepad_search_bar_class_init (MousepadSearchBarClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
binding_set = gtk_binding_set_by_class(entry_class);
gtk_binding_entry_add_signal(binding_set, GDK_Return, GDK_SHIFT_MASK, "activate-backward", 0);
gtk_binding_entry_add_signal(binding_set, GDK_KP_Enter, GDK_SHIFT_MASK, "activate-backward", 0);
gtk_binding_entry_add_signal(binding_set, GDK_KEY_Return, GDK_SHIFT_MASK, "activate-backward", 0);
gtk_binding_entry_add_signal(binding_set, GDK_KEY_KP_Enter, GDK_SHIFT_MASK, "activate-backward", 0);
}
g_type_class_unref (entry_class);
}
......
......@@ -15,7 +15,6 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-statusbar.h>
#include <mousepad/mousepad-window.h>
#include <mousepad/mousepad-util.h>
......@@ -108,11 +107,6 @@ mousepad_statusbar_init (MousepadStatusbar *statusbar)
GtkStatusbar *bar = GTK_STATUSBAR (statusbar);
GList *frame;
/* init statusbar */
#if ! GTK_CHECK_VERSION(3, 0, 0)
gtk_statusbar_set_has_resize_grip (bar, TRUE);
#endif
/* create a new horizontal box */
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_widget_show (box);
......
......@@ -19,11 +19,8 @@
#include <gtk/gtk.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcelanguage.h>
#endif
G_BEGIN_DECLS
......
......@@ -15,16 +15,12 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-style-scheme-action.h>
#include <glib/gi18n.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcestyleschememanager.h>
#endif
enum
......
......@@ -19,11 +19,8 @@
#include <gtk/gtk.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcestylescheme.h>
#endif
G_BEGIN_DECLS
......
......@@ -15,7 +15,6 @@
*/
#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-util.h>
#include <gtksourceview/gtksource.h>
......
This diff is collapsed.
......@@ -73,8 +73,6 @@ void mousepad_view_delete_selection (MousepadView *view
void mousepad_view_select_all (MousepadView *view);
void mousepad_view_change_selection (MousepadView *view);
void mousepad_view_convert_selection_case (MousepadView *view,
gint type);
......
......@@ -56,7 +56,6 @@
<menuitem action="delete" />
<separator />
<menuitem action="select-all" />
<menuitem action="change-selection" />
<separator />
<menu action="convert-menu">
<menuitem action="lowercase" />
......@@ -183,7 +182,6 @@
<menuitem action="delete" />
<separator />
<menuitem action="select-all" />
<menuitem action="change-selection" />
<separator />
<menu action="convert-menu">
<menuitem action="lowercase" />
......
......@@ -21,7 +21,6 @@
#include <mousepad/mousepad-marshal.h>
#include <mousepad/mousepad-document.h>
#include <mousepad/mousepad-dialogs.h>
#include <mousepad/mousepad-gtkcompat.h>
#include <mousepad/mousepad-replace-dialog.h>
#include <mousepad/mousepad-encoding-dialog.h>
#include <mousepad/mousepad-search-bar.h>
......@@ -32,13 +31,7 @@
#include <glib/gstdio.h>
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gtksourceview/gtksource.h>
#else
#include <gtksourceview/gtksourcelanguage.h>
#include <gtksourceview/gtksourcelanguagemanager.h>
#include <gtksourceview/gtksourcebuffer.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
......@@ -282,8 +275,6 @@ static void mousepad_window_action_delete (GtkAction
MousepadWindow *window);
static void mousepad_window_action_select_all (GtkAction *action,
MousepadWindow *window);
static void mousepad_window_action_change_selection (GtkAction *action,
MousepadWindow *window);
static void mousepad_window_action_preferences (GtkAction *action,
MousepadWindow *window);
static void mousepad_window_action_lowercase (GtkAction *action,
......@@ -438,7 +429,6 @@ static const GtkActionEntry action_entries[] =
{ "paste-column", NULL, N_("Paste as _Column"), NULL, N_("Paste the clipboard text into a column"), G_CALLBACK (mousepad_window_action_paste_column), },
{ "delete", GTK_STOCK_DELETE, NULL, NULL, N_("Delete the current selection"), G_CALLBACK (mousepad_window_action_delete), },
{ "select-all", GTK_STOCK_SELECT_ALL, NULL, NULL, N_("Select the text in the entire document"), G_CALLBACK (mousepad_window_action_select_all), },
{ "change-selection", NULL, N_("Change the selection"), NULL, N_("Change a normal selection into a column selection and vice versa"), G_CALLBACK (mousepad_window_action_change_selection), },
{ "convert-menu", NULL, N_("Conve_rt"), NULL, NULL, NULL, },
{ "uppercase", NULL, N_("To _Uppercase"), NULL, N_("Change the case of the selection to uppercase"), G_CALLBACK (mousepad_window_action_uppercase), },
{ "lowercase", NULL, N_("To _Lowercase"), NULL, N_("Change the case of the selection to lowercase"), G_CALLBACK (mousepad_window_action_lowercase), },
......@@ -888,10 +878,6 @@ mousepad_window_create_notebook (MousepadWindow *window)
"scrollable", TRUE,
"show-border", FALSE,
"show-tabs", FALSE,
#if ! GTK_CHECK_VERSION(3, 0, 0)
"tab-hborder", 0,
"tab-vborder", 0,
#endif
NULL);
/* set the group id */
......@@ -1004,9 +990,7 @@ mousepad_window_init (MousepadWindow *window)
window->active = NULL;
window->recent_manager = NULL;
#if GTK_CHECK_VERSION(3, 0, 0)
gtk_window_set_has_resize_grip (GTK_WINDOW (window), TRUE);
#endif
/* increase clipboard history ref count */
clipboard_history_ref_count++;
......@@ -2211,10 +2195,6 @@ mousepad_window_selection_changed (MousepadDocument *document,
const gchar *action_names2[] = { "line-up", "line-down" };
const gchar *action_names3[] = { "cut", "copy", "delete", "lowercase", "uppercase", "titlecase", "opposite-case" };
/* sensitivity of the change selection action */
action = gtk_action_group_get_action (window->action_group, "change-selection");
gtk_action_set_sensitive (action, selection != 0);
/* actions that are unsensitive during a column selection */
for (i = 0; i < G_N_ELEMENTS (action_names1); i++)
{
......@@ -4619,19 +4599,6 @@ mousepad_window_action_select_all (GtkAction *action,
static void
mousepad_window_action_change_selection (GtkAction *action,
MousepadWindow *window)
{
g_return_if_fail (MOUSEPAD_IS_WINDOW (window));
g_return_if_fail (MOUSEPAD_IS_DOCUMENT (window->active));
/* change the selection */
mousepad_view_change_selection (window->active->textview);
}
static void
mousepad_window_action_preferences (GtkAction *action,
MousepadWindow *window)
......@@ -4990,7 +4957,7 @@ mousepad_window_action_select_font (GtkAction *action,
if (G_LIKELY (font_name))
{
gtk_font_chooser_dialog_set_font_name (GTK_FONT_CHOOSER_DIALOG (dialog), font_name);
gtk_font_chooser_set_font (GTK_FONT_CHOOSER (dialog), font_name);
g_free (font_name);
}
......@@ -4998,7 +4965,7 @@ mousepad_window_action_select_font (GtkAction *action,
if (G_LIKELY (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK))
{
/* get the selected font from the dialog */
font_name = gtk_font_chooser_dialog_get_font_name (GTK_FONT_CHOOSER_DIALOG (dialog));
font_name = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (dialog));
/* store the font in the preferences */
MOUSEPAD_SETTING_SET_STRING (FONT_NAME, font_name);
......
Markdown is supported
0% or