[glom] Partial port to recent gtkmm API changes from git master.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Partial port to recent gtkmm API changes from git master.
- Date: Wed, 8 Dec 2010 11:10:28 +0000 (UTC)
commit 454aa887e45a26212af91e649861d3c3a2efe5c9
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Dec 8 12:10:18 2010 +0100
Partial port to recent gtkmm API changes from git master.
* glom/mode_data/datawidget/datawidget.cc: signal_style_changed was removed
though it might come back later.
* glom/mode_data/datawidget/entry.cc: Use override_color() instead of
modify_text().
* glom/mode_data/placeholder-glom.cc: Use set_source_rgba() instead of
set_source_color(). Use get_style_context() instead of get_style().
ChangeLog | 11 +++++++++++
glom/mode_data/datawidget/datawidget.cc | 2 +-
glom/mode_data/datawidget/entry.cc | 4 ++--
glom/mode_data/placeholder-glom.cc | 9 +++------
4 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 809a6be..b5e6967 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-08 Murray Cumming <murrayc murrayc com>
+
+ Partial port to recent gtkmm API changes from git master.
+
+ * glom/mode_data/datawidget/datawidget.cc: signal_style_changed was removed
+ though it might come back later.
+ * glom/mode_data/datawidget/entry.cc: Use override_color() instead of
+ modify_text().
+ * glom/mode_data/placeholder-glom.cc: Use set_source_rgba() instead of
+ set_source_color(). Use get_style_context() instead of get_style().
+
2010-12-03 Murray Cumming <murrayc murrayc com>
Fix the build with latest gtksourceviewmm from git master.
diff --git a/glom/mode_data/datawidget/datawidget.cc b/glom/mode_data/datawidget/datawidget.cc
index 248dc75..34fdd82 100644
--- a/glom/mode_data/datawidget/datawidget.cc
+++ b/glom/mode_data/datawidget/datawidget.cc
@@ -264,7 +264,7 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
#endif // GLOM_ENABLE_CLIENT_ONLY
set_events(Gdk::BUTTON_PRESS_MASK);
- signal_style_changed().connect(sigc::mem_fun(*this, &DataWidget::on_self_style_changed));
+ //TODO: signal_style_changed().connect(sigc::mem_fun(*this, &DataWidget::on_self_style_changed));
}
DataWidget::~DataWidget()
diff --git a/glom/mode_data/datawidget/entry.cc b/glom/mode_data/datawidget/entry.cc
index 5a3de40..69808f6 100644
--- a/glom/mode_data/datawidget/entry.cc
+++ b/glom/mode_data/datawidget/entry.cc
@@ -172,9 +172,9 @@ void Entry::set_value(const Gnome::Gda::Value& value)
const Glib::ustring fg_color =
layout_item->get_formatting_used().get_text_format_color_foreground_to_use(value);
if(!fg_color.empty())
- modify_text(Gtk::STATE_NORMAL, Gdk::Color(fg_color));
+ override_color(Gdk::RGBA(fg_color));
else
- modify_text(Gtk::STATE_NORMAL, Gdk::Color());
+ override_color(Gdk::RGBA()); //TODO: Use an unset_*() method?
}
}
diff --git a/glom/mode_data/placeholder-glom.cc b/glom/mode_data/placeholder-glom.cc
index 2e30704..609605f 100644
--- a/glom/mode_data/placeholder-glom.cc
+++ b/glom/mode_data/placeholder-glom.cc
@@ -77,9 +77,6 @@ void PlaceholderGlom::on_realize()
//Call base class:
Gtk::Widget::on_realize();
- ensure_style();
-
-
if(!m_refGdkWindow)
{
//Create the GdkWindow:
@@ -105,7 +102,7 @@ void PlaceholderGlom::on_realize()
set_window(m_refGdkWindow);
//set colors
- modify_fg(Gtk::STATE_NORMAL , Gdk::Color("black"));
+ override_color(Gdk::RGBA("black"));
//make the widget receive expose events
m_refGdkWindow->set_user_data(gobj());
@@ -121,11 +118,11 @@ void PlaceholderGlom::on_unrealize()
bool PlaceholderGlom::on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
{
// Paint the background:
- Gdk::Cairo::set_source_color(cr, get_style()->get_bg(Gtk::STATE_NORMAL));
+ Gdk::Cairo::set_source_rgba(cr, get_style_context()->get_background_color());
cr->paint();
// Draw the foreground:
- Gdk::Cairo::set_source_color(cr, get_style()->get_fg(Gtk::STATE_NORMAL));
+ Gdk::Cairo::set_source_rgba(cr, get_style_context()->get_color());
cr->set_line_width(4);
cr->rectangle(0, 0, get_allocation().get_width(), get_allocation().get_height());
cr->stroke();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]