#include "dialog_gradient.h"
#include "dialog_color.h"
#include "toolbox.h"
-#include "compview.h"
#include "onemoment.h"
#include "dockmanager.h"
toolbox->hide();
-// studio::App::iteration(false);
-
delete toolbox;
-// studio::App::iteration(false);
-
-// studio::App::iteration(false);
-
delete dialog_setup;
delete dialog_gradient;
delete dock_manager;
instance_list.clear();
-
-// studio::App::iteration(false);
}
String
}
return false;
-#else
+#else // not USE_WIN32_FILE_DIALOGS
synfig::String prev_path;
if(!_preferences.get_value(preference, prev_path))
delete dialog;
return false;
-
- /*
-
- GtkWidget *ok;
- GtkWidget *cancel;
- int val=0;
-
- GtkWidget *fileselection;
- fileselection = gtk_file_selection_new(title.c_str());
-
-
- if(basename(filename)==filename)
- {
- gtk_file_selection_set_filename(GTK_FILE_SELECTION(fileselection),(prev_path+ETL_DIRECTORY_SEPARATOR).c_str());
- }
- else
- gtk_file_selection_set_filename(GTK_FILE_SELECTION(fileselection),dirname(filename).c_str());
-
- gtk_file_selection_complete(GTK_FILE_SELECTION(fileselection),basename(filename).c_str());
-
- ok=GTK_FILE_SELECTION(fileselection)->ok_button;
- cancel=GTK_FILE_SELECTION(fileselection)->cancel_button;
-
- gtk_signal_connect(GTK_OBJECT(ok),"clicked",GTK_SIGNAL_FUNC(Signal_Open_Ok),&val);
- gtk_signal_connect(GTK_OBJECT(cancel),"clicked",GTK_SIGNAL_FUNC(Signal_Open_Cancel),&val);
-
- gtk_widget_show(fileselection);
-
- while(!val)
- iteration();
-
-
- if(val==1)
- {
- filename=gtk_file_selection_get_filename(GTK_FILE_SELECTION(fileselection));
- _preferences.set_value(preference,dirname(filename));
- }
- else
- {
- gtk_widget_destroy(fileselection);
- return false;
- }
- gtk_widget_destroy(fileselection);
- return true;
- */
-#endif
+#endif // not USE_WIN32_FILE_DIALOGS
}
bool
auto_backup_connect.disconnect();
if(timeout)
auto_backup_connect=Glib::signal_timeout().connect(sigc::ptr_fun(&AutoRecover::auto_backup),timeout);
-// auto_backup_connect=App::main.get_context()->signal_timeout().connect(sigc::mem_fun(&AutoRecover::auto_backup),timeout);
}
synfig::String
path
)
);
- App::dialog_gradient->grab_button_set_sensitive(true);
+ App::dialog_gradient->set_default_button_set_sensitive(true);
App::dialog_gradient->present();
return NULL;
tree_view.set_enable_search(true);
tree_view.set_search_column(model.label);
-/*
+/* // Buttons to raise/lower/duplicate/delete children valuenodes
+ // Commented out because these functions are not implemented
+ // and children sort themselves alphabetically
+
Gtk::Image *icon;
//Gtk::IconSize iconsize(Gtk::IconSize::from_name("synfig-small_icon"));
Gtk::IconSize iconsize(Gtk::ICON_SIZE_SMALL_TOOLBAR);
void on_dirty_preview();
+ //! \todo Implement raise/lower/duplicate/delete functions
void on_raise_pressed();
void on_lower_pressed();
set_role("gradient_editor");
// Setup the buttons
- grab_button = manage(new class Gtk::Button(Gtk::StockID(_("Set as Default"))));
- grab_button->show();
- add_action_widget(*grab_button,2);
- grab_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Gradient::on_grab_pressed));
-
- /*
- Gtk::Button *apply_button(manage(new class Gtk::Button(Gtk::StockID("gtk-apply"))));
- apply_button->show();
- add_action_widget(*apply_button,1);
- apply_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Gradient::on_apply_pressed));
- */
+ set_default_button = manage(new class Gtk::Button(Gtk::StockID(_("Set as Default"))));
+ set_default_button->show();
+ add_action_widget(*set_default_button,2);
+ set_default_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Gradient::on_set_default_pressed));
Gtk::Button *cancel_button(manage(new class Gtk::Button(Gtk::StockID("gtk-close"))));
cancel_button->show();
}
void
-Dialog_Gradient::on_grab_pressed()
+Dialog_Gradient::on_set_default_pressed()
{
synfigapp::Main::set_gradient(get_gradient());
-// signal_edited_(get_gradient());
-// reset();
-// hide();
-}
-
-void
-Dialog_Gradient::on_apply_pressed()
-{
- signal_edited_(get_gradient());
}
void
sigc::connection value_changed_connection;
- void on_ok_pressed();
- void on_apply_pressed();
- void on_grab_pressed();
+ void on_set_default_pressed();
void on_cpoint_selected(synfig::Gradient::CPoint x);
void on_values_adjusted();
Widget_Gradient* widget_gradient;
Widget_ColorEdit* widget_color;
- Gtk::Button *grab_button;
+ Gtk::Button *set_default_button;
void on_changed();
const synfig::Gradient& get_gradient()const { return widget_gradient->get_value(); }
- void grab_button_set_sensitive(bool sensitive) { grab_button->set_sensitive(sensitive); }
+ void set_default_button_set_sensitive(bool sensitive) { set_default_button->set_sensitive(sensitive); }
void reset();
Dialog_Gradient();
~Dialog_Gradient();
- //! Inerface to external calls to fill in the Gradient Editor Dialog
+ //! Interface to external calls to fill in the Gradient Editor Dialog
//! when a Constant ValueNode or a Animated ValueNode is double cliked.
void edit(const synfigapp::ValueDesc &x, etl::handle<synfigapp::CanvasInterface> canvas_interface, synfig::Time time=0);
}; // END of Dialog_Gradient
App::dialog_gradient->set_gradient(synfigapp::Main::get_gradient());
App::dialog_gradient->reset();
App::dialog_gradient->signal_edited().connect(sigc::ptr_fun(synfigapp::Main::set_gradient));
- App::dialog_gradient->grab_button_set_sensitive(false);
+ App::dialog_gradient->set_default_button_set_sensitive(false);
App::dialog_gradient->present();
}