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/ui/dialog | |
| 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/ui/dialog')
| -rw-r--r-- | src/ui/dialog/color-item.cpp | 57 | ||||
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 5 | ||||
| -rw-r--r-- | src/ui/dialog/guides.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 20 | ||||
| -rw-r--r-- | src/ui/dialog/input.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/layers.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/object-properties.cpp | 30 | ||||
| -rw-r--r-- | src/ui/dialog/object-properties.h | 1 | ||||
| -rw-r--r-- | src/ui/dialog/ocaldialogs.cpp | 15 | ||||
| -rw-r--r-- | src/ui/dialog/ocaldialogs.h | 13 | ||||
| -rw-r--r-- | src/ui/dialog/symbols.cpp | 4 |
11 files changed, 73 insertions, 80 deletions
diff --git a/src/ui/dialog/color-item.cpp b/src/ui/dialog/color-item.cpp index e370a0342..2ff4ed657 100644 --- a/src/ui/dialog/color-item.cpp +++ b/src/ui/dialog/color-item.cpp @@ -573,46 +573,21 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS lbl->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); widget = lbl; } else { -// Glib::ustring blank(" "); -// if ( size == Inkscape::ICON_SIZE_MENU || size == Inkscape::ICON_SIZE_DECORATION ) { -// blank = " "; -// } - GtkWidget* eekWidget = eek_preview_new(); EekPreview * preview = EEK_PREVIEW(eekWidget); Gtk::Widget* newBlot = Glib::wrap(eekWidget); - _regenPreview(preview); - eek_preview_set_details( preview, (::PreviewStyle)style, (::ViewType)view, (::PreviewSize)size, ratio, border ); + eek_preview_set_details( preview, + (::ViewType)view, + (::PreviewSize)size, + ratio, + border ); def.addCallback( _colorDefChanged, this ); - - GValue val = {0, {{0}, {0}}}; - g_value_init( &val, G_TYPE_BOOLEAN ); - g_value_set_boolean( &val, FALSE ); - g_object_set_property( G_OBJECT(preview), "focus-on-click", &val ); - -/* - Gtk::Button *btn = new Gtk::Button(blank); - Gdk::Color color; - color.set_rgb((_r << 8)|_r, (_g << 8)|_g, (_b << 8)|_b); - btn->modify_bg(Gtk::STATE_NORMAL, color); - btn->modify_bg(Gtk::STATE_ACTIVE, color); - btn->modify_bg(Gtk::STATE_PRELIGHT, color); - btn->modify_bg(Gtk::STATE_SELECTED, color); - - Gtk::Widget* newBlot = btn; -*/ - + eek_preview_set_focus_on_click(preview, FALSE); newBlot->set_tooltip_text(def.descr); -/* - newBlot->signal_clicked().connect( sigc::mem_fun(*this, &ColorItem::buttonClicked) ); - - sigc::signal<void> type_signal_something; -*/ - g_signal_connect( G_OBJECT(newBlot->gobj()), "clicked", G_CALLBACK(handleClick), @@ -674,26 +649,6 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS G_CALLBACK(handleLeaveNotify), this); -// g_signal_connect( G_OBJECT(newBlot->gobj()), -// "drag-drop", -// G_CALLBACK(dragDropColorData), -// this); - - if ( def.isEditable() ) - { -// gtk_drag_dest_set( GTK_WIDGET(newBlot->gobj()), -// GTK_DEST_DEFAULT_ALL, -// destColorTargets, -// G_N_ELEMENTS(destColorTargets), -// GdkDragAction(GDK_ACTION_COPY | GDK_ACTION_MOVE) ); - - -// g_signal_connect( G_OBJECT(newBlot->gobj()), -// "drag-data-received", -// G_CALLBACK(_dropDataIn), -// this ); - } - g_signal_connect( G_OBJECT(newBlot->gobj()), "destroy", G_CALLBACK(dieDieDie), diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 7574b9266..418132abb 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -1186,7 +1186,7 @@ void FilterEffectsDialog::FilterModifier::setTargetDesktop(SPDesktop *desktop) } // When the document changes, update connection to resources -void FilterEffectsDialog::FilterModifier::on_document_replaced(SPDesktop *desktop, SPDocument *document) +void FilterEffectsDialog::FilterModifier::on_document_replaced(SPDesktop * /*desktop*/, SPDocument *document) { if (_resource_changed) { _resource_changed.disconnect(); @@ -1201,6 +1201,7 @@ void FilterEffectsDialog::FilterModifier::on_change_selection() { Inkscape::Selection *selection = sp_desktop_selection (SP_ACTIVE_DESKTOP); update_selection(selection); + update_filters(); } void FilterEffectsDialog::FilterModifier::on_modified_selection( guint flags ) @@ -1685,7 +1686,7 @@ void FilterEffectsDialog::PrimitiveList::remove_selected() } #if !WITH_GTKMM_3_0 -bool FilterEffectsDialog::PrimitiveList::on_expose_signal(GdkEventExpose *e) +bool FilterEffectsDialog::PrimitiveList::on_expose_signal(GdkEventExpose * /*evt*/) { bool result = false; diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp index 1f02002ca..d8bbb5539 100644 --- a/src/ui/dialog/guides.cpp +++ b/src/ui/dialog/guides.cpp @@ -45,8 +45,8 @@ namespace Dialogs { GuidelinePropertiesDialog::GuidelinePropertiesDialog(SPGuide *guide, SPDesktop *desktop) : _desktop(desktop), _guide(guide), _relative_toggle(_("Rela_tive change"), _("Move and/or rotate the guide relative to current settings")), - _spin_button_x(_("_X:"), "", UNIT_TYPE_LINEAR, "", "", &_unit_menu), - _spin_button_y(_("_Y:"), "", UNIT_TYPE_LINEAR, "", "", &_unit_menu), + _spin_button_x(C_("Guides", "_X:"), "", UNIT_TYPE_LINEAR, "", "", &_unit_menu), + _spin_button_y(C_("Guides", "_Y:"), "", UNIT_TYPE_LINEAR, "", "", &_unit_menu), _label_entry(_("_Label:"), _("Optionally give this guideline a name")), _spin_angle(_("_Angle:"), "", UNIT_TYPE_RADIAL), _mode(true), _oldpos(0.,0.), _oldangle(0.0) diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 20e5d3ca6..d963e0c7f 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -320,6 +320,7 @@ void InkscapePreferences::initPageTools() AddSelcueCheckbox(_page_selector, "/tools/select", false); + AddGradientCheckbox(_page_selector, "/tools/select", false); _page_selector.add_group_header( _("When transforming, show")); _t_sel_trans_obj.init ( _("Objects"), "/tools/select/show", "content", true, 0); _page_selector.add_line( true, "", _t_sel_trans_obj, "", @@ -811,7 +812,7 @@ void InkscapePreferences::initPageIO() // Input devices options _mouse_sens.init ( "/options/cursortolerance/value", 0.0, 30.0, 1.0, 1.0, 8.0, true, false); - _page_mouse.add_line( false, _("_Grab sensitivity:"), _mouse_sens, _("pixels"), + _page_mouse.add_line( false, _("_Grab sensitivity:"), _mouse_sens, _("pixels (requires restart)"), _("How close on the screen you need to be to an object to be able to grab it with mouse (in screen pixels)"), false); _mouse_thres.init ( "/options/dragtolerance/value", 0.0, 20.0, 1.0, 1.0, 4.0, true, false); _page_mouse.add_line( false, _("_Click/drag threshold:"), _mouse_thres, _("pixels"), @@ -1096,6 +1097,9 @@ void InkscapePreferences::initPageBehavior() _sel_locked.init ( _("Ignore locked objects and layers"), "/options/kbselection/onlysensitive", true); _sel_layer_deselects.init ( _("Deselect upon layer change"), "/options/selection/layerdeselect", true); + _page_select.add_line( false, "", _sel_layer_deselects, "", + _("Uncheck this to be able to keep the current objects selected when the current layer changes")); + _page_select.add_group_header( _("Ctrl+A, Tab, Shift+Tab")); _page_select.add_line( true, "", _sel_all, "", _("Make keyboard selection commands work on objects in all layers")); @@ -1108,10 +1112,6 @@ void InkscapePreferences::initPageBehavior() _page_select.add_line( true, "", _sel_locked, "", _("Uncheck this to be able to select objects that are locked (either by themselves or by being in a locked layer)")); - _page_select.add_line( false, "", _sel_layer_deselects, "", - _("Uncheck this to be able to keep the current objects selected when the current layer changes")); - - _sel_cycle.init ( _("Wrap when cycling objects in z-order"), "/options/selection/cycleWrap", true); _page_select.add_group_header( _("Alt+Scroll Wheel")); @@ -1526,7 +1526,7 @@ void InkscapePreferences::onKBExport() sp_shortcut_file_export(); } -bool InkscapePreferences::onKBSearchKeyEvent(GdkEventKey *event) +bool InkscapePreferences::onKBSearchKeyEvent(GdkEventKey * /*event*/) { _kb_filter->refilter(); return FALSE; @@ -1651,7 +1651,7 @@ void InkscapePreferences::onKBListKeyboardShortcuts() } // Find this group in the tree - Glib::ustring group = verb->get_group() ? verb->get_group() : "Misc"; + Glib::ustring group = verb->get_group() ? _(verb->get_group()) : _("Misc"); Gtk::TreeStore::iterator iter_group; bool found = false; while (path) { @@ -1679,7 +1679,7 @@ void InkscapePreferences::onKBListKeyboardShortcuts() } // Remove the key accelerators from the verb name - Glib::ustring name = verb->get_name(); + Glib::ustring name = _(verb->get_name()); std::string::size_type k = 0; while((k=name.find('_',k))!=name.npos) { name.erase(k, 1); @@ -1698,9 +1698,9 @@ void InkscapePreferences::onKBListKeyboardShortcuts() } // Add the verb to the group Gtk::TreeStore::iterator row = _kb_store->append(iter_group->children()); - (*row)[_kb_columns.name] = name; + (*row)[_kb_columns.name] = name; (*row)[_kb_columns.shortcut] = shortcut_label; - (*row)[_kb_columns.description] = verb->get_short_tip() ? verb->get_short_tip() : ""; + (*row)[_kb_columns.description] = verb->get_short_tip() ? _(verb->get_short_tip()) : ""; (*row)[_kb_columns.shortcutid] = shortcut_id; (*row)[_kb_columns.id] = verb->get_id(); (*row)[_kb_columns.user_set] = sp_shortcut_is_user_set(verb); diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp index 6aff67f69..1df0d606e 100644 --- a/src/ui/dialog/input.cpp +++ b/src/ui/dialog/input.cpp @@ -999,7 +999,7 @@ InputDialogImpl::ConfPanel::ConfPanel() : titleLabel(""), axisFrame(_("Axes")), keysFrame(_("Keys")), - modeLabel(_("Mode")), + modeLabel(_("Mode:")), modeBox(false, 4) { diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp index 4f7b8f27c..fdc33b2a6 100644 --- a/src/ui/dialog/layers.cpp +++ b/src/ui/dialog/layers.cpp @@ -655,7 +655,7 @@ bool LayersPanel::_handleButtonEvent(GdkEventButton* event) * Drap and drop within the tree * Save the drag source and drop target SPObjects and if its a drag between layers or into (sublayer) a layer */ -bool LayersPanel::_handleDragDrop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time) +bool LayersPanel::_handleDragDrop(const Glib::RefPtr<Gdk::DragContext>& /*context*/, int x, int y, guint /*time*/) { int cell_x = 0, cell_y = 0; Gtk::TreeModel::Path target_path; diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp index f0801734a..0800346f7 100644 --- a/src/ui/dialog/object-properties.cpp +++ b/src/ui/dialog/object-properties.cpp @@ -69,15 +69,25 @@ ObjectProperties::ObjectProperties (void) : subselChangedConn() { //initialize labels for the table at the bottom of the dialog - int_labels.push_back("onclick"); - int_labels.push_back("onmouseover"); - int_labels.push_back("onmouseout"); - int_labels.push_back("onmousedown"); - int_labels.push_back("onmouseup"); - int_labels.push_back("onmousemove"); - int_labels.push_back("onfocusin"); - int_labels.push_back("onfocusout"); - int_labels.push_back("onload"); + int_attrs.push_back("onclick"); + int_attrs.push_back("onmouseover"); + int_attrs.push_back("onmouseout"); + int_attrs.push_back("onmousedown"); + int_attrs.push_back("onmouseup"); + int_attrs.push_back("onmousemove"); + int_attrs.push_back("onfocusin"); + int_attrs.push_back("onfocusout"); + int_attrs.push_back("onload"); + + int_labels.push_back("onclick:"); + int_labels.push_back("onmouseover:"); + int_labels.push_back("onmouseout:"); + int_labels.push_back("onmousedown:"); + int_labels.push_back("onmouseup:"); + int_labels.push_back("onmousemove:"); + int_labels.push_back("onfocusin:"); + int_labels.push_back("onfocusout:"); + int_labels.push_back("onload:"); desktopChangeConn = deskTrack.connectDesktopChanged( sigc::mem_fun(*this, &ObjectProperties::setTargetDesktop) ); deskTrack.connect(GTK_WIDGET(gobj())); @@ -291,7 +301,7 @@ void ObjectProperties::widget_setup(void) if (CurrentItem == NULL) { - attrTable.set_object(obj, int_labels, int_labels, (GtkWidget*)EInteractivity.gobj()); + attrTable.set_object(obj, int_labels, int_attrs, (GtkWidget*)EInteractivity.gobj()); } else { diff --git a/src/ui/dialog/object-properties.h b/src/ui/dialog/object-properties.h index 0bf622ce4..a04c62bec 100644 --- a/src/ui/dialog/object-properties.h +++ b/src/ui/dialog/object-properties.h @@ -67,6 +67,7 @@ public: private: bool blocked; SPItem *CurrentItem; //to store the current item, for not wasting resources + std::vector<Glib::ustring> int_attrs; std::vector<Glib::ustring> int_labels; Gtk::Table TopTable; //the table with the object properties diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp index 82bc85099..09ce59e9c 100644 --- a/src/ui/dialog/ocaldialogs.cpp +++ b/src/ui/dialog/ocaldialogs.cpp @@ -324,7 +324,11 @@ bool LoadingBox::_on_expose_event(GdkEventExpose* /*event*/) } #endif -bool LoadingBox::_on_draw(const Cairo::RefPtr<Cairo::Context>& cr) +bool LoadingBox::_on_draw(const Cairo::RefPtr<Cairo::Context> & +#if WITH_GTKMM_3_0 +cr +#endif +) { // Draw shadow int x = get_allocation().get_x(); @@ -561,6 +565,7 @@ void StatusWidget::end_process() clear(); } +#if !GTK_CHECK_VERSION(3,6,0) SearchEntry::SearchEntry() : Gtk::Entry() { signal_changed().connect(sigc::mem_fun(*this, &SearchEntry::_on_changed)); @@ -589,6 +594,8 @@ void SearchEntry::_on_changed() set_icon_from_stock(Gtk::Stock::CLEAR, Gtk::ENTRY_ICON_SECONDARY); } } +#endif + BaseBox::BaseBox() : Gtk::EventBox() { @@ -1208,7 +1215,13 @@ ImportDialog::ImportDialog(Gtk::Window& parent_window, FileDialogType file_types BaseBox *basebox_no_search_results = new BaseBox(); label_not_found = new Gtk::Label(); label_description = new Gtk::Label(); + +#if GTK_CHECK_VERSION(3,6,0) + entry_search = new Gtk::SearchEntry(); +#else entry_search = new SearchEntry(); +#endif + button_search = new Gtk::Button(_("Search")); #if WITH_GTKMM_3_0 diff --git a/src/ui/dialog/ocaldialogs.h b/src/ui/dialog/ocaldialogs.h index 1cdfa15bb..326542579 100644 --- a/src/ui/dialog/ocaldialogs.h +++ b/src/ui/dialog/ocaldialogs.h @@ -21,6 +21,11 @@ #include <gtkmm/listviewtext.h> #include <gtkmm/scrolledwindow.h> #include <gtkmm/window.h> + +#if GTK_CHECK_VERSION(3,6,0) +# include <gtkmm/searchentry.h> +#endif + #include <giomm/file.h> //Inkscape includes @@ -328,6 +333,7 @@ public: Gtk::Label* label; }; +#if !GTK_CHECK_VERSION(3,6,0) /** * A Gtk::Entry with search & clear icons */ @@ -340,6 +346,7 @@ private: void _on_icon_pressed(Gtk::EntryIconPosition icon_position, const GdkEventButton* event); void _on_changed(); }; +#endif /** * A box which paints an overlay of the OCAL logo @@ -449,7 +456,13 @@ protected: private: Glib::ustring filename_image; Glib::ustring filename_thumbnail; + +#if GTK_CHECK_VERSION(3,6,0) + Gtk::SearchEntry *entry_search; +#else SearchEntry *entry_search; +#endif + LogoArea *drawingarea_logo; SearchResultList *list_results; PreviewWidget *preview_files; diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp index 3188f1681..71674368b 100644 --- a/src/ui/dialog/symbols.cpp +++ b/src/ui/dialog/symbols.cpp @@ -231,8 +231,8 @@ void SymbolsDialog::rebuild() { draw_symbols( symbolDocument ); } -void SymbolsDialog::iconDragDataGet(const Glib::RefPtr<Gdk::DragContext>& context, Gtk::SelectionData& data, guint info, guint time) { - +void SymbolsDialog::iconDragDataGet(const Glib::RefPtr<Gdk::DragContext>& /*context*/, Gtk::SelectionData& data, guint /*info*/, guint /*time*/) +{ #if WITH_GTKMM_3_0 std::vector<Gtk::TreePath> iconArray = iconView->get_selected_items(); #else |
