Commit ff38f48d authored by Daniel Elstner's avatar Daniel Elstner
Browse files

Remove configuration option because it doesn't seem to be necessary

* regexxer.schemas.in (override_direction): Remove configuration
option because it doesn't seem to be necessary anymore.  That is,
the current GTK+ release gets the direction of Latin text in RTL
locales right now.

* src/globalstrings.h (conf_key_override_direction): Remove.
* src/mainwindow.cc (MainWindow::on_conf_value_changed): Remove
the code that handles the "override_direction" config option.
* src/prefdialog.{cc,h} (PrefDialog): ditto.
* ui/prefdialog.glade (button_override_direction): Remove.
parent 442ec421
2004-05-30 Daniel Elstner <daniel.elstner@gmx.net>
* regexxer.schemas.in (override_direction): Remove configuration
option because it doesn't seem to be necessary anymore. That is,
the current GTK+ release gets the direction of Latin text in RTL
locales right now.
* src/globalstrings.h (conf_key_override_direction): Remove.
* src/mainwindow.cc (MainWindow::on_conf_value_changed): Remove
the code that handles the "override_direction" config option.
* src/prefdialog.{cc,h} (PrefDialog): ditto.
* ui/prefdialog.glade (button_override_direction): Remove.
2004-05-30 Daniel Elstner <daniel.elstner@gmx.net>
* src/filebuffer.cc (FileBuffer::find_matches): Get rid of an
......
......@@ -77,21 +77,5 @@
</locale>
</schema>
<schema>
<key>/schemas/apps/regexxer/override_direction</key>
<applyto>/apps/regexxer/override_direction</applyto>
<owner>regexxer</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Override text direction</short>
<long>
If enabled, the text direction of the file editor, preview area,
and all file-related entry boxes is always set to left-to-right
no matter what the locale&apos;s default direction is.
</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>
......@@ -38,7 +38,6 @@ const char *const conf_key_match_color = REGEXXER_GCONF_DIRECTORY "/mat
const char *const conf_key_current_match_color = REGEXXER_GCONF_DIRECTORY "/current_match_color";
const char *const conf_key_toolbar_style = REGEXXER_GCONF_DIRECTORY "/toolbar_style";
const char *const conf_key_fallback_encoding = REGEXXER_GCONF_DIRECTORY "/fallback_encoding";
const char *const conf_key_override_direction = REGEXXER_GCONF_DIRECTORY "/override_direction";
const char *const application_icon_filename = REGEXXER_DATADIR G_DIR_SEPARATOR_S
"pixmaps" G_DIR_SEPARATOR_S "regexxer.png";
......
......@@ -846,20 +846,6 @@ void MainWindow::on_conf_value_changed(const Glib::ustring& key, const Gnome::Co
toolbar_->set_toolbar_style(Util::enum_from_nick<ToolbarStyle>(value.get_string()));
}
}
else if (value.get_type() == Gnome::Conf::VALUE_BOOL)
{
if (key.raw() == conf_key_override_direction)
{
const TextDirection direction = (value.get_bool()) ? TEXT_DIR_LTR : TEXT_DIR_NONE;
entry_folder_ ->set_direction(direction);
entry_pattern_ ->set_direction(direction);
entry_regex_ ->set_direction(direction);
entry_substitution_->set_direction(direction);
filetree_ ->set_direction(direction);
textview_ ->set_direction(direction);
entry_preview_ ->set_direction(direction);
}
}
}
} // namespace Regexxer
......
......@@ -72,7 +72,6 @@ PrefDialog::PrefDialog(Gtk::Window& parent)
button_current_color_ (0),
combo_toolbar_style_ (0),
entry_fallback_ (0),
button_direction_ (0),
entry_fallback_changed_ (false)
{
load_xml();
......@@ -100,7 +99,6 @@ void PrefDialog::load_xml()
xml->get_widget("button_current_color", button_current_color_);
xml->get_widget("combo_toolbar_style", combo_toolbar_style_);
xml->get_widget("entry_fallback", entry_fallback_);
xml->get_widget("button_direction", button_direction_);
const Glib::RefPtr<SizeGroup> size_group = SizeGroup::create(SIZE_GROUP_VERTICAL);
......@@ -131,9 +129,6 @@ void PrefDialog::connect_signals()
entry_fallback_->signal_activate().connect(
sigc::mem_fun(*this, &PrefDialog::on_entry_fallback_activate));
conn_direction_ = button_direction_->signal_toggled().connect(
sigc::mem_fun(*this, &PrefDialog::on_button_direction_toggled));
}
void PrefDialog::on_response(int)
......@@ -145,12 +140,11 @@ void PrefDialog::on_response(int)
}
/*
* Note that it isn't strictly required to block the change notifications
* as done below for the "toolbar_style" and "override_direction" settings.
* GConf doesn't emit "value_changed" if the new value is identical to the
* old one. If, however, the value was reset to the schema default, the
* following change notification would again detach the schema. This won't
* look neat, and I like neat.
* Note that it isn't strictly required to block the change notification
* as done below for the "toolbar_style" setting. GConf doesn't emit
* "value_changed" if the new value is identical to the old one. If, however,
* the value was reset to the schema default, the following change notification
* would again detach the schema. This won't look neat, and I like neat.
*/
void PrefDialog::on_conf_value_changed(const Glib::ustring& key, const Gnome::Conf::Value& value)
{
......@@ -179,14 +173,6 @@ void PrefDialog::on_conf_value_changed(const Glib::ustring& key, const Gnome::Co
entry_fallback_changed_ = false;
}
}
else if (value.get_type() == Gnome::Conf::VALUE_BOOL)
{
if (key.raw() == conf_key_override_direction)
{
Util::ScopedBlock block (conn_direction_);
button_direction_->set_active(value.get_bool());
}
}
}
void PrefDialog::initialize_configuration()
......@@ -265,11 +251,5 @@ void PrefDialog::on_entry_fallback_activate()
}
}
void PrefDialog::on_button_direction_toggled()
{
const bool value = button_direction_->get_active();
Gnome::Conf::Client::get_default_client()->set(conf_key_override_direction, value);
}
} // namespace Regexxer
......@@ -60,9 +60,7 @@ private:
Gtk::ColorButton* button_current_color_;
Gtk::ComboBox* combo_toolbar_style_;
Gtk::Entry* entry_fallback_;
Gtk::CheckButton* button_direction_;
Util::AutoConnection conn_toolbar_style_;
Util::AutoConnection conn_direction_;
bool entry_fallback_changed_;
void load_xml();
......@@ -79,7 +77,6 @@ private:
void on_option_toolbar_style_changed();
void on_entry_fallback_changed();
void on_entry_fallback_activate();
void on_button_direction_toggled();
};
} // namespace Regexxer
......
......@@ -513,25 +513,6 @@ Both horizontal</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="button_direction">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Ignore the text direction of the locale</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>
......
Markdown is supported
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