diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-08-04 02:20:42 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-08-04 02:20:42 +0000 |
| commit | 8d2e0c37027b55156c81a7733f35338409e37a00 (patch) | |
| tree | 6ff98fb6be091b7efb291ee6e21c8b0942ca28ac /src/widgets/stroke-marker-selector.h | |
| parent | Fix for 1032880 : Stroke style panel is mirrored between open windows (diff) | |
| download | inkscape-8d2e0c37027b55156c81a7733f35338409e37a00.tar.gz inkscape-8d2e0c37027b55156c81a7733f35338409e37a00.zip | |
Fix for 1030239 : Custom markers only added to the list in Stroke Style after reloading the file
(bzr r11588)
Diffstat (limited to 'src/widgets/stroke-marker-selector.h')
| -rw-r--r-- | src/widgets/stroke-marker-selector.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/widgets/stroke-marker-selector.h b/src/widgets/stroke-marker-selector.h index 4365b7e2a..42d5a7e27 100644 --- a/src/widgets/stroke-marker-selector.h +++ b/src/widgets/stroke-marker-selector.h @@ -16,6 +16,7 @@ #include <sigc++/signal.h> +#include "desktop.h" #include "document.h" #include "inkscape.h" #include "display/drawing.h" @@ -34,11 +35,13 @@ public: MarkerComboBox(gchar const *id); ~MarkerComboBox(); + void setDesktop(SPDesktop *desktop); + sigc::signal<void> changed_signal; void set_current(SPObject *marker); void set_active_history(); - void set_selected(const gchar *name); + void set_selected(const gchar *name, gboolean retry=true); const gchar *get_active_marker_uri(); bool update() { return updating; }; gchar const *get_id() { return combo_id; }; @@ -48,7 +51,6 @@ private: Glib::RefPtr<Gtk::ListStore> marker_store; gchar const *combo_id; bool updating; - bool is_history; SPDesktop *desktop; SPDocument *doc; SPDocument *sandbox; @@ -60,22 +62,23 @@ private: public: Gtk::TreeModelColumn<Glib::ustring> label; Gtk::TreeModelColumn<const gchar *> marker; // ustring doesnt work here on windows due to unicode - Gtk::TreeModelColumn<bool> isstock; + Gtk::TreeModelColumn<gboolean> stock; Gtk::TreeModelColumn<Gtk::Image *> image; - Gtk::TreeModelColumn<bool> history; - Gtk::TreeModelColumn<bool> isseparator; + Gtk::TreeModelColumn<gboolean> history; + Gtk::TreeModelColumn<gboolean> separator; MarkerColumns() { - add(label); add(marker); add(isstock); add(image); add(history); add(isseparator); + add(label); add(stock); add(marker); add(history); add(separator); add(image); } }; MarkerColumns marker_columns; void init_combo(); void set_history(Gtk::TreeModel::Row match_row); - void sp_marker_list_from_doc(SPDocument *source); + void sp_marker_list_from_doc(SPDocument *source, gboolean history); GSList *get_marker_list (SPDocument *source); - void add_markers (GSList *marker_list, SPDocument *source); + void add_markers (GSList *marker_list, SPDocument *source, gboolean history); + void remove_markers (gboolean history); SPDocument *ink_markers_preview_doc (); Gtk::Image * create_marker_image(unsigned psize, gchar const *mname, SPDocument *source, Inkscape::Drawing &drawing, unsigned /*visionkey*/); @@ -87,7 +90,10 @@ private: void prepareImageRenderer( Gtk::TreeModel::const_iterator const &row ); static gboolean separator_cb (GtkTreeModel *model, GtkTreeIter *iter, gpointer data); + static void handleDefsModified(MarkerComboBox *self); + void refreshHistory(); + sigc::connection modified_connection; }; #endif // SEEN_SP_MARKER_SELECTOR_NEW_H |
