projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added copyright lines for files I've edited this year.
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
cellrenderer_value.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp
b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp
index
45490c1
..
802a178
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp
@@
-6,6
+6,7
@@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007, 2008 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-54,6
+55,8
@@
#include "dialog_color.h"
#include <gtkmm/textview.h>
#include "dialog_color.h"
#include <gtkmm/textview.h>
+#include "general.h"
+
#endif
using namespace synfig;
#endif
using namespace synfig;
@@
-65,11
+68,6
@@
using namespace studio;
#define DIGITS 15
#define DIGITS 15
-#define use_colorspace_gamma() App::use_colorspace_gamma
-#define colorspace_gamma() (2.2f)
-#define gamma_in(x) pow((float)x,1.0f/colorspace_gamma())
-#define gamma_out(x) pow((float)x,colorspace_gamma())
-
/* === G L O B A L S ======================================================= */
class studio::ValueBase_Entry : public Gtk::EventBox, public Gtk::CellEditable
/* === G L O B A L S ======================================================= */
class studio::ValueBase_Entry : public Gtk::EventBox, public Gtk::CellEditable
@@
-129,7
+127,6
@@
public:
}
~ValueBase_Entry()
{
}
~ValueBase_Entry()
{
- DEBUGPOINT();
}
void on_editing_done()
}
void on_editing_done()
@@
-154,7
+151,7
@@
public:
if(parent)parent->grab_focus();
Gtk::CellEditable::on_remove_widget();
}
if(parent)parent->grab_focus();
Gtk::CellEditable::on_remove_widget();
}
- void start_editing_vfunc(GdkEvent *
event
)
+ void start_editing_vfunc(GdkEvent *
/*event*/
)
{
valuewidget->signal_activate().connect(sigc::mem_fun(*this, &studio::ValueBase_Entry::editing_done));
show();
{
valuewidget->signal_activate().connect(sigc::mem_fun(*this, &studio::ValueBase_Entry::editing_done));
show();
@@
-204,8
+201,11
@@
public:
{
if(valuewidget)
return valuewidget->get_value();
{
if(valuewidget)
return valuewidget->get_value();
- return synfig::ValueBase();
+
+ warning("%s:%d this code shouldn't be reached", __FILE__, __LINE__);
+ return *(new synfig::ValueBase());
}
}
+
const Glib::ustring &get_path()
{
return path;
const Glib::ustring &get_path()
{
return path;
@@
-281,12
+281,13
@@
CellRenderer_ValueBase::CellRenderer_ValueBase():
property_attributes()=attr_list;
property_foreground()=Glib::ustring("#7f7f7f");
property_attributes()=attr_list;
property_foreground()=Glib::ustring("#7f7f7f");
- property_inconsist
a
nt()=false;
+ property_inconsist
e
nt()=false;
}
CellRenderer_ValueBase::~CellRenderer_ValueBase()
{
}
CellRenderer_ValueBase::~CellRenderer_ValueBase()
{
-// synfig::info("CellRenderer_ValueBase::~CellRenderer_ValueBase(): deleted");
+ if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+ synfig::info("CellRenderer_ValueBase::~CellRenderer_ValueBase(): Deleted");
}
void
}
void
@@
-401,7
+402,7
@@
CellRenderer_ValueBase::render_vfunc(
if(data.get(etl::handle<synfig::Canvas>()))
{
if(data.get(etl::handle<synfig::Canvas>())->is_inline())
if(data.get(etl::handle<synfig::Canvas>()))
{
if(data.get(etl::handle<synfig::Canvas>())->is_inline())
- property_text()=
"<Inline Canvas>"
;
+ property_text()=
_("<Inline Canvas>")
;
else
property_text()=(Glib::ustring)data.get(etl::handle<synfig::Canvas>())->get_id();
}
else
property_text()=(Glib::ustring)data.get(etl::handle<synfig::Canvas>())->get_id();
}
@@
-495,12
+496,12
@@
CellRenderer_ValueBase::color_edited(synfig::Color color, Glib::ustring path)
Gtk::CellEditable*
CellRenderer_ValueBase::start_editing_vfunc(
Gtk::CellEditable*
CellRenderer_ValueBase::start_editing_vfunc(
- GdkEvent* event,
+ GdkEvent* event
__attribute__ ((unused))
,
Gtk::Widget& widget,
const Glib::ustring& path,
Gtk::Widget& widget,
const Glib::ustring& path,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- Gtk::CellRendererState flags)
+ const Gdk::Rectangle& background_area
__attribute__ ((unused))
,
+ const Gdk::Rectangle& cell_area
__attribute__ ((unused))
,
+ Gtk::CellRendererState flags
__attribute__ ((unused))
)
{
// If we aren't editable, then there is nothing to do
if(!property_editable())
{
// If we aren't editable, then there is nothing to do
if(!property_editable())
@@
-548,13
+549,11
@@
CellRenderer_ValueBase::start_editing_vfunc(
synfig::String string;
string=data.get(string);
if(get_paragraph(string))
synfig::String string;
string=data.get(string);
if(get_paragraph(string))
- {
signal_edited_(path,ValueBase(string));
signal_edited_(path,ValueBase(string));
- }
return NULL;
}
return NULL;
}
- if(get_param_desc().get_hint()!="filename")
- return CellRendererText::start_editing_vfunc(event,widget,path,background_area,cell_area,flags);
+
//
if(get_param_desc().get_hint()!="filename")
+
//
return CellRendererText::start_editing_vfunc(event,widget,path,background_area,cell_area,flags);
default:
{
assert(get_canvas());
default:
{
assert(get_canvas());