diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2013-03-19 02:26:40 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2013-03-19 02:26:40 +0000 |
| commit | 5c8a7b8df6203791610487d2435646f86a0eed96 (patch) | |
| tree | 3bf6c7a52f27978f84b267482bb69389051c4085 /src/ui | |
| parent | changes_2013_03_18c.patch (diff) | |
| parent | Drop remaining unused functions (diff) | |
| download | inkscape-5c8a7b8df6203791610487d2435646f86a0eed96.tar.gz inkscape-5c8a7b8df6203791610487d2435646f86a0eed96.zip | |
merge from trunk (r12224)
(bzr r11668.1.60)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/control-manager.cpp | 15 | ||||
| -rw-r--r-- | src/ui/dialog/dialog-manager.cpp | 7 | ||||
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/export.cpp | 14 | ||||
| -rw-r--r-- | src/ui/dialog/export.h | 11 | ||||
| -rw-r--r-- | src/ui/dialog/filedialogimpl-gtkmm.cpp | 8 | ||||
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/svg-fonts-dialog.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 3 | ||||
| -rw-r--r-- | src/ui/tool/multi-path-manipulator.cpp | 1 | ||||
| -rw-r--r-- | src/ui/widget/layer-selector.cpp | 11 | ||||
| -rw-r--r-- | src/ui/widget/licensor.cpp | 3 |
12 files changed, 21 insertions, 62 deletions
diff --git a/src/ui/control-manager.cpp b/src/ui/control-manager.cpp index b14f27b8b..62e6ce3a3 100644 --- a/src/ui/control-manager.cpp +++ b/src/ui/control-manager.cpp @@ -31,29 +31,18 @@ namespace { std::map<Inkscape::ControlType, std::vector<int> > sizeTable; // Note: The following operator overloads are local to this file at the moment to discourage flag manipulation elsewhere. - +/* ControlFlags operator |(ControlFlags lhs, ControlFlags rhs) { return static_cast<ControlFlags>(static_cast<int>(lhs) | static_cast<int>(rhs)); } - -ControlFlags& operator |=(ControlFlags &lhs, ControlFlags rhs) -{ - lhs = lhs | rhs; - return lhs; -} +*/ ControlFlags operator &(ControlFlags lhs, ControlFlags rhs) { return static_cast<ControlFlags>(static_cast<int>(lhs) & static_cast<int>(rhs)); } -ControlFlags& operator &=(ControlFlags &lhs, ControlFlags rhs) -{ - lhs = lhs & rhs; - return lhs; -} - ControlFlags operator ^(ControlFlags lhs, ControlFlags rhs) { return static_cast<ControlFlags>(static_cast<int>(lhs) ^ static_cast<int>(rhs)); diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index faba47769..993f48d8f 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -53,10 +53,7 @@ #include "ui/dialog/export.h" #include "ui/dialog/xml-tree.h" #include "ui/dialog/clonetiler.h" - -#ifdef ENABLE_SVG_FONTS #include "ui/dialog/svg-fonts-dialog.h" -#endif // ENABLE_SVG_FONTS namespace Inkscape { namespace UI { @@ -118,9 +115,7 @@ DialogManager::DialogManager() { registerFactory("ObjectProperties", &create<ObjectProperties, FloatingBehavior>); // registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, FloatingBehavior>); registerFactory("Script", &create<ScriptDialog, FloatingBehavior>); -#ifdef ENABLE_SVG_FONTS registerFactory("SvgFontsDialog", &create<SvgFontsDialog, FloatingBehavior>); -#endif registerFactory("Swatches", &create<SwatchesPanel, FloatingBehavior>); registerFactory("Symbols", &create<SymbolsDialog, FloatingBehavior>); registerFactory("TileDialog", &create<TileDialog, FloatingBehavior>); @@ -154,9 +149,7 @@ DialogManager::DialogManager() { registerFactory("ObjectProperties", &create<ObjectProperties, DockBehavior>); // registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, DockBehavior>); registerFactory("Script", &create<ScriptDialog, DockBehavior>); -#ifdef ENABLE_SVG_FONTS registerFactory("SvgFontsDialog", &create<SvgFontsDialog, DockBehavior>); -#endif registerFactory("Swatches", &create<SwatchesPanel, DockBehavior>); registerFactory("Symbols", &create<SymbolsDialog, DockBehavior>); registerFactory("TileDialog", &create<TileDialog, DockBehavior>); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 045b34814..d335fb303 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -792,8 +792,6 @@ void DocumentProperties::build_scripting() _page_external_scripts->table().attach(_external_remove_btn, 2, 3, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 0, 0); #endif - row++; - //# Set up the External Scripts box _ExternalScriptsListStore = Gtk::ListStore::create(_ExternalScriptsListColumns); _ExternalScriptsList.set_model(_ExternalScriptsListStore); diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index 66c9e6ed0..99a8c08d2 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -133,6 +133,15 @@ namespace Inkscape { namespace UI { namespace Dialog { +/** A list of strings that is used both in the preferences, and in the + data fields to describe the various values of \c selection_type. */ +static const char * selection_names[SELECTION_NUMBER_OF] = { + "page", "drawing", "selection", "custom"}; + +/** The names on the buttons for the various selection types. */ +static const char * selection_labels[SELECTION_NUMBER_OF] = { + N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")}; + Export::Export (void) : UI::Widget::Panel ("", "/dialogs/export/", SP_VERB_DIALOG_EXPORT), current_key(SELECTION_PAGE), @@ -419,7 +428,6 @@ void Export::set_default_filename () { if ( SP_ACTIVE_DOCUMENT && SP_ACTIVE_DOCUMENT->getURI() ) { - gchar *name; SPDocument * doc = SP_ACTIVE_DOCUMENT; const gchar *uri = doc->getURI(); const gchar *text_extension = get_file_save_extension (Inkscape::Extension::FILE_SAVE_METHOD_SAVE_AS).c_str(); @@ -448,7 +456,7 @@ void Export::set_default_filename () { g_free(uri_copy); } } else { - name = g_strconcat(uri, ".png", NULL); + gchar *name = g_strconcat(uri, ".png", NULL); filename_entry.set_text(name); filename_entry.set_position(strlen(name)); @@ -1317,7 +1325,7 @@ void Export::onBrowse () WCHAR _filename[_MAX_PATH + 1]; memset(_filename, 0, sizeof(_filename)); gunichar2* utf16_path_string = g_utf8_to_utf16(filename.c_str(), -1, NULL, NULL, NULL); - wcsncpy(_filename, (wchar_t*)utf16_path_string, _MAX_PATH); + wcsncpy(_filename, reinterpret_cast<wchar_t*>(utf16_path_string), _MAX_PATH); g_free(utf16_path_string); opf.hwndOwner = (HWND)(GDK_WINDOW_HWND(gtk_widget_get_window(GTK_WIDGET(this)))); diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h index 202443a78..b10c98fd2 100644 --- a/src/ui/dialog/export.h +++ b/src/ui/dialog/export.h @@ -35,7 +35,6 @@ namespace Inkscape { namespace UI { namespace Dialog { - /** What type of button is being pressed */ enum selection_type { SELECTION_PAGE = 0, /**< Export the whole page */ @@ -45,16 +44,6 @@ enum selection_type { SELECTION_NUMBER_OF /**< A counter for the number of these guys */ }; -/** A list of strings that is used both in the preferences, and in the - data fields to describe the various values of \c selection_type. */ -static const char * selection_names[SELECTION_NUMBER_OF] = { - "page", "drawing", "selection", "custom"}; - -/** The names on the buttons for the various selection types. */ -static const char * selection_labels[SELECTION_NUMBER_OF] = { - N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")}; - - /** * A dialog widget to export to various image formats such as bitmap and png. * diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp index 75f80ed4a..cb6d92799 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.cpp +++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp @@ -1068,7 +1068,7 @@ FileSaveDialogImplGtk::FileSaveDialogImplGtk( Gtk::Window &parentWindow, std::vector<Gtk::Entry *> entries; findEntryWidgets(cont, entries); //g_message("Found %d entry widgets\n", entries.size()); - if (entries.size() >=1 ) + if (!entries.empty()) { //Catch when user hits [return] on the text field fileNameEntry = entries[0]; @@ -1080,7 +1080,7 @@ FileSaveDialogImplGtk::FileSaveDialogImplGtk( Gtk::Window &parentWindow, std::vector<Gtk::Expander *> expanders; findExpanderWidgets(cont, expanders); //g_message("Found %d expander widgets\n", expanders.size()); - if (expanders.size() >=1 ) + if (!expanders.empty()) { //Always show the file list Gtk::Expander *expander = expanders[0]; @@ -1639,7 +1639,7 @@ FileExportDialogImpl::FileExportDialogImpl( Gtk::Window& parentWindow, std::vector<Gtk::Entry *> entries; findEntryWidgets(cont, entries); //g_message("Found %d entry widgets\n", entries.size()); - if (entries.size() >=1 ) + if (!entries.empty()) { //Catch when user hits [return] on the text field fileNameEntry = entries[0]; @@ -1651,7 +1651,7 @@ FileExportDialogImpl::FileExportDialogImpl( Gtk::Window& parentWindow, std::vector<Gtk::Expander *> expanders; findExpanderWidgets(cont, expanders); //g_message("Found %d expander widgets\n", expanders.size()); - if (expanders.size() >=1 ) + if (!expanders.empty()) { //Always show the file list Gtk::Expander *expander = expanders[0]; diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 989c40264..5afc85f10 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -945,13 +945,11 @@ private: and all widgets within the setting group are aligned automatically. */ void add_widget(Gtk::Widget* w, const Glib::ustring& label) { - Gtk::Label *lbl = 0; Gtk::HBox *hb = Gtk::manage(new Gtk::HBox); hb->set_spacing(12); if(label != "") { - //lbl = Gtk::manage(new Gtk::Label(label + (label == "" ? "" : ":"), Gtk::ALIGN_LEFT)); colon now in label (LP #358921) - lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_START)); + Gtk::Label *lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_START)); hb->pack_start(*lbl, false, false); _size_group->add_widget(*lbl); lbl->show(); diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index 0da39dd73..bce63093d 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -15,8 +15,6 @@ # include <config.h> #endif -#ifdef ENABLE_SVG_FONTS - #include "svg-fonts-dialog.h" #include "document-private.h" #include "document-undo.h" @@ -945,8 +943,6 @@ SvgFontsDialog::~SvgFontsDialog(){} } // namespace UI } // namespace Inkscape -#endif //#ifdef ENABLE_SVG_FONTS - /* Local Variables: mode:c++ diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 67c6578f9..c87e94fc6 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -424,12 +424,11 @@ void TextEdit::onSelectionChange() void TextEdit::updateObjectText ( SPItem *text ) { GtkTextIter start, end; - gchar *str; // write text if (gtk_text_buffer_get_modified (text_buffer)) { gtk_text_buffer_get_bounds (text_buffer, &start, &end); - str = gtk_text_buffer_get_text (text_buffer, &start, &end, TRUE); + gchar *str = gtk_text_buffer_get_text (text_buffer, &start, &end, TRUE); sp_te_set_repr_text_multiline (text, str); g_free (str); gtk_text_buffer_set_modified (text_buffer, FALSE); diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp index 1f074c8da..629608242 100644 --- a/src/ui/tool/multi-path-manipulator.cpp +++ b/src/ui/tool/multi-path-manipulator.cpp @@ -65,7 +65,6 @@ typedef std::pair<double, IterPair> DistanceMapItem; void find_join_iterators(ControlPointSelection &sel, IterPairList &pairs) { IterSet join_iters; - DistanceMap dists; // find all endnodes in selection for (ControlPointSelection::iterator i = sel.begin(); i != sel.end(); ++i) { diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp index fbb9c0e24..7b1a8dbfb 100644 --- a/src/ui/widget/layer-selector.cpp +++ b/src/ui/widget/layer-selector.cpp @@ -163,17 +163,6 @@ LayerSelector::~LayerSelector() { _selection_changed_connection.disconnect(); } -namespace { - -/** Helper function - detaches desktop from selector - */ -bool detach(LayerSelector *selector) { - selector->setDesktop(NULL); - return FALSE; -} - -} - /** Sets the desktop for the widget. First disconnects signals * for the current desktop, then stores the pointer to the * given \a desktop, and attaches its signals to this one. diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp index 8ecd36af2..c729354cb 100644 --- a/src/ui/widget/licensor.cpp +++ b/src/ui/widget/licensor.cpp @@ -79,7 +79,8 @@ void LicenseItem::on_toggled() //--------------------------------------------------- Licensor::Licensor() -: Gtk::VBox(false,4) +: Gtk::VBox(false,4), + _eentry (NULL) { } |
