find.cpp revision 8654cf238ccb1e76b83e17366628a163d6ddcc65
/**
* @file
* Find dialog.
*/
/* Authors:
* bulia byak <bulia@users.sf.net>
* Jon A. Cruz <jon@joncruz.org>
* Abhishek Sharma
*
* Copyright (C) 2004 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "message-stack.h"
#include "macros.h"
#include "inkscape.h"
#include "document.h"
#include "desktop.h"
#include "selection.h"
#include "desktop-handles.h"
#include "dialog-events.h"
#include "../preferences.h"
#include "../verbs.h"
#include "../interface.h"
#include "../sp-text.h"
#include "../sp-flowtext.h"
#include "../text-editing.h"
#include "../sp-tspan.h"
#include "../sp-tref.h"
#include "../selection-chemistry.h"
#include "../sp-defs.h"
#include "../sp-rect.h"
#include "../sp-ellipse.h"
#include "../sp-star.h"
#include "../sp-spiral.h"
#include "../sp-path.h"
#include "../sp-line.h"
#include "../sp-polyline.h"
#include "../sp-item-group.h"
#include "../sp-use.h"
#include "../sp-image.h"
#include "../sp-offset.h"
#include "sp-root.h"
#define MIN_ONSCREEN_DISTANCE 50
// impossible original values to make sure they are read from prefs
static void
{
#if GTK_CHECK_VERSION(3,0,0)
#else
gtk_widget_size_request(dlg, &r);
#endif
}
static bool
{
return false;
}
return false;
}
return false;
}
if (exact) {
} else {
// g_print ("strstr: %s %s: %s\n", item_id, id, strstr(item_id, id) != NULL? "yes":"no");
}
}
static bool
{
return false;
}
return false;
bool ret;
if (exact) {
} else {
//FIXME: strcasestr
}
return ret;
}
return false;
}
static bool
{
return false;
}
return false;
}
if (exact) {
} else {
}
}
static bool
{
bool result = false;
if (exact) {
} else {
}
}
return result;
}
static GSList *
filter_onefield (GSList *l, GObject *dlg, const gchar *field, bool (*match_function)(SPItem *, const gchar *, bool), bool exact)
{
n = g_slist_prepend (n, i->data);
}
}
return n;
} else {
return l;
}
return NULL;
}
static bool
{
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (widget), data)));
}
static bool
{
if (SP_IS_RECT(item)) {
} else if (SP_IS_GENERICELLIPSE(item) || SP_IS_ELLIPSE(item) || SP_IS_ARC(item) || SP_IS_CIRCLE(item)) {
} else if (SP_IS_SPIRAL(item)) {
} else if (SP_IS_IMAGE(item)) {
} else if (SP_IS_OFFSET(item)) {
}
return false;
}
static GSList *
{
return l;
n = g_slist_prepend (n, i->data);
}
}
return n;
}
static GSList *
{
return l;
}
static GSList *
{
if (SP_IS_DEFS(r)) {
return l; // we're not interested in items in defs
}
return l; // we're not interested in metadata
}
l = g_slist_prepend (l, child);
}
}
}
return l;
}
static GSList *
all_selection_items (Inkscape::Selection *s, GSList *l, SPObject *ancestor, bool hidden, bool locked)
{
l = g_slist_prepend (l, i->data);
}
}
}
}
}
return l;
}
static void
{
bool hidden = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (dlg), "includehidden")));
bool locked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (dlg), "includelocked")));
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (dlg), "inselection")))) {
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (dlg), "inlayer")))) {
} else {
}
} else {
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (dlg), "inlayer")))) {
} else {
}
}
bool exact = true;
if (n == NULL) {
exact = false;
}
if (n != NULL) {
int count = g_slist_length (n);
// TRANSLATORS: "%s" is replaced with "exact" or "partial" when this string is displayed
ngettext("<b>%d</b> object found (out of <b>%d</b>), %s match.",
"<b>%d</b> objects found (out of <b>%d</b>), %s match.",
count),
} else {
}
}
static void
{
}
#define FIND_LABELWIDTH 80
static void
{
if (gtk_toggle_button_get_active (tb)) {
} else {
// excplicit toggle to make sure its handler gets called, no matter what was the original state
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "shapes")), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "paths")), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "texts")), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "groups")), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "clones")), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "images")), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "offsets")), TRUE);
}
}
static void
{
if (gtk_toggle_button_get_active (tb)) {
} else {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "rects")), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "ellipses")), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "stars")), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (data), "spirals")), FALSE);
}
}
static GtkWidget *
{
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
{
gtk_widget_show (b);
if (toggled)
}
return hb;
}
static GtkWidget *
{
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
{ // empty label for indent
gtk_widget_show (l);
}
return hb;
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :