wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src/widgets file_chooser.cpp file_choos...


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src/widgets file_chooser.cpp file_choos...
Date: Thu, 18 Nov 2004 15:02:41 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    04/11/18 19:56:30

Modified files:
        src/widgets    : file_chooser.cpp file_chooser.hpp 

Log message:
        Remove duplicated display member.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/file_chooser.cpp.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/file_chooser.hpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text

Patches:
Index: wesnoth/src/widgets/file_chooser.cpp
diff -u wesnoth/src/widgets/file_chooser.cpp:1.14 
wesnoth/src/widgets/file_chooser.cpp:1.15
--- wesnoth/src/widgets/file_chooser.cpp:1.14   Thu Nov 18 19:44:32 2004
+++ wesnoth/src/widgets/file_chooser.cpp        Thu Nov 18 19:56:28 2004
@@ -30,7 +30,7 @@
 namespace gui {
 
 file_chooser::file_chooser(display &disp, std::string start_file) 
-  : widget(disp), disp_(disp), delete_button_(disp, _("Delete File")),
+       : widget(disp), delete_button_(disp, _("Delete File")),
          path_delim_('/'), current_dir_(get_path(start_file)),
          chosen_file_(start_file), file_list_(disp, files_in_current_dir_, 
false),
          filename_textbox_(disp, 100, start_file, true), choice_made_(false),
@@ -93,9 +93,9 @@
 void file_chooser::draw_contents() {
        display_current_files();
        display_chosen_file();
-       font::draw_text(&disp_, current_path_rect_, font::SIZE_NORMAL, 
font::NORMAL_COLOUR,
+       font::draw_text(&disp(), current_path_rect_, font::SIZE_NORMAL, 
font::NORMAL_COLOUR,
                                        current_dir_, current_path_rect_.x, 
current_path_rect_.y,
-                                       disp_.video().getSurface());
+                                       disp().video().getSurface());
 }
 
 void file_chooser::process_event() {
@@ -133,7 +133,7 @@
        if (delete_button_.pressed()) {
                const int ret = remove(get_current_file().c_str());
                if (ret == -1) {
-                       show_dialog(disp_, NULL, "", _("Deletion of the file 
failed."), OK_ONLY);
+                       show_dialog(disp(), NULL, "", _("Deletion of the file 
failed."), OK_ONLY);
                }
                else {
                        update_file_lists();
Index: wesnoth/src/widgets/file_chooser.hpp
diff -u wesnoth/src/widgets/file_chooser.hpp:1.7 
wesnoth/src/widgets/file_chooser.hpp:1.8
--- wesnoth/src/widgets/file_chooser.hpp:1.7    Thu Nov 18 19:44:32 2004
+++ wesnoth/src/widgets/file_chooser.hpp        Thu Nov 18 19:56:28 2004
@@ -86,7 +86,6 @@
        /// most recently updated.
        std::string get_current_file() const;
 
-       display &disp_;
        button delete_button_;
        const char path_delim_;
        std::string current_dir_;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]