Commit 220b7a2f authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

ported to the new treeviewized file selection widget. Unfortunately,

2002-01-30  Manish Singh  <yosh@gimp.org>

        * app/gui/file-open-dialog.c: ported to the new treeviewized file
        selection widget. Unfortunately, multiple selections aren't supported
        anymore so it's still broke. I'll make a patch to gtk to address this
        after I get some sleep.

        * app/widgets/gimppreview.h
        * libgimpwidgets/gimpcolorarea.h
        * plug-ins/FractalExplorer/Events.c
        * plug-ins/common/film.c
        * plug-ins/common/plugindetails.c
        * plug-ins/fp/fp_misc.c
        * plug-ins/rcm/rcm_callback.c
        * plug-ins/rcm/rcm_misc.c: REALLY REALLY ugly hack to get things to
        build under the latest enum deprecations. Of course, we'll remove
        these when these files compile with deprecation turned on

        * plug-ins/dbbrowser/dbbrowser_utils.c: warning cleanup

        * libgimpwidgets/Makefile.am
        * libgimpwidgets/gimpoffsetarea.c: need a custom marshaller for
        our signal since the gtk marshaller we used went away.
parent 097a0272
2002-01-30 Manish Singh <yosh@gimp.org>
* app/gui/file-open-dialog.c: ported to the new treeviewized file
selection widget. Unfortunately, multiple selections aren't supported
anymore so it's still broke. I'll make a patch to gtk to address this
after I get some sleep.
* app/widgets/gimppreview.h
* libgimpwidgets/gimpcolorarea.h
* plug-ins/FractalExplorer/Events.c
* plug-ins/common/film.c
* plug-ins/common/plugindetails.c
* plug-ins/fp/fp_misc.c
* plug-ins/rcm/rcm_callback.c
* plug-ins/rcm/rcm_misc.c: REALLY REALLY ugly hack to get things to
build under the latest enum deprecations. Of course, we'll remove
these when these files compile with deprecation turned on
* plug-ins/dbbrowser/dbbrowser_utils.c: warning cleanup
* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpoffsetarea.c: need a custom marshaller for
our signal since the gtk marshaller we used went away.
2002-01-29 Sven Neumann <sven@gimp.org>
* plug-ins/common/screenshot.c: added a call to gtk_widget_show() that
......
......@@ -61,30 +61,21 @@
#include "undo.h"
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtkclist.h>
#include "libgimp/gimpintl.h"
/* local function prototypes */
static void file_open_dialog_create (Gimp *gimp);
static void file_open_genbutton_callback (GtkWidget *widget,
gpointer data);
static void file_open_clistrow_callback (GtkWidget *widget,
gint row,
gint column,
GdkEvent *event,
gpointer data);
static void file_open_ok_callback (GtkWidget *widget,
gpointer data);
static void file_open_type_callback (GtkWidget *widget,
gpointer data);
static GSList * clist_to_slist (GtkCList *file_list);
static void file_open_dialog_create (Gimp *gimp);
static void file_open_genbutton_callback (GtkWidget *widget,
gpointer data);
static void file_open_selchanged_callback (GtkTreeSelection *sel,
gpointer data);
static void file_open_ok_callback (GtkWidget *widget,
gpointer data);
static void file_open_type_callback (GtkWidget *widget,
gpointer data);
static GSList * tvsel_to_slist (GtkTreeView *file_list);
......@@ -183,6 +174,7 @@ static void
file_open_dialog_create (Gimp *gimp)
{
GtkFileSelection *file_sel;
GtkTreeSelection *sel;
fileload = gtk_file_selection_new (_("Open Image"));
......@@ -209,13 +201,12 @@ file_open_dialog_create (Gimp *gimp)
gtk_quit_add_destroy (1, GTK_OBJECT (fileload));
gtk_clist_set_selection_mode
(GTK_CLIST (GTK_FILE_SELECTION (fileload)->file_list),
GTK_SELECTION_EXTENDED);
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (GTK_FILE_SELECTION (fileload)->file_list));
gtk_tree_selection_set_mode (sel, GTK_SELECTION_MULTIPLE);
/* Catch file-clist clicks so we can update the preview thumbnail */
g_signal_connect (G_OBJECT (file_sel->file_list), "select_row",
G_CALLBACK (file_open_clistrow_callback),
/* Catch file-list clicks so we can update the preview thumbnail */
g_signal_connect (G_OBJECT (sel), "changed",
G_CALLBACK (file_open_selchanged_callback),
fileload);
/* Connect the "F1" help key */
......@@ -560,24 +551,24 @@ set_preview (Gimp *gimp,
}
static void
file_open_clistrow_callback (GtkWidget *widget,
gint row,
gint column,
GdkEvent *event,
gpointer data)
file_open_selchanged_callback (GtkTreeSelection *sel,
gpointer data)
{
GtkFileSelection *fileload;
Gimp *gimp;
const gchar *fullfname;
fileload = GTK_FILE_SELECTION (data);
if (gtk_tree_selection_get_selected (sel, NULL, NULL))
{
fileload = GTK_FILE_SELECTION (data);
gimp = GIMP (g_object_get_data (G_OBJECT (fileload), "gimp"));
gimp = GIMP (g_object_get_data (G_OBJECT (fileload), "gimp"));
fullfname = gtk_file_selection_get_filename (fileload);
fullfname = gtk_file_selection_get_filename (fileload);
gtk_widget_set_sensitive (GTK_WIDGET (open_options_frame), TRUE);
set_preview (gimp, fullfname, NULL, 0, 0);
gtk_widget_set_sensitive (GTK_WIDGET (open_options_frame), TRUE);
set_preview (gimp, fullfname, NULL, 0, 0);
}
}
static void
......@@ -614,8 +605,8 @@ file_open_genbutton_callback (GtkWidget *widget,
/* new mult-file preview make: */
/* Have to read the clist before touching anything else */
toplist = clist_to_slist (GTK_CLIST (fs->file_list));
/* Have to read the list before touching anything else */
toplist = tvsel_to_slist (GTK_TREE_VIEW (fs->file_list));
dirname = g_path_get_dirname (gtk_file_selection_get_filename (fs));
......@@ -746,12 +737,12 @@ file_open_ok_callback (GtkWidget *widget,
/*
* Now deal with multiple selections from the filesel clist
* Now deal with multiple selections from the filesel list
*/
/* Have to read the clist before touching anything else */
/* Have to read the list before touching anything else */
list = clist_to_slist (GTK_CLIST (fs->file_list));
list = tvsel_to_slist (GTK_TREE_VIEW (fs->file_list));
raw_filename = g_strdup (raw_filename);
dirname = g_path_get_dirname (full_filename);
......@@ -801,27 +792,27 @@ file_open_ok_callback (GtkWidget *widget,
gtk_widget_set_sensitive (GTK_WIDGET (fs), TRUE);
}
static void
tvsel_to_slist_helper (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data)
{
GSList **list = data;
gchar *filename;
gtk_tree_model_get (model, iter, 0, &filename, -1);
*list = g_slist_prepend (*list, filename);
}
static GSList *
clist_to_slist (GtkCList *file_list)
tvsel_to_slist (GtkTreeView *file_list)
{
GSList *list = NULL;
GList *row;
gint rownum;
gchar *temp;
GtkTreeSelection *sel;
GSList *list = NULL;
for (row = file_list->row_list, rownum = 0;
row;
row = g_list_next (row), rownum++)
{
if (GTK_CLIST_ROW (row)->state == GTK_STATE_SELECTED)
{
if (gtk_clist_get_cell_type (file_list, rownum, 0) == GTK_CELL_TEXT)
{
gtk_clist_get_text (file_list, rownum, 0, &temp);
list = g_slist_prepend (list, g_strdup (temp));
}
}
}
sel = gtk_tree_view_get_selection (file_list);
gtk_tree_selection_selected_foreach (sel, tvsel_to_slist_helper, &list);
return list;
}
......@@ -61,30 +61,21 @@
#include "undo.h"
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtkclist.h>
#include "libgimp/gimpintl.h"
/* local function prototypes */
static void file_open_dialog_create (Gimp *gimp);
static void file_open_genbutton_callback (GtkWidget *widget,
gpointer data);
static void file_open_clistrow_callback (GtkWidget *widget,
gint row,
gint column,
GdkEvent *event,
gpointer data);
static void file_open_ok_callback (GtkWidget *widget,
gpointer data);
static void file_open_type_callback (GtkWidget *widget,
gpointer data);
static GSList * clist_to_slist (GtkCList *file_list);
static void file_open_dialog_create (Gimp *gimp);
static void file_open_genbutton_callback (GtkWidget *widget,
gpointer data);
static void file_open_selchanged_callback (GtkTreeSelection *sel,
gpointer data);
static void file_open_ok_callback (GtkWidget *widget,
gpointer data);
static void file_open_type_callback (GtkWidget *widget,
gpointer data);
static GSList * tvsel_to_slist (GtkTreeView *file_list);
......@@ -183,6 +174,7 @@ static void
file_open_dialog_create (Gimp *gimp)
{
GtkFileSelection *file_sel;
GtkTreeSelection *sel;
fileload = gtk_file_selection_new (_("Open Image"));
......@@ -209,13 +201,12 @@ file_open_dialog_create (Gimp *gimp)
gtk_quit_add_destroy (1, GTK_OBJECT (fileload));
gtk_clist_set_selection_mode
(GTK_CLIST (GTK_FILE_SELECTION (fileload)->file_list),
GTK_SELECTION_EXTENDED);
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (GTK_FILE_SELECTION (fileload)->file_list));
gtk_tree_selection_set_mode (sel, GTK_SELECTION_MULTIPLE);
/* Catch file-clist clicks so we can update the preview thumbnail */
g_signal_connect (G_OBJECT (file_sel->file_list), "select_row",
G_CALLBACK (file_open_clistrow_callback),
/* Catch file-list clicks so we can update the preview thumbnail */
g_signal_connect (G_OBJECT (sel), "changed",
G_CALLBACK (file_open_selchanged_callback),
fileload);
/* Connect the "F1" help key */
......@@ -560,24 +551,24 @@ set_preview (Gimp *gimp,
}
static void
file_open_clistrow_callback (GtkWidget *widget,
gint row,
gint column,
GdkEvent *event,
gpointer data)
file_open_selchanged_callback (GtkTreeSelection *sel,
gpointer data)
{
GtkFileSelection *fileload;
Gimp *gimp;
const gchar *fullfname;
fileload = GTK_FILE_SELECTION (data);
if (gtk_tree_selection_get_selected (sel, NULL, NULL))
{
fileload = GTK_FILE_SELECTION (data);
gimp = GIMP (g_object_get_data (G_OBJECT (fileload), "gimp"));
gimp = GIMP (g_object_get_data (G_OBJECT (fileload), "gimp"));
fullfname = gtk_file_selection_get_filename (fileload);
fullfname = gtk_file_selection_get_filename (fileload);
gtk_widget_set_sensitive (GTK_WIDGET (open_options_frame), TRUE);
set_preview (gimp, fullfname, NULL, 0, 0);
gtk_widget_set_sensitive (GTK_WIDGET (open_options_frame), TRUE);
set_preview (gimp, fullfname, NULL, 0, 0);
}
}
static void
......@@ -614,8 +605,8 @@ file_open_genbutton_callback (GtkWidget *widget,
/* new mult-file preview make: */
/* Have to read the clist before touching anything else */
toplist = clist_to_slist (GTK_CLIST (fs->file_list));
/* Have to read the list before touching anything else */
toplist = tvsel_to_slist (GTK_TREE_VIEW (fs->file_list));
dirname = g_path_get_dirname (gtk_file_selection_get_filename (fs));
......@@ -746,12 +737,12 @@ file_open_ok_callback (GtkWidget *widget,
/*
* Now deal with multiple selections from the filesel clist
* Now deal with multiple selections from the filesel list
*/
/* Have to read the clist before touching anything else */
/* Have to read the list before touching anything else */
list = clist_to_slist (GTK_CLIST (fs->file_list));
list = tvsel_to_slist (GTK_TREE_VIEW (fs->file_list));
raw_filename = g_strdup (raw_filename);
dirname = g_path_get_dirname (full_filename);
......@@ -801,27 +792,27 @@ file_open_ok_callback (GtkWidget *widget,
gtk_widget_set_sensitive (GTK_WIDGET (fs), TRUE);
}
static void
tvsel_to_slist_helper (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data)
{
GSList **list = data;
gchar *filename;
gtk_tree_model_get (model, iter, 0, &filename, -1);
*list = g_slist_prepend (*list, filename);
}
static GSList *
clist_to_slist (GtkCList *file_list)
tvsel_to_slist (GtkTreeView *file_list)
{
GSList *list = NULL;
GList *row;
gint rownum;
gchar *temp;
GtkTreeSelection *sel;
GSList *list = NULL;
for (row = file_list->row_list, rownum = 0;
row;
row = g_list_next (row), rownum++)
{
if (GTK_CLIST_ROW (row)->state == GTK_STATE_SELECTED)
{
if (gtk_clist_get_cell_type (file_list, rownum, 0) == GTK_CELL_TEXT)
{
gtk_clist_get_text (file_list, rownum, 0, &temp);
list = g_slist_prepend (list, g_strdup (temp));
}
}
}
sel = gtk_tree_view_get_selection (file_list);
gtk_tree_selection_selected_foreach (sel, tvsel_to_slist_helper, &list);
return list;
}
......@@ -23,6 +23,15 @@
#define __GIMP_PREVIEW_H__
#if defined(GTK_DISABLE_DEPRECATED) && !defined(__GIMP_COLOR_AREA_H__)
/* eeek... really bad hack for the time being */
typedef enum
{
GTK_PREVIEW_COLOR,
GTK_PREVIEW_GRAYSCALE
} GtkPreviewType;
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtkpreview.h>
......
......@@ -23,6 +23,15 @@
#define __GIMP_PREVIEW_H__
#if defined(GTK_DISABLE_DEPRECATED) && !defined(__GIMP_COLOR_AREA_H__)
/* eeek... really bad hack for the time being */
typedef enum
{
GTK_PREVIEW_COLOR,
GTK_PREVIEW_GRAYSCALE
} GtkPreviewType;
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtkpreview.h>
......
......@@ -23,6 +23,15 @@
#define __GIMP_PREVIEW_H__
#if defined(GTK_DISABLE_DEPRECATED) && !defined(__GIMP_COLOR_AREA_H__)
/* eeek... really bad hack for the time being */
typedef enum
{
GTK_PREVIEW_COLOR,
GTK_PREVIEW_GRAYSCALE
} GtkPreviewType;
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtkpreview.h>
......
......@@ -23,6 +23,15 @@
#define __GIMP_PREVIEW_H__
#if defined(GTK_DISABLE_DEPRECATED) && !defined(__GIMP_COLOR_AREA_H__)
/* eeek... really bad hack for the time being */
typedef enum
{
GTK_PREVIEW_COLOR,
GTK_PREVIEW_GRAYSCALE
} GtkPreviewType;
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtkpreview.h>
......
......@@ -276,7 +276,9 @@ procedure_select_callback (GtkTreeSelection *sel,
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
gtk_tree_model_get (dbbrowser->store, &iter, 1, &func, -1);
gtk_tree_model_get (GTK_TREE_MODEL (dbbrowser->store), &iter,
1, &func,
-1);
dialog_select (dbbrowser, func);
g_free (func);
}
......@@ -623,7 +625,7 @@ dialog_search_callback (GtkWidget *widget,
if (num_procs > 0)
{
gtk_tree_model_get_iter_root (dbbrowser->store, &iter);
gtk_tree_model_get_iter_root (GTK_TREE_MODEL (dbbrowser->store), &iter);
gtk_tree_selection_select_iter (dbbrowser->sel, &iter);
}
......
......@@ -276,7 +276,9 @@ procedure_select_callback (GtkTreeSelection *sel,
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
gtk_tree_model_get (dbbrowser->store, &iter, 1, &func, -1);
gtk_tree_model_get (GTK_TREE_MODEL (dbbrowser->store), &iter,
1, &func,
-1);
dialog_select (dbbrowser, func);
g_free (func);
}
......@@ -623,7 +625,7 @@ dialog_search_callback (GtkWidget *widget,
if (num_procs > 0)
{
gtk_tree_model_get_iter_root (dbbrowser->store, &iter);
gtk_tree_model_get_iter_root (GTK_TREE_MODEL (dbbrowser->store), &iter);
gtk_tree_selection_select_iter (dbbrowser->sel, &iter);
}
......
......@@ -6,3 +6,5 @@ _libs
.libs
.deps
*.la
gimpwidgetsmarshal.h
gimpwidgetsmarshal.c
......@@ -16,15 +16,9 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(includedir) \
@STRIP_END@
EXTRA_DIST = \
makefile.mingw \
makefile.mingw.in \
makefile.msc \
gimpwidgets.def
lib_LTLIBRARIES = libgimpwidgets-1.3.la
libgimpwidgets_1_3_la_SOURCES = @STRIP_BEGIN@ \
libgimpwidgets_1_3_la_sources = @STRIP_BEGIN@ \
gimpwidgets.c \
gimpwidgets.h \
gimpwidgetstypes.h \
......@@ -58,6 +52,26 @@ libgimpwidgets_1_3_la_SOURCES = @STRIP_BEGIN@ \
gimpunitmenu.h \
@STRIP_END@
libgimpwidgets_1_3_la_built_sources = @STRIP_BEGIN@ \
gimpwidgetsmarshal.c \
gimpwidgetsmarshal.h \
@STRIP_END@
libgimpwidgets_1_3_la_extra_sources = @STRIP_BEGIN@ \
gimpwidgetsmarshal.list \
@STRIP_END@
EXTRA_DIST = \
makefile.mingw \
makefile.mingw.in \
makefile.msc \
gimpwidgets.def \
$(libgimpwidgets_1_3_la_extra_sources)
libgimpwidgets_1_3_la_SOURCES = \
$(libgimpwidgets_1_3_la_built_sources) \
$(libgimpwidgets_1_3_la_sources)
libgimpwidgetsinclude_HEADERS = @STRIP_BEGIN@ \
gimpwidgets.h \
gimpwidgetstypes.h \
......@@ -84,3 +98,22 @@ libgimpwidgets_1_3_la_LDFLAGS = @STRIP_BEGIN@ \
@STRIP_END@
libgimpwidgets_1_3_la_LIBADD = $(GLIB_LIBS) -lm
#
# rules to generate built sources
#
# setup autogeneration dependancies
gen_sources = xgen-gwmh xgen-gwmc
CLEANFILES = $(gen_sources)
$(srcdir)/gimpwidgetsmarshal.h: $(srcdir)/gimpwidgetsmarshal.list
$(GLIB_GENMARSHAL) --prefix=_gimp_widgets_marshal $(srcdir)/gimpwidgetsmarshal.list --header >> xgen-gwmh \
&& (cmp -s xgen-gwmh $(@F) || cp xgen-gwmh $(@F)) \
&& rm -f xgen-gwmh xgen-gwmh~
$(srcdir)/gimpwidgetsmarshal.c: $(srcdir)/gimpwidgetsmarshal.h
echo "#include \"gimpwidgetsmarshal.h\"" >> xgen-gwmc \
&& $(GLIB_GENMARSHAL) --prefix=_gimp_widgets_marshal $(srcdir)/gimpwidgetsmarshal.list --body >> xgen-gwmc \
&& cp xgen-gwmc $(@F) \
&& rm -f xgen-gwmc xgen-gwmc~
......@@ -29,6 +29,13 @@
#define __GIMP_COLOR_AREA_H__
#ifdef GTK_DISABLE_DEPRECATED
/* eeek... really bad hack for the time being */
typedef enum
{
GTK_PREVIEW_COLOR,
GTK_PREVIEW_GRAYSCALE
} GtkPreviewType;
#undef GTK_DISABLE_DEPRECATED
#define GIMP_IGNORE_ME_PLEASE_FOOBAR
#endif
......
......@@ -22,15 +22,11 @@
#include <stdio.h>
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include "gimpwidgetstypes.h"
#include "gimpwidgetsmarshal.h"
#include "gimpoffsetarea.h"
......@@ -103,7 +99,7 @@ gimp_offset_area_class_init (GimpOffsetAreaClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpOffsetAreaClass, offsets_changed),
NULL, NULL,
gtk_marshal_VOID__INT_INT,
_gimp_widgets_marshal_VOID__INT_INT,
G_TYPE_NONE, 2,
G_TYPE_INT,
G_TYPE_INT);
......
......@@ -4,6 +4,15 @@
#include "Events.h"
#include "Dialogs.h"
#ifdef GTK_DISABLE_DEPRECATED
/* eeek... really bad hack for the time being */
typedef enum
{
GTK_PREVIEW_COLOR,
GTK_PREVIEW_GRAYSCALE
} GtkPreviewType;
#endif
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
......
......@@ -42,6 +42,15 @@ static char ident[] = "@(#) GIMP Film plug-in v1.04 1999-10-08";
#include <gtk/gtk.h>
#ifdef GTK_DISABLE_DEPRECATED
/* eeek... really bad hack for the time being */
typedef enum
{
GTK_PREVIEW_COLOR,
GTK_PREVIEW_GRAYSCALE
} GtkPreviewType;
#endif
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
......
......@@ -37,6 +37,9 @@
#define GTK_DISABLE_DEPRECATED
/* ewww... deprecation hacks again */
#define __GIMP_COLOR_AREA_H__
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -37,6 +37,9 @@
#define GTK_DISABLE_DEPRECATED
/* ewww... deprecation hacks again */
#define __GIMP_COLOR_AREA_H__
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -276,7 +276,9 @@ procedure_select_callback (GtkTreeSelection *sel,
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
gtk_tree_model_get (dbbrowser->store, &iter, 1, &func, -1);
gtk_tree_model_get (GTK_TREE_MODEL (dbbrowser->store), &iter,
1, &func,
-1);
dialog_select (dbbrowser, func);
g_free (func);
}
......@@ -623,7 +625,7 @@ dialog_search_callback (GtkWidget *widget,
if (num_procs > 0)
{
gtk_tree_model_get_iter_root (dbbrowser->store, &iter);
gtk_tree_model_get_iter_root (GTK_TREE_MODEL (dbbrowser->store), &iter);
gtk_tree_selection_select_iter (dbbrowser->sel, &iter);
}
......
......@@ -276,7 +276,9 @@ procedure_select_callback (GtkTreeSelection *sel,
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
gtk_tree_model_get (dbbrowser->store, &iter, 1, &func, -1);
gtk_tree_model_get (GTK_TREE_MODEL (dbbrowser->store), &iter,
1, &func,
-1);
dialog_select (dbbrowser, func);
g_free (func);
}
......@@ -623,7 +625,7 @@ dialog_search_callback (GtkWidget *widget,
if (num_procs > 0)
{
gtk_tree_model_get_iter_root (dbbrowser->store, &iter);
gtk_tree_model_get_iter_root (GTK_TREE_MODEL (dbbrowser->store), &iter);
gtk_tree_selection_select_iter (dbbrowser->sel, &iter);
}
......
......@@ -276,7 +276,9 @@ procedure_select_callback (GtkTreeSelection *sel,
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
gtk_tree_model_get (dbbrowser->store, &iter, 1, &func, -1);
gtk_tree_model_get (GTK_TREE_MODEL (dbbrowser->store), &iter,
1, &func,
-1);
dialog_select (dbbrowser, func);
g_free (func);
}
......@@ -623,7 +625,7 @@ dialog_search_callback (GtkWidget *widget,
if (num_procs > 0)
{
gtk_tree_model_get_iter_root (dbbrowser->store, &iter);
gtk_tree_model_get_iter_root (GTK_TREE_MODEL (dbbrowser->store), &iter);
gtk_tree_selection_select_iter (dbbrowser->sel, &iter);
}
......
......@@ -37,6 +37,9 @@
#define GTK_DISABLE_DEPRECATED
/* ewww... deprecation hacks again */
#define __GIMP_COLOR_AREA_H__
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -7,6 +7,15 @@
#include "fp.h"
#ifdef GTK_DISABLE_DEPRECATED
/* eeek... really bad hack for the time being */
typedef enum
{
GTK_PREVIEW_COLOR,
GTK_PREVIEW_GRAYSCALE
} GtkPreviewType;
#endif
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
......
......@@ -43,6 +43,15 @@
#include <gtk/gtk.h>
#ifdef GTK_DISABLE_DEPRECATED