[gtksourceviewmm] Adapt to new-style enum values.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm] Adapt to new-style enum values.
- Date: Sat, 15 Apr 2017 12:13:47 +0000 (UTC)
commit e4bec551078f97fb16c071923fa06d9118f31edd
Author: Murray Cumming <murrayc murrayc com>
Date: Sat Apr 15 14:13:19 2017 +0200
Adapt to new-style enum values.
tests/completion/main.cc | 6 +++---
tests/search/main.cc | 21 +++++++++++----------
2 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/tests/completion/main.cc b/tests/completion/main.cc
index 7ef8ffd..0d8d202 100644
--- a/tests/completion/main.cc
+++ b/tests/completion/main.cc
@@ -104,7 +104,7 @@ bool TestProvider::match_vfunc(const Glib::RefPtr<const Gsv::CompletionContext>&
Gsv::CompletionActivation TestProvider::get_activation_vfunc() const
{
- return Gsv::COMPLETION_ACTIVATION_INTERACTIVE | Gsv::COMPLETION_ACTIVATION_USER_REQUESTED;
+ return Gsv::CompletionActivation::INTERACTIVE | Gsv::CompletionActivation::USER_REQUESTED;
}
int TestProvider::get_priority_vfunc() const
@@ -143,8 +143,8 @@ TestWindow::TestWindow()
m_show_icons(0)
{
// layout
- Gtk::Box* hbox (Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 1)));
- Gtk::Box* vbox (Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 1)));
+ Gtk::Box* hbox (Gtk::manage(new Gtk::Box(Gtk::Orientation::HORIZONTAL, 1)));
+ Gtk::Box* vbox (Gtk::manage(new Gtk::Box(Gtk::Orientation::VERTICAL, 1)));
m_remember = Gtk::manage(new Gtk::CheckButton("Remember info visibility"));
m_select_on_show = Gtk::manage(new Gtk::CheckButton("Select first on show"));
m_show_headers = Gtk::manage(new Gtk::CheckButton("Show headers"));
diff --git a/tests/search/main.cc b/tests/search/main.cc
index 098eaf4..729619a 100644
--- a/tests/search/main.cc
+++ b/tests/search/main.cc
@@ -47,9 +47,9 @@ class SearchDialog : public Dialog {
void build_widget ()
{
- add_button ("Close", RESPONSE_ACCEPT) ;
+ add_button ("Close", ResponseType::ACCEPT) ;
- m_hbox = manage (new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)) ;
+ m_hbox = manage (new Gtk::Box(Gtk::Orientation::HORIZONTAL)) ;
get_content_area ()->pack_start (*m_hbox) ;
Label *label = manage (new Label ("Search: ")) ;
@@ -164,12 +164,12 @@ public:
{
try {
FileChooserDialog fc_dialog ("open a file",
- FILE_CHOOSER_ACTION_OPEN);
+ FileChooserAction::OPEN);
fc_dialog.set_select_multiple (false) ;
- fc_dialog.add_button ("Cancel", RESPONSE_CANCEL) ;
- fc_dialog.add_button ("OK", RESPONSE_ACCEPT) ;
+ fc_dialog.add_button ("Cancel", ResponseType::CANCEL) ;
+ fc_dialog.add_button ("OK", ResponseType::ACCEPT) ;
int res = fc_dialog.run () ;
- if (res != RESPONSE_ACCEPT) {return;}
+ if (res != ResponseType::ACCEPT) {return;}
ustring filename = fc_dialog.get_filename () ;
if (filename == "") {return;}
open_file (filename) ;
@@ -208,7 +208,8 @@ public:
if (!do_search (search_str, a_forward)) {
MessageDialog dialog (*a_dialog,
"Did not find string " + search_str,
- MESSAGE_WARNING) ;
+ false,
+ MessageType::WARNING) ;
dialog.run () ;
dialog.hide () ;
}
@@ -236,7 +237,7 @@ public:
limit = source_buffer->end () ;
found = search_iter.forward_search
(a_text,
- TEXT_SEARCH_TEXT_ONLY | TEXT_SEARCH_CASE_INSENSITIVE,
+ TextSearchFlags::TEXT_ONLY | TextSearchFlags::CASE_INSENSITIVE,
start,
end,
limit) ;
@@ -247,7 +248,7 @@ public:
limit = source_buffer->begin () ;
found = search_iter.backward_search
(a_text,
- TEXT_SEARCH_TEXT_ONLY | TEXT_SEARCH_CASE_INSENSITIVE,
+ TextSearchFlags::TEXT_ONLY | TextSearchFlags::CASE_INSENSITIVE,
start,
end,
limit) ;
@@ -316,7 +317,7 @@ public:
{
if (m_main_vbox) {return;}
- m_main_vbox = manage (new Gtk::Box(Gtk::ORIENTATION_VERTICAL)) ;
+ m_main_vbox = manage (new Gtk::Box(Gtk::Orientation::VERTICAL)) ;
g_return_if_fail (m_menu_bar) ;
m_main_vbox->pack_start (*m_menu_bar, PACK_SHRINK) ;
m_source_view = manage (new View) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]