summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-07-20 20:31:16 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-07-20 20:31:16 +0000
commit6d2fbf56c321d0c019ee265692d58415f97c7396 (patch)
treeba2637f12374a68d3680daeea4be149851c8866b /src
parentremove redundant code from lpe dialog (diff)
downloadinkscape-6d2fbf56c321d0c019ee265692d58415f97c7396.tar.gz
inkscape-6d2fbf56c321d0c019ee265692d58415f97c7396.zip
noop: rename function name and whitespace
(bzr r6376)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/livepatheffect-editor.cpp68
-rw-r--r--src/ui/dialog/livepatheffect-editor.h2
2 files changed, 34 insertions, 36 deletions
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index 671b28010..f46a6bc95 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -66,7 +66,7 @@ static void lpeeditor_selection_modified (Inkscape::Selection * selection, guint
* LivePathEffectEditor
*/
-LivePathEffectEditor::LivePathEffectEditor()
+LivePathEffectEditor::LivePathEffectEditor()
: UI::Widget::Panel("", "dialogs.livepatheffect", SP_VERB_DIALOG_LIVE_PATH_EFFECT),
combo_effecttype(Inkscape::LivePathEffect::LPETypeConverter),
effectwidget(NULL),
@@ -108,18 +108,18 @@ LivePathEffectEditor::LivePathEffectEditor()
// button_hbox.pack_start(button_up, true, true);
// button_hbox.pack_start(button_down, true, true);
// button_hbox.pack_end(button_remove, true, true);
- toolbar.set_toolbar_style(Gtk::TOOLBAR_ICONS);
+ toolbar.set_toolbar_style(Gtk::TOOLBAR_ICONS);
// Add toolbar items to toolbar
- toolbar.append(button_up);
- toolbar.append(button_down);
- toolbar.append(button_remove);
+ toolbar.append(button_up);
+ toolbar.append(button_down);
+ toolbar.append(button_remove);
+
+
+ // Add toolbar
+ //add_toolbar(toolbar);
+ toolbar.show_all(); //Show the toolbar and all its child widgets.
-
- // Add toolbar
- //add_toolbar(toolbar);
- toolbar.show_all(); //Show the toolbar and all its child widgets.
-
//Create the Tree model:
effectlist_store = Gtk::ListStore::create(columns);
effectlist_view.set_model(effectlist_store);
@@ -151,7 +151,7 @@ LivePathEffectEditor::LivePathEffectEditor()
//button_remove.hide();
}
-LivePathEffectEditor::~LivePathEffectEditor()
+LivePathEffectEditor::~LivePathEffectEditor()
{
if (effectwidget) {
effectcontrol_vbox.remove(*effectwidget);
@@ -224,10 +224,10 @@ LivePathEffectEditor::onSelectionChanged(Inkscape::Selection *sel)
if ( SP_IS_LPE_ITEM(item) ) {
SPLPEItem *lpeitem = SP_LPE_ITEM(item);
- effect_list_update(lpeitem);
+ effect_list_reload(lpeitem);
current_lpeitem = lpeitem;
-
+
set_sensitize_all(true);
if ( sp_lpe_item_has_path_effect(lpeitem) ) {
Inkscape::LivePathEffect::Effect *lpe = sp_lpe_item_get_current_lpe(lpeitem);
@@ -240,9 +240,7 @@ LivePathEffectEditor::onSelectionChanged(Inkscape::Selection *sel)
showText(_("No effect applied"));
button_remove.set_sensitive(false);
}
- }
- else
- {
+ } else {
showText(_("Item is not a path or shape"));
set_sensitize_all(false);
}
@@ -256,11 +254,14 @@ LivePathEffectEditor::onSelectionChanged(Inkscape::Selection *sel)
}
}
+/*
+ * First clears the effectlist_store, then appends all effects from the effectlist.
+ */
void
-LivePathEffectEditor::effect_list_update(SPLPEItem *lpeitem)
+LivePathEffectEditor::effect_list_reload(SPLPEItem *lpeitem)
{
effectlist_store->clear();
-
+
PathEffectList effectlist = sp_lpe_item_get_effect_list(lpeitem);
PathEffectList::iterator it;
for( it = effectlist.begin() ; it!=effectlist.end(); it++ )
@@ -272,7 +273,7 @@ LivePathEffectEditor::effect_list_update(SPLPEItem *lpeitem)
}
-void
+void
LivePathEffectEditor::setDesktop(SPDesktop *desktop)
{
Panel::setDesktop(desktop);
@@ -345,46 +346,43 @@ LivePathEffectEditor::onRemove()
SPItem *item = sel->singleItem();
if ( item && SP_IS_LPE_ITEM(item) ) {
sp_lpe_item_remove_current_path_effect(SP_LPE_ITEM(item), false);
-
- sp_document_done ( sp_desktop_document (current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
+
+ sp_document_done ( sp_desktop_document (current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
_("Remove path effect") );
- effect_list_update(SP_LPE_ITEM(item));
+ effect_list_reload(SP_LPE_ITEM(item));
}
}
}
void LivePathEffectEditor::onUp()
{
- Inkscape::Selection *sel = _getSelection();
+ Inkscape::Selection *sel = _getSelection();
if ( sel && !sel->isEmpty() ) {
SPItem *item = sel->singleItem();
if ( item && SP_IS_LPE_ITEM(item) ) {
-
- sp_lpe_item_up_current_path_effect(SP_LPE_ITEM(item));
-
- sp_document_done ( sp_desktop_document (current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
+ sp_lpe_item_up_current_path_effect(SP_LPE_ITEM(item));
+
+ sp_document_done ( sp_desktop_document (current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
_("Move path effect up") );
- effect_list_update(SP_LPE_ITEM(item));
+ effect_list_reload(SP_LPE_ITEM(item));
}
}
-
}
void LivePathEffectEditor::onDown()
{
- Inkscape::Selection *sel = _getSelection();
+ Inkscape::Selection *sel = _getSelection();
if ( sel && !sel->isEmpty() ) {
SPItem *item = sel->singleItem();
if ( item && SP_IS_LPE_ITEM(item) ) {
-
- sp_lpe_item_down_current_path_effect(SP_LPE_ITEM(item));
-
- sp_document_done ( sp_desktop_document (current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
+ sp_lpe_item_down_current_path_effect(SP_LPE_ITEM(item));
+
+ sp_document_done ( sp_desktop_document (current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
_("Move path effect down") );
- effect_list_update(SP_LPE_ITEM(item));
+ effect_list_reload(SP_LPE_ITEM(item));
}
}
}
diff --git a/src/ui/dialog/livepatheffect-editor.h b/src/ui/dialog/livepatheffect-editor.h
index a1d4479ab..76ee9f09c 100644
--- a/src/ui/dialog/livepatheffect-editor.h
+++ b/src/ui/dialog/livepatheffect-editor.h
@@ -57,7 +57,7 @@ private:
void showText(Glib::ustring const &str);
// void add_entry(const char* name );
- void effect_list_update(SPLPEItem *lpeitem);
+ void effect_list_reload(SPLPEItem *lpeitem);
// callback methods for buttons on grids page.
void onApply();