diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2013-01-22 14:40:50 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2013-01-22 14:40:50 +0000 |
| commit | 34baadb48632ee5c2f39cba0411b7810265bdc6a (patch) | |
| tree | c7a76b25fd57605c40082d32644ff9a0da22d20e /src/dialogs/find.cpp | |
| parent | merge from trunk (r12005) (diff) | |
| parent | Filters. Add missing inkscape namespace declaration for 'Channel Painting' (diff) | |
| download | inkscape-34baadb48632ee5c2f39cba0411b7810265bdc6a.tar.gz inkscape-34baadb48632ee5c2f39cba0411b7810265bdc6a.zip | |
merge from trunk (r12051)
(bzr r11668.1.48)
Diffstat (limited to 'src/dialogs/find.cpp')
| -rw-r--r-- | src/dialogs/find.cpp | 150 |
1 files changed, 0 insertions, 150 deletions
diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp index 2810f065c..3fabe4d97 100644 --- a/src/dialogs/find.cpp +++ b/src/dialogs/find.cpp @@ -15,18 +15,6 @@ #include "widgets/icon.h" #include "message-stack.h" -//TODO : delete this -GtkWidget * sp_find_dialog_old (void); - -static void -//GtkWidget * -sp_find_dialog(){ - // DialogFind::get().present(); - sp_find_dialog_old (); - return; -} - - #include <gtk/gtk.h> #include <glibmm/i18n.h> @@ -684,144 +672,6 @@ sp_find_types () } -GtkWidget * -sp_find_dialog_old (void) -{ - if (!dlg) - { - gchar title[500]; - sp_ui_dialog_title_string (Inkscape::Verb::get(SP_VERB_DIALOG_FIND), title); - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - - dlg = sp_window_new (title, TRUE); - if (x == -1000 || y == -1000) { - x = prefs->getInt(prefs_path + "x", -1000); - y = prefs->getInt(prefs_path + "y", -1000); - } - if (w ==0 || h == 0) { - w = prefs->getInt(prefs_path + "w", 0); - h = prefs->getInt(prefs_path + "h", 0); - } - - prefs->setInt(prefs_path + "visible", 1); - -// if (x<0) x=0; -// if (y<0) y=0; - - if (w && h) - gtk_window_resize(GTK_WINDOW(dlg), w, h); - if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) { - gtk_window_move(GTK_WINDOW(dlg), x, y); - } else { - gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER); - } - - sp_transientize (dlg); - wd.win = dlg; - wd.stop = 0; - g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (sp_transientize_callback), &wd ); - - g_signal_connect ( G_OBJECT (dlg), "event", G_CALLBACK (sp_dialog_event_handler), dlg); - - g_signal_connect ( G_OBJECT (dlg), "destroy", G_CALLBACK (sp_find_dialog_destroy), NULL ); - g_signal_connect ( G_OBJECT (dlg), "delete_event", G_CALLBACK (sp_find_dialog_delete), dlg); - g_signal_connect ( G_OBJECT (INKSCAPE), "shut_down", G_CALLBACK (sp_find_dialog_delete), dlg); - - g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_hide", G_CALLBACK (sp_dialog_hide), dlg); - g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_unhide", G_CALLBACK (sp_dialog_unhide), dlg); - - gtk_container_set_border_width (GTK_CONTAINER (dlg), 4); - - /* Toplevel vbox */ -#if GTK_CHECK_VERSION(3,0,0) - GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - gtk_box_set_homogeneous(GTK_BOX(vb), FALSE); -#else - GtkWidget *vb = gtk_vbox_new (FALSE, 0); -#endif - gtk_container_add (GTK_CONTAINER (dlg), vb); - - sp_find_new_searchfield (dlg, vb, _("_Text:"), "text", _("Find objects by their text content (exact or partial match)")); - sp_find_new_searchfield (dlg, vb, _("_ID:"), "id", _("Find objects by the value of the id attribute (exact or partial match)")); - sp_find_new_searchfield (dlg, vb, _("_Style:"), "style", _("Find objects by the value of the style attribute (exact or partial match)")); - sp_find_new_searchfield (dlg, vb, _("_Attribute:"), "attr", _("Find objects by the name of an attribute (exact or partial match)")); - - gtk_widget_show_all (vb); - - GtkWidget *types = sp_find_types (); - g_object_set_data (G_OBJECT (dlg), "types", types); - gtk_box_pack_start (GTK_BOX (vb), types, FALSE, FALSE, 0); - - { -#if GTK_CHECK_VERSION(3,0,0) - GtkWidget *w = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); -#else - GtkWidget *w = gtk_hseparator_new (); -#endif - gtk_widget_show (w); - gtk_box_pack_start (GTK_BOX (vb), w, FALSE, FALSE, 3); - - { - GtkWidget *b = gtk_check_button_new_with_mnemonic (_("Search in s_election")); - gtk_widget_show (b); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(b), FALSE); - g_object_set_data (G_OBJECT (dlg), "inselection", b); - gtk_widget_set_tooltip_text (b, _("Limit search to the current selection")); - gtk_box_pack_start (GTK_BOX (vb), b, FALSE, FALSE, 0); - } - - { - GtkWidget *b = gtk_check_button_new_with_mnemonic (_("Search in current _layer")); - gtk_widget_show (b); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(b), FALSE); - g_object_set_data (G_OBJECT (dlg), "inlayer", b); - gtk_widget_set_tooltip_text (b, _("Limit search to the current layer")); - gtk_box_pack_start (GTK_BOX (vb), b, FALSE, FALSE, 0); - } - - { - GtkWidget *b = gtk_check_button_new_with_mnemonic (_("Include _hidden")); - gtk_widget_show (b); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(b), FALSE); - g_object_set_data (G_OBJECT (dlg), "includehidden", b); - gtk_widget_set_tooltip_text (b, _("Include hidden objects in search")); - gtk_box_pack_start (GTK_BOX (vb), b, FALSE, FALSE, 0); - } - - { - GtkWidget *b = gtk_check_button_new_with_mnemonic (_("Include l_ocked")); - gtk_widget_show (b); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(b), FALSE); - g_object_set_data (G_OBJECT (dlg), "includelocked", b); - gtk_widget_set_tooltip_text (b, _("Include locked objects in search")); - gtk_box_pack_start (GTK_BOX (vb), b, FALSE, FALSE, 0); - } - } - - { -#if GTK_CHECK_VERSION(3,0,0) - GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_set_homogeneous(GTK_BOX(hb), FALSE); -#else - GtkWidget *hb = gtk_hbox_new (FALSE, 0); -#endif - gtk_widget_show (hb); - gtk_box_pack_start (GTK_BOX (vb), hb, FALSE, FALSE, 0); - - // TRANSLATORS: "Clear" is a verb here - sp_find_new_button (dlg, hb, _("_Clear"), _("Clear values"), sp_find_dialog_reset); - sp_find_new_button (dlg, hb, _("_Find"), _("Select objects matching all of the fields you filled in"), sp_find_dialog_find); - } - } - - gtk_widget_show(GTK_WIDGET(dlg)); - gtk_window_present(GTK_WINDOW(dlg)); - sp_find_dialog_reset (NULL, G_OBJECT (dlg)); - - return dlg; -} - - /* Local Variables: mode:c++ |
