[glom] More partial porting
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] More partial porting
- Date: Wed, 8 Dec 2010 11:38:41 +0000 (UTC)
commit 4475f7f2a9607cb1ecd4061183fba02eda8fbc27
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Dec 8 12:38:34 2010 +0100
More partial porting
glom/mode_design/dialog_database_preferences.cc | 2 +-
.../layout_item_dialogs/dialog_buttonscript.cc | 2 +-
glom/utility_widgets/gimpruler/gimpruler.c | 2 +
glom/utility_widgets/layoutwidgetbase.cc | 22 ++++++++++----------
4 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/glom/mode_design/dialog_database_preferences.cc b/glom/mode_design/dialog_database_preferences.cc
index 4fbaec2..f622c69 100644
--- a/glom/mode_design/dialog_database_preferences.cc
+++ b/glom/mode_design/dialog_database_preferences.cc
@@ -82,7 +82,7 @@ Dialog_Database_Preferences::Dialog_Database_Preferences(BaseObjectType* cobject
sigc::mem_fun(*this, &Dialog_Database_Preferences::on_button_test_script) );
// Set a monospace font
- m_text_view_script->modify_font(Pango::FontDescription("Monospace"));
+ m_text_view_script->override_font(Pango::FontDescription("Monospace"));
//Dialog_Properties::set_modified(false);
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
index a227329..0016da2 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
@@ -45,7 +45,7 @@ Dialog_ButtonScript::Dialog_ButtonScript(BaseObjectType* cobject, const Glib::Re
m_button_test_script->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_ButtonScript::on_button_test_script) );
// Set a monospace font
- m_text_view_script->modify_font(Pango::FontDescription("Monospace"));
+ m_text_view_script->override_font(Pango::FontDescription("Monospace"));
//on_foreach_connect(*this);
//Dialog_Properties::set_modified(false);
diff --git a/glom/utility_widgets/gimpruler/gimpruler.c b/glom/utility_widgets/gimpruler/gimpruler.c
index d69c465..5faf6d1 100644
--- a/glom/utility_widgets/gimpruler/gimpruler.c
+++ b/glom/utility_widgets/gimpruler/gimpruler.c
@@ -16,6 +16,8 @@
* <http://www.gnu.org/licenses/>.
*/
+#undef GTK_DISABLE_DEPRECATED //TODO: Remove this when the original gimp code has been ported fully. murrayc.
+
#include "config.h"
#include <string.h>
diff --git a/glom/utility_widgets/layoutwidgetbase.cc b/glom/utility_widgets/layoutwidgetbase.cc
index e343c69..3426223 100644
--- a/glom/utility_widgets/layoutwidgetbase.cc
+++ b/glom/utility_widgets/layoutwidgetbase.cc
@@ -132,7 +132,7 @@ void LayoutWidgetBase::apply_formatting(Gtk::Widget& widget, const sharedptr<con
const Glib::ustring font_desc = formatting.get_text_format_font();
if(!font_desc.empty())
{
- widget_to_change->modify_font( Pango::FontDescription(font_desc) );
+ widget_to_change->override_font( Pango::FontDescription(font_desc) );
}
@@ -140,11 +140,11 @@ void LayoutWidgetBase::apply_formatting(Gtk::Widget& widget, const sharedptr<con
if(!fg.empty())
{
// "text" is the text color. (Works for GtkEntry and GtkTextView,
- // for which modify_fg() doesn't seem to have any effect.
- widget_to_change->modify_text(Gtk::STATE_NORMAL, Gdk::Color(fg));
+ // for which override_color() doesn't seem to have any effect.
+ widget_to_change->override_color(Gdk::RGBA(fg));
- // This works for GtkLabel, for which modify_text() does not.
- widget_to_change->modify_fg(Gtk::STATE_NORMAL, Gdk::Color(fg));
+ // This works for GtkLabel, for which override_color() does not.
+ widget_to_change->override_color(Gdk::RGBA(fg));
}
@@ -154,20 +154,20 @@ void LayoutWidgetBase::apply_formatting(Gtk::Widget& widget, const sharedptr<con
if(!labelglom && !button)
{
// "base" is the background color for GtkEntry. "bg" seems to change the border:
- widget_to_change->modify_base(Gtk::STATE_NORMAL, Gdk::Color(bg));
+ widget_to_change->override_background_color(Gdk::RGBA(bg));
}
- //According to the gtk_widget_modify_base() documentation,
+ //According to the gtk_widget_override_background_color() documentation,
//a GtkLabel can only have a background color by, for instance, placing it
//in a GtkEventBox. Luckily Label is actually derived from EventBox.
else if(labelglom)
{
- //label->modify_base(Gtk::STATE_NORMAL, Gdk::Color("bg"));
- labelglom->modify_bg(Gtk::STATE_NORMAL, Gdk::Color(bg));
+ //label->override_background_color(Gdk::RGBA("bg"));
+ labelglom->override_background_color(Gdk::RGBA(bg));
}
else if(button)
{
- //button->modify_base(Gtk::STATE_NORMAL, Gdk::Color("bg"));
- button->modify_bg(Gtk::STATE_NORMAL, Gdk::Color(bg));
+ //button->override_background_color(Gdk::RGBA("bg"));
+ button->override_background_color(Gdk::RGBA(bg));
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]