plug-ins/dbbrowser/Makefile.am removed again...
2005-05-19 Michael Natterer <mitch@gimp.org> * plug-ins/dbbrowser/Makefile.am * plug-ins/dbbrowser/gimpbrowser.[ch]: removed again... * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgetstypes.h * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgets.def * libgimpwidgets/gimpbrowser.[ch]: ...and added here. * plug-ins/dbbrowser/gimpprocbrowser.c * plug-ins/dbbrowser/plugin-browser.c: changed accordingly. * plug-ins/dbbrowser/gimpprocbrowser.c: fixed searching by help.
This commit is contained in:

committed by
Michael Natterer

parent
9aa2efcb32
commit
73e3f6f13b
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
|||||||
|
2005-05-19 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/dbbrowser/Makefile.am
|
||||||
|
* plug-ins/dbbrowser/gimpbrowser.[ch]: removed again...
|
||||||
|
|
||||||
|
* libgimpwidgets/Makefile.am
|
||||||
|
* libgimpwidgets/gimpwidgetstypes.h
|
||||||
|
* libgimpwidgets/gimpwidgets.h
|
||||||
|
* libgimpwidgets/gimpwidgetsmarshal.list
|
||||||
|
* libgimpwidgets/gimpwidgets.def
|
||||||
|
* libgimpwidgets/gimpbrowser.[ch]: ...and added here.
|
||||||
|
|
||||||
|
* plug-ins/dbbrowser/gimpprocbrowser.c
|
||||||
|
* plug-ins/dbbrowser/plugin-browser.c: changed accordingly.
|
||||||
|
|
||||||
|
* plug-ins/dbbrowser/gimpprocbrowser.c: fixed searching by help.
|
||||||
|
|
||||||
2005-05-19 Sven Neumann <sven@gimp.org>
|
2005-05-19 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/widgets/gimpdasheditor.c: use code from gimpdashpattern.c
|
* app/widgets/gimpdasheditor.c: use code from gimpdashpattern.c
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include <libgimp/gimp.h>
|
#include <libgimp/gimp.h>
|
||||||
#include <libgimp/gimpui.h>
|
#include <libgimp/gimpui.h>
|
||||||
|
|
||||||
#include "gimpbrowser.h"
|
|
||||||
#include "gimpprocbrowser.h"
|
#include "gimpprocbrowser.h"
|
||||||
#include "gimpprocview.h"
|
#include "gimpprocview.h"
|
||||||
|
|
||||||
@ -102,6 +101,7 @@ static void browser_row_activated (GtkTreeView *treeview,
|
|||||||
static void browser_show_procedure (GimpDBBrowser *browser,
|
static void browser_show_procedure (GimpDBBrowser *browser,
|
||||||
gchar *proc_name);
|
gchar *proc_name);
|
||||||
static void browser_search (GimpBrowser *browser,
|
static void browser_search (GimpBrowser *browser,
|
||||||
|
const gchar *query_text,
|
||||||
gint search_type,
|
gint search_type,
|
||||||
GimpDBBrowser *db_browser);
|
GimpDBBrowser *db_browser);
|
||||||
static void browser_response (GtkWidget *widget,
|
static void browser_response (GtkWidget *widget,
|
||||||
@ -231,7 +231,8 @@ gimp_proc_browser_dialog_new (gboolean scheme_names,
|
|||||||
browser->return_vals = NULL;
|
browser->return_vals = NULL;
|
||||||
|
|
||||||
/* first search (all procedures) */
|
/* first search (all procedures) */
|
||||||
browser_search (GIMP_BROWSER (browser->browser), SEARCH_TYPE_ALL, browser);
|
browser_search (GIMP_BROWSER (browser->browser), "", SEARCH_TYPE_ALL,
|
||||||
|
browser);
|
||||||
|
|
||||||
return browser->dialog;
|
return browser->dialog;
|
||||||
}
|
}
|
||||||
@ -314,15 +315,13 @@ browser_show_procedure (GimpDBBrowser *browser,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
browser_search (GimpBrowser *gimp_browser,
|
browser_search (GimpBrowser *gimp_browser,
|
||||||
|
const gchar *query_text,
|
||||||
gint search_type,
|
gint search_type,
|
||||||
GimpDBBrowser *browser)
|
GimpDBBrowser *browser)
|
||||||
{
|
{
|
||||||
const gchar *query_text;
|
gchar **proc_list;
|
||||||
gchar **proc_list;
|
gint num_procs;
|
||||||
gint num_procs;
|
gchar *str;
|
||||||
gchar *str;
|
|
||||||
|
|
||||||
query_text = gtk_entry_get_text (GTK_ENTRY (gimp_browser->search_entry));
|
|
||||||
|
|
||||||
if (search_type == SEARCH_TYPE_NAME)
|
if (search_type == SEARCH_TYPE_NAME)
|
||||||
{
|
{
|
||||||
@ -356,6 +355,14 @@ browser_search (GimpBrowser *gimp_browser,
|
|||||||
gimp_procedural_db_query (".*", query_text, ".*", ".*", ".*", ".*", ".*",
|
gimp_procedural_db_query (".*", query_text, ".*", ".*", ".*", ".*", ".*",
|
||||||
&num_procs, &proc_list);
|
&num_procs, &proc_list);
|
||||||
}
|
}
|
||||||
|
else if (search_type == SEARCH_TYPE_HELP)
|
||||||
|
{
|
||||||
|
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
||||||
|
_("Searching by help - please wait"));
|
||||||
|
|
||||||
|
gimp_procedural_db_query (".*", ".*", query_text, ".*", ".*", ".*", ".*",
|
||||||
|
&num_procs, &proc_list);
|
||||||
|
}
|
||||||
else if (search_type == SEARCH_TYPE_AUTHOR)
|
else if (search_type == SEARCH_TYPE_AUTHOR)
|
||||||
{
|
{
|
||||||
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
||||||
|
@ -63,6 +63,8 @@ libgimpwidgets_2_0_la_sources = \
|
|||||||
gimpwidgets.c \
|
gimpwidgets.c \
|
||||||
gimpwidgets.h \
|
gimpwidgets.h \
|
||||||
gimpwidgetstypes.h \
|
gimpwidgetstypes.h \
|
||||||
|
gimpbrowser.c \
|
||||||
|
gimpbrowser.h \
|
||||||
gimpbutton.c \
|
gimpbutton.c \
|
||||||
gimpbutton.h \
|
gimpbutton.h \
|
||||||
gimpcellrenderercolor.c \
|
gimpcellrenderercolor.c \
|
||||||
@ -162,6 +164,7 @@ libgimpwidgets_2_0_la_SOURCES = \
|
|||||||
libgimpwidgetsinclude_HEADERS = \
|
libgimpwidgetsinclude_HEADERS = \
|
||||||
gimpwidgets.h \
|
gimpwidgets.h \
|
||||||
gimpwidgetstypes.h \
|
gimpwidgetstypes.h \
|
||||||
|
gimpbrowser.h \
|
||||||
gimpbutton.h \
|
gimpbutton.h \
|
||||||
gimpcellrenderercolor.h \
|
gimpcellrenderercolor.h \
|
||||||
gimpcellrenderertoggle.h\
|
gimpcellrenderertoggle.h\
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
/* The GIMP -- an image manipulation program
|
/* LIBGIMP - The GIMP Library
|
||||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||||
*
|
*
|
||||||
* gimpbrowser.c
|
* gimpbrowser.c
|
||||||
* Copyright (C) 2005 Michael Natterer <mitch@gimp.org>
|
* Copyright (C) 2005 Michael Natterer <mitch@gimp.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU General Public License as published by
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* License as published by the Free Software Foundation; either
|
||||||
* (at your option) any later version.
|
* version 2 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* along with this program; if not, write to the Free Software
|
* License along with this library; if not, write to the
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -25,17 +26,13 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include <libgimp/gimp.h>
|
#include "gimpwidgetstypes.h"
|
||||||
#include <libgimp/gimpui.h>
|
|
||||||
|
|
||||||
#include "gimpbrowser.h"
|
#include "gimpbrowser.h"
|
||||||
|
#include "gimpintcombobox.h"
|
||||||
|
#include "gimpwidgetsmarshal.h"
|
||||||
|
|
||||||
#include "libgimp/stdplugins-intl.h"
|
#include "libgimp/libgimp-intl.h"
|
||||||
|
|
||||||
|
|
||||||
#define DBL_LIST_WIDTH 250
|
|
||||||
#define DBL_WIDTH (DBL_LIST_WIDTH + 400)
|
|
||||||
#define DBL_HEIGHT 250
|
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -101,8 +98,9 @@ gimp_browser_class_init (GimpBrowserClass *klass)
|
|||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (GimpBrowserClass, search),
|
G_STRUCT_OFFSET (GimpBrowserClass, search),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__INT,
|
_gimp_widgets_marshal_VOID__STRING_INT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 2,
|
||||||
|
G_TYPE_STRING,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
|
|
||||||
gtk_object_class->destroy = gimp_browser_destroy;
|
gtk_object_class->destroy = gimp_browser_destroy;
|
||||||
@ -306,13 +304,21 @@ static gboolean
|
|||||||
gimp_browser_search_timeout (gpointer data)
|
gimp_browser_search_timeout (gpointer data)
|
||||||
{
|
{
|
||||||
GimpBrowser *browser = GIMP_BROWSER (data);
|
GimpBrowser *browser = GIMP_BROWSER (data);
|
||||||
|
const gchar *search_string;
|
||||||
|
|
||||||
GDK_THREADS_ENTER();
|
GDK_THREADS_ENTER();
|
||||||
|
|
||||||
|
search_string = gtk_entry_get_text (GTK_ENTRY (browser->search_entry));
|
||||||
|
|
||||||
|
if (! search_string)
|
||||||
|
search_string = "";
|
||||||
|
|
||||||
g_signal_emit (browser, browser_signals[SEARCH], 0,
|
g_signal_emit (browser, browser_signals[SEARCH], 0,
|
||||||
browser->search_type);
|
search_string, browser->search_type);
|
||||||
GDK_THREADS_LEAVE();
|
|
||||||
|
|
||||||
browser->search_timeout_id = 0;
|
browser->search_timeout_id = 0;
|
||||||
|
|
||||||
|
GDK_THREADS_LEAVE();
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
@ -1,30 +1,34 @@
|
|||||||
/* The GIMP -- an image manipulation program
|
/* LIBGIMP - The GIMP Library
|
||||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||||
*
|
*
|
||||||
* gimpbrowser.h
|
* gimpbrowser.h
|
||||||
* Copyright (C) 2005 Michael Natterer <mitch@gimp.org>
|
* Copyright (C) 2005 Michael Natterer <mitch@gimp.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU General Public License as published by
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* License as published by the Free Software Foundation; either
|
||||||
* (at your option) any later version.
|
* version 2 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* along with this program; if not, write to the Free Software
|
* License along with this library; if not, write to the
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GIMP_BROWSER_H__
|
#ifndef __GIMP_BROWSER_H__
|
||||||
#define __GIMP_BROWSER_H__
|
#define __GIMP_BROWSER_H__
|
||||||
|
|
||||||
|
|
||||||
#include <gtk/gtkhpaned.h>
|
#include <gtk/gtkhpaned.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_BROWSER (gimp_browser_get_type ())
|
#define GIMP_TYPE_BROWSER (gimp_browser_get_type ())
|
||||||
#define GIMP_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BROWSER, GimpBrowser))
|
#define GIMP_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BROWSER, GimpBrowser))
|
||||||
@ -34,8 +38,7 @@
|
|||||||
#define GIMP_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BROWSER, GimpBrowserClass))
|
#define GIMP_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BROWSER, GimpBrowserClass))
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpBrowser GimpBrowser;
|
typedef struct _GimpBrowserClass GimpBrowserClass;
|
||||||
typedef struct _GimpBrowserClass GimpBrowserClass;
|
|
||||||
|
|
||||||
struct _GimpBrowser
|
struct _GimpBrowser
|
||||||
{
|
{
|
||||||
@ -59,6 +62,7 @@ struct _GimpBrowserClass
|
|||||||
GtkHPanedClass parent_class;
|
GtkHPanedClass parent_class;
|
||||||
|
|
||||||
void (* search) (GimpBrowser *browser,
|
void (* search) (GimpBrowser *browser,
|
||||||
|
const gchar *search_string,
|
||||||
gint search_type);
|
gint search_type);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -78,4 +82,6 @@ void gimp_browser_show_message (GimpBrowser *browser,
|
|||||||
const gchar *message);
|
const gchar *message);
|
||||||
|
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GIMP_BROWSER_H__ */
|
#endif /* __GIMP_BROWSER_H__ */
|
@ -1,4 +1,9 @@
|
|||||||
EXPORTS
|
EXPORTS
|
||||||
|
gimp_browser_add_search_types
|
||||||
|
gimp_browser_get_type
|
||||||
|
gimp_browser_new
|
||||||
|
gimp_browser_set_widget
|
||||||
|
gimp_browser_show_message
|
||||||
gimp_button_extended_clicked
|
gimp_button_extended_clicked
|
||||||
gimp_button_get_type
|
gimp_button_get_type
|
||||||
gimp_button_new
|
gimp_button_new
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <libgimpwidgets/gimpwidgetstypes.h>
|
#include <libgimpwidgets/gimpwidgetstypes.h>
|
||||||
|
|
||||||
|
#include <libgimpwidgets/gimpbrowser.h>
|
||||||
#include <libgimpwidgets/gimpbutton.h>
|
#include <libgimpwidgets/gimpbutton.h>
|
||||||
#include <libgimpwidgets/gimpcellrenderercolor.h>
|
#include <libgimpwidgets/gimpcellrenderercolor.h>
|
||||||
#include <libgimpwidgets/gimpcellrenderertoggle.h>
|
#include <libgimpwidgets/gimpcellrenderertoggle.h>
|
||||||
|
@ -28,5 +28,6 @@ VOID: OBJECT
|
|||||||
VOID: OBJECT, INT
|
VOID: OBJECT, INT
|
||||||
VOID: POINTER, POINTER
|
VOID: POINTER, POINTER
|
||||||
VOID: STRING, FLAGS
|
VOID: STRING, FLAGS
|
||||||
|
VOID: STRING, INT
|
||||||
|
|
||||||
BOOLEAN: POINTER
|
BOOLEAN: POINTER
|
||||||
|
@ -55,6 +55,7 @@ typedef enum
|
|||||||
} GimpSizeEntryUpdatePolicy;
|
} GimpSizeEntryUpdatePolicy;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpBrowser GimpBrowser;
|
||||||
typedef struct _GimpButton GimpButton;
|
typedef struct _GimpButton GimpButton;
|
||||||
typedef struct _GimpCellRendererColor GimpCellRendererColor;
|
typedef struct _GimpCellRendererColor GimpCellRendererColor;
|
||||||
typedef struct _GimpCellRendererToggle GimpCellRendererToggle;
|
typedef struct _GimpCellRendererToggle GimpCellRendererToggle;
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include <libgimp/gimp.h>
|
#include <libgimp/gimp.h>
|
||||||
#include <libgimp/gimpui.h>
|
#include <libgimp/gimpui.h>
|
||||||
|
|
||||||
#include "gimpbrowser.h"
|
|
||||||
#include "gimpprocview.h"
|
#include "gimpprocview.h"
|
||||||
|
|
||||||
#include "libgimp/stdplugins-intl.h"
|
#include "libgimp/stdplugins-intl.h"
|
||||||
@ -374,10 +373,10 @@ insert_into_tree_view (PluginBrowser *browser,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
browser_search (GimpBrowser *gimp_browser,
|
browser_search (GimpBrowser *gimp_browser,
|
||||||
|
const gchar *search_text,
|
||||||
gint search_type,
|
gint search_type,
|
||||||
PluginBrowser *browser)
|
PluginBrowser *browser)
|
||||||
{
|
{
|
||||||
const gchar *search_text;
|
|
||||||
GimpParam *return_vals;
|
GimpParam *return_vals;
|
||||||
gint nreturn_vals;
|
gint nreturn_vals;
|
||||||
gint num_plugins;
|
gint num_plugins;
|
||||||
@ -385,11 +384,6 @@ browser_search (GimpBrowser *gimp_browser,
|
|||||||
GtkListStore *list_store;
|
GtkListStore *list_store;
|
||||||
GtkTreeStore *tree_store;
|
GtkTreeStore *tree_store;
|
||||||
|
|
||||||
search_text = gtk_entry_get_text (GTK_ENTRY (gimp_browser->search_entry));
|
|
||||||
|
|
||||||
if (! search_text)
|
|
||||||
search_text = "";
|
|
||||||
|
|
||||||
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
||||||
_("Searching by name - please wait"));
|
_("Searching by name - please wait"));
|
||||||
|
|
||||||
@ -708,7 +702,7 @@ browser_dialog_new (void)
|
|||||||
DBL_WIDTH - DBL_LIST_WIDTH, -1);
|
DBL_WIDTH - DBL_LIST_WIDTH, -1);
|
||||||
|
|
||||||
/* now build the list */
|
/* now build the list */
|
||||||
browser_search (GIMP_BROWSER (browser->browser), 0, browser);
|
browser_search (GIMP_BROWSER (browser->browser), "", 0, browser);
|
||||||
|
|
||||||
gtk_widget_show (browser->dialog);
|
gtk_widget_show (browser->dialog);
|
||||||
|
|
||||||
|
@ -20,8 +20,6 @@ noinst_LTLIBRARIES = libgimpprocbrowser.la
|
|||||||
libexec_PROGRAMS = plugin-browser procedure-browser
|
libexec_PROGRAMS = plugin-browser procedure-browser
|
||||||
|
|
||||||
libgimpprocbrowser_la_SOURCES = \
|
libgimpprocbrowser_la_SOURCES = \
|
||||||
gimpbrowser.c \
|
|
||||||
gimpbrowser.h \
|
|
||||||
gimpprocbrowser.c \
|
gimpprocbrowser.c \
|
||||||
gimpprocbrowser.h \
|
gimpprocbrowser.h \
|
||||||
gimpprocview.c \
|
gimpprocview.c \
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include <libgimp/gimp.h>
|
#include <libgimp/gimp.h>
|
||||||
#include <libgimp/gimpui.h>
|
#include <libgimp/gimpui.h>
|
||||||
|
|
||||||
#include "gimpbrowser.h"
|
|
||||||
#include "gimpprocbrowser.h"
|
#include "gimpprocbrowser.h"
|
||||||
#include "gimpprocview.h"
|
#include "gimpprocview.h"
|
||||||
|
|
||||||
@ -102,6 +101,7 @@ static void browser_row_activated (GtkTreeView *treeview,
|
|||||||
static void browser_show_procedure (GimpDBBrowser *browser,
|
static void browser_show_procedure (GimpDBBrowser *browser,
|
||||||
gchar *proc_name);
|
gchar *proc_name);
|
||||||
static void browser_search (GimpBrowser *browser,
|
static void browser_search (GimpBrowser *browser,
|
||||||
|
const gchar *query_text,
|
||||||
gint search_type,
|
gint search_type,
|
||||||
GimpDBBrowser *db_browser);
|
GimpDBBrowser *db_browser);
|
||||||
static void browser_response (GtkWidget *widget,
|
static void browser_response (GtkWidget *widget,
|
||||||
@ -231,7 +231,8 @@ gimp_proc_browser_dialog_new (gboolean scheme_names,
|
|||||||
browser->return_vals = NULL;
|
browser->return_vals = NULL;
|
||||||
|
|
||||||
/* first search (all procedures) */
|
/* first search (all procedures) */
|
||||||
browser_search (GIMP_BROWSER (browser->browser), SEARCH_TYPE_ALL, browser);
|
browser_search (GIMP_BROWSER (browser->browser), "", SEARCH_TYPE_ALL,
|
||||||
|
browser);
|
||||||
|
|
||||||
return browser->dialog;
|
return browser->dialog;
|
||||||
}
|
}
|
||||||
@ -314,15 +315,13 @@ browser_show_procedure (GimpDBBrowser *browser,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
browser_search (GimpBrowser *gimp_browser,
|
browser_search (GimpBrowser *gimp_browser,
|
||||||
|
const gchar *query_text,
|
||||||
gint search_type,
|
gint search_type,
|
||||||
GimpDBBrowser *browser)
|
GimpDBBrowser *browser)
|
||||||
{
|
{
|
||||||
const gchar *query_text;
|
gchar **proc_list;
|
||||||
gchar **proc_list;
|
gint num_procs;
|
||||||
gint num_procs;
|
gchar *str;
|
||||||
gchar *str;
|
|
||||||
|
|
||||||
query_text = gtk_entry_get_text (GTK_ENTRY (gimp_browser->search_entry));
|
|
||||||
|
|
||||||
if (search_type == SEARCH_TYPE_NAME)
|
if (search_type == SEARCH_TYPE_NAME)
|
||||||
{
|
{
|
||||||
@ -356,6 +355,14 @@ browser_search (GimpBrowser *gimp_browser,
|
|||||||
gimp_procedural_db_query (".*", query_text, ".*", ".*", ".*", ".*", ".*",
|
gimp_procedural_db_query (".*", query_text, ".*", ".*", ".*", ".*", ".*",
|
||||||
&num_procs, &proc_list);
|
&num_procs, &proc_list);
|
||||||
}
|
}
|
||||||
|
else if (search_type == SEARCH_TYPE_HELP)
|
||||||
|
{
|
||||||
|
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
||||||
|
_("Searching by help - please wait"));
|
||||||
|
|
||||||
|
gimp_procedural_db_query (".*", ".*", query_text, ".*", ".*", ".*", ".*",
|
||||||
|
&num_procs, &proc_list);
|
||||||
|
}
|
||||||
else if (search_type == SEARCH_TYPE_AUTHOR)
|
else if (search_type == SEARCH_TYPE_AUTHOR)
|
||||||
{
|
{
|
||||||
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include <libgimp/gimp.h>
|
#include <libgimp/gimp.h>
|
||||||
#include <libgimp/gimpui.h>
|
#include <libgimp/gimpui.h>
|
||||||
|
|
||||||
#include "gimpbrowser.h"
|
|
||||||
#include "gimpprocview.h"
|
#include "gimpprocview.h"
|
||||||
|
|
||||||
#include "libgimp/stdplugins-intl.h"
|
#include "libgimp/stdplugins-intl.h"
|
||||||
@ -374,10 +373,10 @@ insert_into_tree_view (PluginBrowser *browser,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
browser_search (GimpBrowser *gimp_browser,
|
browser_search (GimpBrowser *gimp_browser,
|
||||||
|
const gchar *search_text,
|
||||||
gint search_type,
|
gint search_type,
|
||||||
PluginBrowser *browser)
|
PluginBrowser *browser)
|
||||||
{
|
{
|
||||||
const gchar *search_text;
|
|
||||||
GimpParam *return_vals;
|
GimpParam *return_vals;
|
||||||
gint nreturn_vals;
|
gint nreturn_vals;
|
||||||
gint num_plugins;
|
gint num_plugins;
|
||||||
@ -385,11 +384,6 @@ browser_search (GimpBrowser *gimp_browser,
|
|||||||
GtkListStore *list_store;
|
GtkListStore *list_store;
|
||||||
GtkTreeStore *tree_store;
|
GtkTreeStore *tree_store;
|
||||||
|
|
||||||
search_text = gtk_entry_get_text (GTK_ENTRY (gimp_browser->search_entry));
|
|
||||||
|
|
||||||
if (! search_text)
|
|
||||||
search_text = "";
|
|
||||||
|
|
||||||
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
||||||
_("Searching by name - please wait"));
|
_("Searching by name - please wait"));
|
||||||
|
|
||||||
@ -708,7 +702,7 @@ browser_dialog_new (void)
|
|||||||
DBL_WIDTH - DBL_LIST_WIDTH, -1);
|
DBL_WIDTH - DBL_LIST_WIDTH, -1);
|
||||||
|
|
||||||
/* now build the list */
|
/* now build the list */
|
||||||
browser_search (GIMP_BROWSER (browser->browser), 0, browser);
|
browser_search (GIMP_BROWSER (browser->browser), "", 0, browser);
|
||||||
|
|
||||||
gtk_widget_show (browser->dialog);
|
gtk_widget_show (browser->dialog);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user