From db6135efb8e705ea6dea59b2ea26c6847ffe4c0e Mon Sep 17 00:00:00 2001 From: fgerlits Date: Tue, 28 Jun 2005 16:59:02 +0000 Subject: [PATCH] added Glib::Markup::escape_text() to all strings in ZebraTreeViews --- .../products/gLiveSupport/src/BrowseItem.cxx | 9 ++++-- .../gLiveSupport/src/ScratchpadWindow.cxx | 5 ++-- .../gLiveSupport/src/SearchWindow.cxx | 16 ++++++---- .../src/SimplePlaylistManagementWindow.cxx | 4 +-- .../src/SimplePlaylistManagementWindow.h | 29 +++++++++---------- .../gLiveSupport/src/UploadFileWindow.cxx | 3 +- 6 files changed, 38 insertions(+), 28 deletions(-) diff --git a/livesupport/products/gLiveSupport/src/BrowseItem.cxx b/livesupport/products/gLiveSupport/src/BrowseItem.cxx index 579e44d24..800408167 100644 --- a/livesupport/products/gLiveSupport/src/BrowseItem.cxx +++ b/livesupport/products/gLiveSupport/src/BrowseItem.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.4 $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/BrowseItem.cxx,v $ ------------------------------------------------------------------------------*/ @@ -34,6 +34,7 @@ #endif #include +#include #include "LiveSupport/Widgets/WidgetFactory.h" @@ -92,7 +93,8 @@ BrowseItem :: BrowseItem( pack_start(*scrolledWindow, Gtk::PACK_SHRINK, 5); try { - allString = *getResourceUstring("allStringForBrowse"); + allString = Glib::Markup::escape_text( + *getResourceUstring("allStringForBrowse")); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; std::exit(1); @@ -157,7 +159,8 @@ BrowseItem :: onShow(void) throw () std::vector::const_iterator valuesIt; for (valuesIt = values->begin(); valuesIt != values->end(); ++valuesIt) { row = *treeModel->append(); - row[modelColumns.column] = *valuesIt; + row[modelColumns.column] = Glib::Markup::escape_text( + *valuesIt); row[modelColumns.rowNumberColumn] = rowNumber++; } diff --git a/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx b/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx index b7aae95b9..7198a017a 100644 --- a/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx +++ b/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.24 $ + Version : $Revision: 1.25 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -272,7 +272,8 @@ ScratchpadWindow :: showContents(void) throw () default: break; } - row[modelColumns.titleColumn] = *playable->getTitle(); + row[modelColumns.titleColumn] = Glib::Markup::escape_text( + *playable->getTitle()); row[modelColumns.rowNumberColumn] = rowNumber; ++it; diff --git a/livesupport/products/gLiveSupport/src/SearchWindow.cxx b/livesupport/products/gLiveSupport/src/SearchWindow.cxx index c1b8d84dc..cfdfe9915 100644 --- a/livesupport/products/gLiveSupport/src/SearchWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SearchWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.20 $ + Version : $Revision: 1.21 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -352,11 +352,17 @@ SearchWindow :: onSearch(Ptr::Ref criteria) break; } - Ptr::Ref title = playable->getTitle(); - row[modelColumns.titleColumn] = title ? *title : ""; + Ptr::Ref + title = playable->getTitle(); + row[modelColumns.titleColumn] + = title ? Glib::Markup::escape_text(*title) + : ""; - Ptr::Ref creator = playable->getMetadata("dc:creator"); - row[modelColumns.creatorColumn] = creator ? *creator : ""; + Ptr::Ref + creator = playable->getMetadata("dc:creator"); + row[modelColumns.creatorColumn] + = creator ? Glib::Markup::escape_text(*creator) + : ""; Ptr::Ref length = playable->getPlaylength(); row[modelColumns.lengthColumn] = length ? to_simple_string(*length) diff --git a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx index 2bc48ed2c..ad5c5b5fb 100644 --- a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.13 $ + Version : $Revision: 1.14 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -242,7 +242,7 @@ SimplePlaylistManagementWindow :: showContents(void) throw () row[modelColumns.startColumn] = to_simple_string(*playlistElem->getRelativeOffset()); row[modelColumns.titleColumn] - = *playable->getTitle(); + = Glib::Markup::escape_text(*playable->getTitle()); row[modelColumns.lengthColumn] = to_simple_string(*playable->getPlaylength()); } diff --git a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h index 3de27c50f..da2394df3 100644 --- a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h +++ b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.4 $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h,v $ ------------------------------------------------------------------------------*/ @@ -74,20 +74,19 @@ using namespace LiveSupport::Widgets; * The layout of this window is roughly the following: *

  *  +--- simple playlist management window --------+
- *  | name:    +-- name input ----+                |
- *  | +-- playlist entries -------+                |
- *  | | +-- entry1 -------------+ |                |
- *  | | +-- entry2 -------------+ |                |
- *  | |  ...                      |                |
- *  | +---------------------------+                |
- *  | +-- save button ------------+                |
- *  | +-- close button -----------+                |
- *  | +-- status bar -------------+                |
+ *  | name:    +-- name input -------------+       |
+ *  | +-- playlist entries ----------------------+ |
+ *  | | +-- entry1 ----------------------------+ | |
+ *  | | +-- entry2 ----------------------------+ | |
+ *  | |  ...                                     | |
+ *  | +------------------------------------------+ |
+ *  |        +- save button -+  +- close button -+ |
+ *  | +-- status bar ----------------------------+ |
  *  +----------------------------------------------+
  *  
* * @author $Author: fgerlits $ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ class SimplePlaylistManagementWindow : public WhiteWindow, public LocalizedObject @@ -100,7 +99,7 @@ class SimplePlaylistManagementWindow : public WhiteWindow, * Lists one playlist entry per row. * * @author $Author: fgerlits $ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ class ModelColumns : public ZebraTreeModelColumnRecord { @@ -113,17 +112,17 @@ class SimplePlaylistManagementWindow : public WhiteWindow, /** * The column for the start of the playlist entry. */ - Gtk::TreeModelColumn startColumn; + Gtk::TreeModelColumn startColumn; /** * The column for the title of the audio clip or playlist. */ - Gtk::TreeModelColumn titleColumn; + Gtk::TreeModelColumn titleColumn; /** * The column for the length of the playlist entry. */ - Gtk::TreeModelColumn lengthColumn; + Gtk::TreeModelColumn lengthColumn; /** * Constructor. diff --git a/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx b/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx index 74cddd3e3..199e1c257 100644 --- a/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx +++ b/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.14 $ + Version : $Revision: 1.15 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/UploadFileWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -275,6 +275,7 @@ UploadFileWindow :: updateFileInfo(void) throw () : playlength->seconds() + 1); lengthValueLabel->set_text(lengthStr.str()); + statusBar->set_text(""); isAudioClipValid = true; }