summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/find.cpp
diff options
context:
space:
mode:
authorgustav_b <gustav_b@users.sourceforge.net>2007-11-22 00:14:41 +0000
committergustav_b <gustav_b@users.sourceforge.net>2007-11-22 00:14:41 +0000
commit5caa6ff4dfb7b538555d60fa2732272bf8b9828b (patch)
tree65c6fb0232f8621fa6cecdcdf68d0790bd955777 /src/ui/dialog/find.cpp
parentFix ordering of LPE parameters (no longer use map, just use vector) (diff)
downloadinkscape-5caa6ff4dfb7b538555d60fa2732272bf8b9828b.tar.gz
inkscape-5caa6ff4dfb7b538555d60fa2732272bf8b9828b.zip
The dialog to panel refactoring:
* Made the current dialogs subclass the Panel class instead of the Dialog class. * Extended the Panel class with some functionality that the dialogs relied on. * Added a PanelDialog class which is a dialog container for a single panel with the dialog behavior as a template parameter. (* Fixed coding style for the Panel and Dialog class) For details, see http://www.nabble.com/Re%3A-Dockable-dialogs%2C-todo-list-p12728194.html http://www.nabble.com/Re%3A-Inkscape-overcomes-Xara-in-Google-Trends-p13126622.html (bzr r4126)
Diffstat (limited to 'src/ui/dialog/find.cpp')
-rw-r--r--src/ui/dialog/find.cpp61
1 files changed, 30 insertions, 31 deletions
diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp
index 0a0538c30..cfc1bfeb2 100644
--- a/src/ui/dialog/find.cpp
+++ b/src/ui/dialog/find.cpp
@@ -56,8 +56,8 @@ namespace Inkscape {
namespace UI {
namespace Dialog {
-Find::Find(Behavior::BehaviorFactory behavior_factory)
- : Dialog (behavior_factory, "dialogs.find", SP_VERB_DIALOG_FIND),
+Find::Find()
+ : UI::Widget::Panel("", "dialogs.find", SP_VERB_DIALOG_FIND),
_entry_text(_("_Text: "), _("Find objects by their text content (exact or partial match)")),
_entry_id(_("_ID: "), _("Find objects by the value of the id attribute (exact or partial match)")),
_entry_style(_("_Style: "), _("Find objects by the value of the style attribute (exact or partial match)")),
@@ -83,35 +83,34 @@ Find::Find(Behavior::BehaviorFactory behavior_factory)
_button_clear(_("_Clear"), _("Clear values")),
_button_find(_("_Find"), _("Select objects matching all of the fields you filled in"))
{
- // Top level vbox
- Gtk::VBox *vbox = get_vbox();
- vbox->set_spacing(4);
+ Gtk::Box *contents = _getContents();
+ contents->set_spacing(4);
- vbox->pack_start(_entry_text, true, true);
- vbox->pack_start(_entry_id, true, true);
- vbox->pack_start(_entry_style, true, true);
- vbox->pack_start(_entry_attribute, true, true);
-
- vbox->pack_start(_check_all, true, true);
- vbox->pack_start(_check_all_shapes, true, true);
- vbox->pack_start(_check_rects, true, true);
- vbox->pack_start(_check_ellipses, true, true);
- vbox->pack_start(_check_stars, true, true);
- vbox->pack_start(_check_spirals, true, true);
- vbox->pack_start(_check_paths, true, true);
- vbox->pack_start(_check_texts, true, true);
- vbox->pack_start(_check_groups, true, true);
- vbox->pack_start(_check_clones, true, true);
- vbox->pack_start(_check_images, true, true);
- vbox->pack_start(_check_offsets, true, true);
-
- vbox->pack_start(_check_search_selection, true, true);
- vbox->pack_start(_check_search_layer, true, true);
- vbox->pack_start(_check_include_hidden, true, true);
- vbox->pack_start(_check_include_locked, true, true);
-
- vbox->pack_start(_button_clear, true, true);
- vbox->pack_start(_button_find, true, true);
+ contents->pack_start(_entry_text, true, true);
+ contents->pack_start(_entry_id, true, true);
+ contents->pack_start(_entry_style, true, true);
+ contents->pack_start(_entry_attribute, true, true);
+
+ contents->pack_start(_check_all, true, true);
+ contents->pack_start(_check_all_shapes, true, true);
+ contents->pack_start(_check_rects, true, true);
+ contents->pack_start(_check_ellipses, true, true);
+ contents->pack_start(_check_stars, true, true);
+ contents->pack_start(_check_spirals, true, true);
+ contents->pack_start(_check_paths, true, true);
+ contents->pack_start(_check_texts, true, true);
+ contents->pack_start(_check_groups, true, true);
+ contents->pack_start(_check_clones, true, true);
+ contents->pack_start(_check_images, true, true);
+ contents->pack_start(_check_offsets, true, true);
+
+ contents->pack_start(_check_search_selection, true, true);
+ contents->pack_start(_check_search_layer, true, true);
+ contents->pack_start(_check_include_hidden, true, true);
+ contents->pack_start(_check_include_locked, true, true);
+
+ contents->pack_start(_button_clear, true, true);
+ contents->pack_start(_button_find, true, true);
// set signals to handle clicks
_check_all.signal_clicked().connect(sigc::mem_fun(*this, &Find::onToggleAlltypes));
@@ -120,7 +119,7 @@ Find::Find(Behavior::BehaviorFactory behavior_factory)
_button_find.signal_clicked().connect(sigc::mem_fun(*this, &Find::onFind));
_button_find.set_flags(Gtk::CAN_DEFAULT);
- set_default (_button_find); // activatable by Enter
+ // set_default (_button_find); // activatable by Enter
_entry_text.getEntry()->grab_focus();
show_all_children();