author | cniehaus <cniehaus> | 2003-05-02 15:36:57 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2003-05-02 15:36:57 (UTC) |
commit | f0b3896983e1f2c10d3fb3dde3fa08997221cdce (patch) (unidiff) | |
tree | 81191da4f86b0d28727432b9fe621b98f689ed19 /noncore | |
parent | b40991b25dd22c55cc80a9a9c4ae0adec103d575 (diff) | |
download | opie-f0b3896983e1f2c10d3fb3dde3fa08997221cdce.zip opie-f0b3896983e1f2c10d3fb3dde3fa08997221cdce.tar.gz opie-f0b3896983e1f2c10d3fb3dde3fa08997221cdce.tar.bz2 |
warn the user if there is no dict defines
-rw-r--r-- | noncore/apps/odict/odict.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index cc3148a..9f9a8d9 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp | |||
@@ -80,3 +80,3 @@ void ODict::loadConfig() | |||
80 | } | 80 | } |
81 | slotMethodChanged(1 ); //FIXME: this line should not contain a integer | 81 | slotMethodChanged( 1 ); //FIXME: this line should not contain a integer |
82 | } | 82 | } |
@@ -96,2 +96,26 @@ void ODict::slotStartQuery() | |||
96 | { | 96 | { |
97 | /* | ||
98 | * if the user has not yet defined a dictionary | ||
99 | */ | ||
100 | if ( !query_co->currentText() ) | ||
101 | { | ||
102 | switch ( QMessageBox::information( this, tr( "OPIE-Dictionary" ), | ||
103 | tr( "No dictionary defined" ), | ||
104 | tr( "&Define one" ), | ||
105 | tr( "&Cancel" ), | ||
106 | 0, // Define a dict choosen | ||
107 | 1 ) ) // Cancel choosen | ||
108 | { | ||
109 | |||
110 | case 0: | ||
111 | slotSettings(); | ||
112 | break; | ||
113 | case 1: // stop here | ||
114 | return; | ||
115 | } | ||
116 | } | ||
117 | |||
118 | /* | ||
119 | * ok, the user has defined a dict | ||
120 | */ | ||
97 | QString querystring = query_le->text(); | 121 | QString querystring = query_le->text(); |