Commit 7e680cd8 authored by daniel_e's avatar daniel_e
Browse files

(ColorLabel::ColorLabel): Modify the whole Gtk::RcStyle in one go rather than

setting the bg pixmap thrice.
parent f85eda3b
2002-12-25 Daniel Elstner <daniel.elstner@gmx.net>
* src/prefdialog.cc (ColorLabel::ColorLabel): Modify the whole
Gtk::RcStyle in one go rather than setting the bg pixmap thrice.
2002-12-25 Daniel Elstner <daniel.elstner@gmx.net>
* src/configdata.{cc,h}: Remove config option "menutool_mode"
......
......@@ -227,25 +227,24 @@ void ColorSelectionButton::on_clicked()
ColorSelectionButton::ColorLabel::ColorLabel()
{
#if REGEXXER_HAVE_GTKMM_22
const Glib::RefPtr<Gtk::RcStyle> rcstyle = get_modifier_style();
const Glib::ustring none = "<none>";
modify_bg_pixmap(Gtk::STATE_NORMAL, none);
modify_bg_pixmap(Gtk::STATE_ACTIVE, none);
modify_bg_pixmap(Gtk::STATE_PRELIGHT, none);
#if REGEXXER_HAVE_GTKMM_22
rcstyle->set_bg_pixmap_name(Gtk::STATE_NORMAL, none);
rcstyle->set_bg_pixmap_name(Gtk::STATE_ACTIVE, none);
rcstyle->set_bg_pixmap_name(Gtk::STATE_PRELIGHT, none);
#else
const Glib::RefPtr<Gtk::RcStyle> rcstyle = get_modifier_style();
g_free(rcstyle->gobj()->bg_pixmap_name[Gtk::STATE_NORMAL]);
g_free(rcstyle->gobj()->bg_pixmap_name[Gtk::STATE_ACTIVE]);
g_free(rcstyle->gobj()->bg_pixmap_name[Gtk::STATE_PRELIGHT]);
rcstyle->gobj()->bg_pixmap_name[Gtk::STATE_NORMAL] = g_strdup("<none>");
rcstyle->gobj()->bg_pixmap_name[Gtk::STATE_ACTIVE] = g_strdup("<none>");
rcstyle->gobj()->bg_pixmap_name[Gtk::STATE_PRELIGHT] = g_strdup("<none>");
rcstyle->gobj()->bg_pixmap_name[Gtk::STATE_NORMAL] = g_strdup(none.c_str());
rcstyle->gobj()->bg_pixmap_name[Gtk::STATE_ACTIVE] = g_strdup(none.c_str());
rcstyle->gobj()->bg_pixmap_name[Gtk::STATE_PRELIGHT] = g_strdup(none.c_str());
#endif
modify_style(rcstyle);
#endif
}
ColorSelectionButton::ColorLabel::~ColorLabel()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment