pluma: Add GTK3 support
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gtksourceview/gtksource.h>
|
||||
|
||||
#include "pluma-ui.h"
|
||||
#include "pluma-window.h"
|
||||
@@ -61,6 +62,10 @@
|
||||
#include "osx/pluma-osx.h"
|
||||
#endif
|
||||
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
#define GTK_WIDGET_VISIBLE gtk_widget_get_visible
|
||||
#endif
|
||||
|
||||
#define LANGUAGE_NONE (const gchar *)"LangNone"
|
||||
#define PLUMA_UIFILE "pluma-ui.xml"
|
||||
#define TAB_WIDTH_DATA "PlumaWindowTabWidthData"
|
||||
@@ -2434,8 +2439,12 @@ language_changed (GObject *object,
|
||||
}
|
||||
|
||||
static void
|
||||
notebook_switch_page (GtkNotebook *book,
|
||||
notebook_switch_page (GtkNotebook *book,
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
GtkWidget *pg,
|
||||
#else
|
||||
GtkNotebookPage *pg,
|
||||
#endif
|
||||
gint page_num,
|
||||
PlumaWindow *window)
|
||||
{
|
||||
@@ -3597,13 +3606,20 @@ static void
|
||||
vpaned_restore_position (GtkWidget *widget,
|
||||
PlumaWindow *window)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
gint pos;
|
||||
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
#else
|
||||
allocation = widget->allocation;
|
||||
#endif
|
||||
|
||||
pluma_debug_message (DEBUG_WINDOW,
|
||||
"Restoring vpaned position: bottom panel size %d",
|
||||
window->priv->bottom_panel_size);
|
||||
|
||||
pos = widget->allocation.height -
|
||||
pos = allocation.height -
|
||||
MAX (50, window->priv->bottom_panel_size);
|
||||
gtk_paned_set_position (GTK_PANED (window->priv->vpaned), pos);
|
||||
|
||||
|
Reference in New Issue
Block a user