Commit 0c70711b authored by Johannes Schmid's avatar Johannes Schmid

Initial port to gtk+-3.0

Basic stuff works again, some plugins are disabled, introspection is broken and the git plugin
doesn't seem to work correctly.
parent 8506c3e5
......@@ -36,14 +36,79 @@
/intltool-update
/intltool-update.in
/libtool
/po/*.gmo
/po/*.mo
/po/.intltool-merge-cache
/po/Makefile
/po/Makefile.in
/po/Makefile.in.in
/po/POTFILES
/po/ar.gmo
/po/az.gmo
/po/be.gmo
/po/be@latin.gmo
/po/bg.gmo
/po/ca.gmo
/po/ca@valencia.gmo
/po/cs.gmo
/po/da.gmo
/po/de.gmo
/po/dz.gmo
/po/el.gmo
/po/en@shaw.gmo
/po/en_CA.gmo
/po/en_GB.gmo
/po/es.gmo
/po/eu.gmo
/po/fi.gmo
/po/fr.gmo
/po/ga.gmo
/po/gl.gmo
/po/gu.gmo
/po/he.gmo
/po/hi.gmo
/po/hr.gmo
/po/hu.gmo
/po/hy.gmo
/po/id.gmo
/po/it.gmo
/po/ja.gmo
/po/kn.gmo
/po/ko.gmo
/po/lt.gmo
/po/lv.gmo
/po/mai.gmo
/po/mk.gmo
/po/ml.gmo
/po/mr.gmo
/po/ms.gmo
/po/nb.gmo
/po/ne.gmo
/po/nl.gmo
/po/oc.gmo
/po/or.gmo
/po/pa.gmo
/po/pl.gmo
/po/pt.gmo
/po/pt_BR.gmo
/po/ro.gmo
/po/ru.gmo
/po/rw.gmo
/po/si.gmo
/po/sk.gmo
/po/sl.gmo
/po/sq.gmo
/po/sr.gmo
/po/sr@latin.gmo
/po/stamp-it
/po/sv.gmo
/po/te.gmo
/po/th.gmo
/po/tr.gmo
/po/uk.gmo
/po/vi.gmo
/po/zh_CN.gmo
/po/zh_HK.gmo
/po/zh_TW.gmo
/so_locations
/stamp-h1
/tags
......@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = \
pixmaps scripts data \
doc libfoocanvas libanjuta plugins src manuals mime launcher po
doc libanjuta plugins src manuals mime launcher po
anjutadocdir = $(docdir)
anjutadoc_DATA = \
......
......@@ -41,7 +41,7 @@ VTE_REQUIRED=0.13.1
LIBXML_REQUIRED=2.4.23
GDL_REQUIRED=2.91.1
LIBWNCK_REQUIRED=2.12
UNIQUE_REQUIRED=1.0.0
UNIQUE_REQUIRED=2.90.1
dnl GtkSourceView
GTKSOURCEVIEW_REQUIRED=2.9.7
......@@ -145,7 +145,7 @@ dnl Check base modules
PKG_CHECK_MODULES([ANJUTA],
[gthread-2.0 >= $GTHREAD_REQUIRED
unique-1.0 >= $UNIQUE_REQUIRED
unique-3.0 >= $UNIQUE_REQUIRED
glib-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
gtk+-3.0 >= $GTK_REQUIRED
......@@ -304,7 +304,7 @@ PKG_CHECK_MODULES(PLUGIN_SYMBOL_DB,
dnl Setup Anjuta Library flags
dnl --------------------------
LIBANJUTA_CFLAGS='$(ANJUTA_CFLAGS) $(DEPRECATED_FLAGS) -I$(top_srcdir) -I$(top_builddir)/libanjuta -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta.la'
LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta-3.la'
AC_SUBST(LIBANJUTA_CFLAGS)
AC_SUBST(LIBANJUTA_LIBS)
......@@ -799,7 +799,7 @@ Makefile
po/Makefile.in
libfoocanvas/Makefile
libanjuta/Makefile
libanjuta/libanjuta-1.0.pc
libanjuta/libanjuta-3.0.pc
libanjuta/anjuta-version.h
libanjuta/interfaces/Makefile
src/Makefile
......
......@@ -14,13 +14,13 @@ AM_CPPFLAGS = \
-DPACKAGE_DOC_DIR="\"$(docdir)\"" \
-DG_LOG_DOMAIN=\"libanjuta\"
lib_LTLIBRARIES = libanjuta.la
libanjuta_la_LDFLAGS = $(ANJUTA_LDFLAGS)
libanjuta_la_LIBADD = \
lib_LTLIBRARIES = libanjuta-3.la
libanjuta_3_la_LDFLAGS = $(ANJUTA_LDFLAGS)
libanjuta_3_la_LIBADD = \
interfaces/libanjuta-interfaces.la \
$(ANJUTA_LIBS)
libanjuta_la_SOURCES= \
libanjuta_3_la_SOURCES= \
anjuta-enum-types.h \
anjuta-enum-types.c \
anjuta-marshal.h \
......@@ -104,11 +104,11 @@ if HAVE_PLUGIN_GLADE
gladeanjutadir = $(libdir)/glade3/modules
gladeanjuta_LTLIBRARIES = libgladeanjuta.la
libgladeanjuta_la_SOURCES = anjuta-glade-catalog.c
libgladeanjuta_la_LDFLAGS = $(ANJUTA_LDFLAGS) -module -avoid-version
libgladeanjuta_la_LIBADD = \
libanjuta.la \
gladeanjuta_LTLIBRARIES = libgladeanjuta-3.la
libgladeanjuta_3_la_SOURCES = anjuta-glade-catalog.c
libgladeanjuta_3_la_LDFLAGS = $(ANJUTA_LDFLAGS) -module -avoid-version
libgladeanjuta_3_la_LIBADD = \
libanjuta-3.la \
$(GLADE_LIBS)
# For now install in our own prefix
......@@ -119,7 +119,7 @@ catalog_DATA = anjuta-glade.xml
endif
libanjutaincludedir=$(includedir)/libanjuta-1.0/libanjuta
libanjutaincludedir=$(includedir)/libanjuta-3.0/libanjuta
libanjuta_include = \
libanjuta.h \
......@@ -203,11 +203,11 @@ anjuta-enum-types.c: Makefile
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libanjuta-1.0.pc
pkgconfig_DATA = libanjuta-3.0.pc
EXTRA_DIST = \
$(libanjutainclude_HEADERS) \
libanjuta-1.0.pc.in \
libanjuta-3.0.pc.in \
anjuta-marshal.list \
$(catalog_DATA)
......@@ -225,19 +225,19 @@ if HAVE_INTROSPECTION
anjuta_introspection_sources = $(libanjuta_la_SOURCES)
ianjuta_introspection_sources = $(srcdir)/interfaces/*.c $(srcdir)/interfaces/*.h
Anjuta-1_0.gir: libanjuta.la
Anjuta_1_0_gir_INCLUDES = GObject-2.0 Gtk-2.0
Anjuta_1_0_gir_CFLAGS = $(ANJUTA_CFLAGS) -I$(top_srcdir)
Anjuta_1_0_gir_LIBS = anjuta
Anjuta_1_0_gir_FILES = $(anjuta_introspection_sources)
INTROSPECTION_GIRS += Anjuta-1.0.gir
IAnjuta-1_0.gir: interfaces/libanjuta-interfaces.la libanjuta.la Anjuta-1.0.gir
IAnjuta_1_0_gir_INCLUDES = GObject-2.0 Gtk-2.0 Anjuta-1.0
IAnjuta_1_0_gir_CFLAGS = $(LIBANJUTA_CFLAGS) -I$(top_srcdir)
IAnjuta_1_0_gir_LIBS = interfaces/libanjuta-interfaces.la anjuta
IAnjuta_1_0_gir_FILES = $(ianjuta_introspection_sources)
INTROSPECTION_GIRS += IAnjuta-1.0.gir
Anjuta-3_0.gir: libanjuta-3.la
Anjuta_3_0_gir_INCLUDES = GObject-2.0 Gtk-3.0
Anjuta_3_0_gir_CFLAGS = $(ANJUTA_CFLAGS) -I$(top_srcdir)
Anjuta_3_0_gir_LIBS = anjuta
Anjuta_3_0_gir_FILES = $(anjuta_introspection_sources)
INTROSPECTION_GIRS += Anjuta-3.0.gir
IAnjuta-3_0.gir: interfaces/libanjuta-interfaces.la libanjuta-3.la Anjuta-3.0.gir
IAnjuta_3_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 Anjuta-3.0
IAnjuta_3_0_gir_CFLAGS = $(LIBANJUTA_CFLAGS) -I$(top_srcdir)
IAnjuta_3_0_gir_LIBS = interfaces/libanjuta-interfaces.la anjuta
IAnjuta_3_0_gir_FILES = $(ianjuta_introspection_sources)
INTROSPECTION_GIRS += IAnjuta-3.0.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
......
......@@ -1891,7 +1891,7 @@ on_plugin_list_selection_changed (GtkTreeSelection *tree_selection,
GList *list;
GtkButton *bt = NULL;
action_area = (GtkContainer *) dialog->action_area;
action_area = GTK_CONTAINER (gtk_dialog_get_action_area (dialog));
list = gtk_container_get_children (action_area);
for (; list; list = list->next) {
bt = list->data;
......
......@@ -158,7 +158,9 @@ anjuta_tabber_get_padding(GtkWidget* widget)
}
static void
anjuta_tabber_size_request(GtkWidget* widget, GtkRequisition* req)
anjuta_tabber_get_preferred_width (GtkWidget* widget,
gint* minimum,
gint* preferred)
{
g_return_if_fail (ANJUTA_IS_TABBER (widget));
......@@ -168,16 +170,53 @@ anjuta_tabber_size_request(GtkWidget* widget, GtkRequisition* req)
for (child = tabber->priv->children; child != NULL; child = g_list_next (child))
{
GtkRequisition child_req;
gint child_min;
gint child_preferred;
GtkStyle *style;
gtk_widget_size_request (GTK_WIDGET (child->data), &child_req);
gtk_widget_get_preferred_width (GTK_WIDGET (child->data), &child_min, &child_preferred);
style = gtk_widget_get_style (widget);
req->width += child_req.width + 2 * (style->xthickness + padding);
req->height = MAX(req->height, child_req.height + 2 * style->ythickness);
if (minimum)
{
*minimum += child_min + 2 * (style->xthickness + padding);
}
if (preferred)
{
*preferred += child_preferred + 2 * (style->xthickness + padding);
}
}
}
static void
anjuta_tabber_get_preferred_height (GtkWidget* widget,
gint* minimum,
gint* preferred)
{
g_return_if_fail (ANJUTA_IS_TABBER (widget));
AnjutaTabber* tabber = ANJUTA_TABBER (widget);
GList* child;
for (child = tabber->priv->children; child != NULL; child = g_list_next (child))
{
gint child_min;
gint child_preferred;
GtkStyle *style;
gtk_widget_get_preferred_height (GTK_WIDGET (child->data), &child_min, &child_preferred);
style = gtk_widget_get_style (widget);
if (minimum)
{
*minimum = MAX(*minimum, child_min + 2 * style->ythickness);
}
if (preferred)
{
*preferred = MAX(*preferred, child_preferred + 2 * style->ythickness);
}
}
}
static void
anjuta_tabber_size_allocate(GtkWidget* widget, GtkAllocation* allocation)
{
......@@ -246,12 +285,15 @@ anjuta_tabber_size_allocate(GtkWidget* widget, GtkAllocation* allocation)
}
static gboolean
anjuta_tabber_expose_event (GtkWidget* widget, GdkEventExpose *event)
anjuta_tabber_draw (GtkWidget* widget, cairo_t* cr)
{
g_return_val_if_fail (ANJUTA_IS_TABBER (widget), FALSE);
AnjutaTabber* tabber = ANJUTA_TABBER (widget);
GList* child;
gint padding = anjuta_tabber_get_padding (widget);
GtkAllocation widget_alloc;
gtk_widget_get_allocation (widget, &widget_alloc);
for (child = tabber->priv->children; child != NULL; child = g_list_next (child))
{
......@@ -263,22 +305,23 @@ anjuta_tabber_expose_event (GtkWidget* widget, GdkEventExpose *event)
style = gtk_widget_get_style (widget);
alloc.x -= style->xthickness + padding;
alloc.y -= style->ythickness;
alloc.x -= style->xthickness + padding + widget_alloc.x;
alloc.y -= style->ythickness + widget_alloc.y;
alloc.width += 2 * (style->xthickness + padding);
alloc.height += style->ythickness;
gtk_paint_extension (style,
gtk_widget_get_window (widget),
cr,
state, GTK_SHADOW_OUT,
NULL, widget, "tab",
widget, "tab",
alloc.x,
alloc.y,
alloc.width,
alloc.height,
GTK_POS_BOTTOM);
gtk_container_propagate_expose (GTK_CONTAINER (tabber),
GTK_WIDGET(child->data), event);
GTK_POS_BOTTOM);
gtk_container_propagate_draw (GTK_CONTAINER (tabber),
GTK_WIDGET(child->data), cr);
}
return FALSE;
}
......@@ -476,9 +519,10 @@ anjuta_tabber_class_init (AnjutaTabberClass *klass)
object_class->set_property = anjuta_tabber_set_property;
object_class->get_property = anjuta_tabber_get_property;
widget_class->size_request = anjuta_tabber_size_request;
widget_class->get_preferred_height = anjuta_tabber_get_preferred_height;
widget_class->get_preferred_width = anjuta_tabber_get_preferred_width;
widget_class->size_allocate = anjuta_tabber_size_allocate;
widget_class->expose_event = anjuta_tabber_expose_event;
widget_class->draw = anjuta_tabber_draw;
widget_class->button_press_event = anjuta_tabber_button_press_event;
widget_class->realize = anjuta_tabber_realize;
widget_class->unrealize = anjuta_tabber_unrealize;
......
......@@ -55,8 +55,6 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
#include <libanjuta/anjuta-utils.h>
#include <libanjuta/anjuta-debug.h>
......@@ -1132,7 +1130,8 @@ anjuta_util_user_shell (void)
gchar **
anjuta_util_user_terminal (void)
{
#ifndef G_OS_WIN32
/* FIXME: GSettings */
#if 0
GConfClient *client;
gchar *terminal = NULL;
gchar **argv = NULL;
......
......@@ -100,7 +100,7 @@ anjuta_cell_renderer_captioned_image_new (void)
static void
anjuta_cell_renderer_captioned_image_get_size (GtkCellRenderer *gtk_cell,
GtkWidget *widget,
GdkRectangle *cell_area,
const GdkRectangle *cell_area,
int *x_offset,
int *y_offset,
int *width,
......@@ -135,11 +135,10 @@ anjuta_cell_renderer_captioned_image_get_size (GtkCellRenderer *gtk_cell,
static void
anjuta_cell_renderer_captioned_image_render (GtkCellRenderer *gtk_cell,
GdkWindow *window,
cairo_t *cr,
GtkWidget *widget,
GdkRectangle *background_area,
GdkRectangle *cell_area,
GdkRectangle *expose_area,
const GdkRectangle *background_area,
const GdkRectangle *cell_area,
guint flags)
{
......@@ -164,13 +163,11 @@ anjuta_cell_renderer_captioned_image_render (GtkCellRenderer *gtk_cell,
text_area.height = height;
text_area.width = width;
gtk_cell_renderer_render (cell->image, window, widget,
background_area, &pixbuf_area,
expose_area, flags);
gtk_cell_renderer_render (cell->image, cr, widget,
background_area, &pixbuf_area, flags);
gtk_cell_renderer_render (cell->caption, window, widget,
background_area, &text_area,
expose_area, flags);
gtk_cell_renderer_render (cell->caption, cr, widget,
background_area, &text_area, flags);
}
static void
......
......@@ -58,7 +58,7 @@ G_DEFINE_TYPE(ESplash, e_splash, GTK_TYPE_WINDOW)
/* GtkObject methods. */
static void
impl_destroy (GtkObject *object)
impl_destroy (GtkWidget *object)
{
ESplash *splash;
ESplashPrivate *priv;
......@@ -84,10 +84,10 @@ e_splash_finalize (GObject *obj)
static void
e_splash_class_init (ESplashClass *klass)
{
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);;
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gtkobject_class->destroy = impl_destroy;
widget_class->destroy = impl_destroy;
object_class->finalize = e_splash_finalize;
}
......@@ -113,19 +113,15 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer data)
}
static gboolean
on_expose_event_cb (GtkWidget *widget, GdkEventExpose *event,
ESplash *splash)
on_draw_cb (GtkWidget *widget, cairo_t *cr,
ESplash *splash)
{
ESplashPrivate *priv;
GdkWindow *window;
cairo_t *cr;
gint inc_width;
priv = splash->priv;
window = gtk_widget_get_window (widget);
/* draw the background pixbuf */
cr = gdk_cairo_create (window);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
gdk_cairo_set_source_pixbuf (cr, priv->splash_image_pixbuf, 0, 0);
......@@ -134,7 +130,6 @@ on_expose_event_cb (GtkWidget *widget, GdkEventExpose *event,
/* draw the plugin icon */
if (priv->icon_pixbuf)
{
cr = gdk_cairo_create (window);
gdk_cairo_set_source_pixbuf (cr, priv->icon_pixbuf, ICON_X, ICON_Y);
cairo_paint (cr);
......@@ -152,7 +147,6 @@ on_expose_event_cb (GtkWidget *widget, GdkEventExpose *event,
pango_layout_set_markup (layout, priv->title, -1);
pango_layout_get_size (layout, NULL, &layout_height);
cr = gdk_cairo_create (window);
cairo_move_to (cr, ICON_X + ICON_SIZE + 10,
ICON_Y + ICON_SIZE - PROGRESS_SIZE - PANGO_PIXELS (layout_height));
......@@ -165,14 +159,12 @@ on_expose_event_cb (GtkWidget *widget, GdkEventExpose *event,
inc_width = gdk_pixbuf_get_width (priv->splash_image_pixbuf);
inc_width -= (ICON_X + ICON_SIZE + 20);
cr = gdk_cairo_create (window);
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
cairo_rectangle (cr, ICON_X + ICON_SIZE + 10, ICON_Y + ICON_SIZE,
inc_width, PROGRESS_SIZE);
cairo_fill (cr);
cr = gdk_cairo_create (window);
cairo_rectangle (cr, ICON_X + ICON_SIZE + 10, ICON_Y + ICON_SIZE,
(priv->progress_percentage * inc_width), PROGRESS_SIZE);
......@@ -210,8 +202,8 @@ e_splash_construct (ESplash *splash,
gtk_widget_set_size_request (GTK_WIDGET (splash), image_width, image_height);
g_signal_connect (G_OBJECT (splash), "expose-event",
G_CALLBACK (on_expose_event_cb), splash);
g_signal_connect (G_OBJECT (splash), "draw",
G_CALLBACK (on_draw_cb), splash);
g_signal_connect (G_OBJECT (splash), "button-press-event",
G_CALLBACK (button_press_event), splash);
......
......@@ -7,9 +7,9 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"libanjuta-interfaces\" \
"-DG_LOG_FATAL_MASK=\"(G_LOG_FLAG_RECURSION|G_LOG_LEVEL_ERROR|G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING)\""
MODULE_NAME = libanjuta
MODULE_VERSION = 0.1
MODULE_INCLUDEDIR = $(includedir)/libanjuta-1.0/libanjuta/interfaces
MODULE_NAME = libanjuta-3
MODULE_VERSION = 2.91
MODULE_INCLUDEDIR = $(includedir)/libanjuta-3.0/libanjuta/interfaces
MODULE_LIBS = $(GTK_LIBS)
@@IFACE_RULES@@
......
......@@ -3,12 +3,12 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
datarootdir=@datarootdir@
datadir=@datadir@
includedir=@includedir@/libanjuta-1.0
idldir=@datadir@/idl/libanjuta-1.0
includedir=@includedir@/libanjuta-3.0
idldir=@datadir@/idl/libanjuta-3.0
Name: libanjuta
Description: Libraries for developing Anjuta plugins.
Version: @VERSION@
Requires: gconf-2.0 gtk+-2.0
Libs: -L${libdir} -lanjuta
Requires: gtk+-3.0
Libs: -L${libdir} -lanjuta-3
Cflags: -I${includedir}
......@@ -3,9 +3,7 @@
SUBDIRS = . \
message-view \
gdb \
debug-manager \
file-manager \
terminal \
build-basic-autotools \
file-loader \
file-wizard \
......@@ -14,7 +12,6 @@ SUBDIRS = . \
cvs-plugin \
snippets-manager \
class-gen \
class-inheritance \
patch \
subversion \
project-import \
......
......@@ -439,8 +439,9 @@
</packing>
</child>
<child>
<object class="GtkComboBoxEntry" id="configuration_combo_entry">
<object class="GtkComboBoxText" id="configuration_combo_entry">
<property name="visible">True</property>
<property name="has-entry">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</object>
<packing>
......
......@@ -246,7 +246,7 @@ on_select_configuration (GtkComboBox *widget, gpointer user_data)
}
else
{
name = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dlg->combo));
name = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (dlg->combo));
}
if (*name == '\0')
......@@ -285,7 +285,7 @@ fill_dialog (BuildConfigureDialog *dlg)
BuildConfiguration *cfg;
gtk_combo_box_set_model (GTK_COMBO_BOX(dlg->combo), GTK_TREE_MODEL(store));
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (dlg->combo), 0);
gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (dlg->combo), 0);
for (cfg = build_configuration_list_get_first (dlg->config_list); cfg != NULL; cfg = build_configuration_next (cfg))
{
......@@ -350,7 +350,7 @@ build_dialog_configure (GtkWindow* parent, const gchar *project_root_uri, BuildC
}
else
{
name = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dlg.combo));
name = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (dlg.combo));
}
cfg = build_configuration_list_create (config_list, name);
g_free (name);
......
......@@ -489,8 +489,8 @@ cg_combo_flags_treeview_key_press_cb (G_GNUC_UNUSED GtkWidget *widget,
switch (event->keyval)
{
case GDK_space:
case GDK_KP_Space:
case GDK_KEY_space:
case GDK_KEY_KP_Space:
selection =
gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview));
......@@ -504,8 +504,8 @@ cg_combo_flags_treeview_key_press_cb (G_GNUC_UNUSED GtkWidget *widget,
return FALSE;
break;
case GDK_Return:
case GDK_KP_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
selection =
gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview));
......@@ -557,7 +557,7 @@ cg_combo_flags_window_key_press_cb (G_GNUC_UNUSED GtkWidget *widget,
switch (event->keyval)
{
case GDK_Escape:
case GDK_KEY_Escape:
priv->editing_canceled = TRUE;
cg_combo_flags_popdown (combo);
return TRUE;
......
......@@ -178,7 +178,7 @@ cg_window_fetch_string (CgWindow *window,
if (GTK_IS_ENTRY (widget))
return g_strdup (gtk_entry_get_text(GTK_ENTRY(widget)));
else if (GTK_IS_COMBO_BOX (widget))
return gtk_combo_box_get_active_text (GTK_COMBO_BOX(widget));
return gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(widget));
else
return NULL;
}
......
......@@ -181,14 +181,12 @@ static void
dma_chunk_view_class_init (DmaChunkViewClass * klass)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkTextViewClass *text_view_class;
g_return_if_fail (klass != NULL);
gobject_class = G_OBJECT_CLASS (klass);
object_class = GTK_OBJECT_CLASS (klass);
widget_class = GTK_WIDGET_CLASS (klass);
text_view_class = GTK_TEXT_VIEW_CLASS (klass);
parent_class = GTK_WIDGET_CLASS (g_type_class_peek_parent (klass));
......
......@@ -136,19 +136,19 @@ dma_data_view_goto_key_press_event (GtkWidget *widget,
g_return_val_if_fail (IS_DMA_DATA_VIEW (view), FALSE);
/* Close window */
if (event->keyval == GDK_Escape ||
event->keyval == GDK_Tab ||
event->keyval == GDK_KP_Tab ||
event->keyval == GDK_ISO_Left_Tab)
if (event->keyval == GDK_KEY_Escape ||
event->keyval == GDK_KEY_Tab ||
event->keyval == GDK_KEY_KP_Tab ||
event->keyval == GDK_KEY_ISO_Left_Tab)
{
dma_data_view_goto_window_hide (view);
return TRUE;
}
/* Goto to address and close window */
if (event->keyval == GDK_Return ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter)
if (event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_ISO_Enter ||
event->keyval == GDK_KEY_KP_Enter)
{
gulong adr;
const gchar *text;
......@@ -176,7 +176,7 @@ dma_data_view_goto_position_func (DmaDataView *view)
gint x, y;
gint win_x, win_y;
GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (view));
GdkScreen *screen = gdk_drawable_get_screen (window);
GdkScreen *screen = gdk_window_get_screen (window);
gint monitor_num;
GdkRectangle monitor;
......@@ -557,34 +557,30 @@ dma_data_view_size_allocate (GtkWidget *widget,
static void
dma_data_view_paint (GtkWidget *widget,
GdkRectangle *area)
cairo_t *cr)
{
DmaDataView *view = DMA_DATA_VIEW (widget);
if (view->shadow_type != GTK_SHADOW_NONE)
{
gtk_paint_shadow (gtk_widget_get_style (widget),
gtk_widget_get_window (widget),
GTK_STATE_NORMAL, view->shadow_type,
area, widget, "dma_data_view",
view->frame.x,
view->frame.y,
view->frame.width,
view->frame.height);
cr,
GTK_STATE_NORMAL, view->shadow_type,
widget, "dma_data_view",
view->frame.x,
view->frame.y,
view->frame.width,
view->frame.height);
}
}
static gint
dma_data_view_expose (GtkWidget *widget,
GdkEventExpose *event)
dma_data_view_draw (GtkWidget *widget,
cairo_t *cr)
{
if (gtk_widget_is_drawable (widget))
{
dma_data_view_paint (widget, &event->area);
(* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event);
}
dma_data_view_paint (widget, cr);
(* GTK_WIDGET_CLASS (parent_class)->draw) (widget, cr);
return FALSE;
}
......@@ -802,7 +798,7 @@ dma_data_view_forall (GtkContainer *container,
*---------------------------------------------------------------------------*/