From 080e2d7eb048b981497599a862eb4e34155ff714 Mon Sep 17 00:00:00 2001 From: ishmal Date: Sun, 16 Jul 2006 17:56:58 +0000 Subject: [PATCH] more string cleanup --- src/ui/dialog/filedialog.cpp | 27 +++++++++++++----------- src/ui/dialog/filedialog.h | 40 +++++++++++++++++++++++------------- 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp index e3ebffc63..cb72d17f5 100644 --- a/src/ui/dialog/filedialog.cpp +++ b/src/ui/dialog/filedialog.cpp @@ -5,7 +5,7 @@ * Bob Jamison * Other dudes from The Inkscape Organization * - * Copyright (C) 2004 The Inkscape Organization + * Copyright (C) 2004-2006 The Inkscape Organization * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -736,9 +736,9 @@ public: Inkscape::Extension::Extension *getSelectionType(); - gchar *getFilename(); + Glib::ustring getFilename(); - Glib::SListHandle getFilenames (); + std::vector getFilenames (); protected: @@ -1073,7 +1073,7 @@ FileOpenDialogImpl::getSelectionType() /** * Get the file name chosen by the user. Valid after an [OK] */ -gchar * +Glib::ustring FileOpenDialogImpl::getFilename (void) { return g_strdup(myFilename.c_str()); @@ -1083,9 +1083,10 @@ FileOpenDialogImpl::getFilename (void) /** * To Get Multiple filenames selected at-once. */ -Glib::SListHandleFileOpenDialogImpl::getFilenames() +std::vectorFileOpenDialogImpl::getFilenames() { - return get_filenames(); + std::vector result = get_filenames(); + return result; } @@ -1125,7 +1126,7 @@ public: Inkscape::Extension::Extension *getSelectionType(); - gchar *getFilename(); + Glib::ustring getFilename(); private: @@ -1494,10 +1495,10 @@ FileSaveDialogImpl::getSelectionType() /** * Get the file name chosen by the user. Valid after an [OK] */ -gchar * +Glib::ustring FileSaveDialogImpl::getFilename() { - return g_strdup(myFilename.c_str()); + return myFilename; } @@ -1530,7 +1531,7 @@ public: Inkscape::Extension::Extension *getSelectionType(); - gchar *getFilename(); + Glib::ustring getFilename(); private: @@ -1897,13 +1898,15 @@ FileExportDialogImpl::getSelectionType() /** * Get the file name chosen by the user. Valid after an [OK] */ -gchar * +Glib::ustring FileExportDialogImpl::getFilename() { - return g_strdup(myFilename.c_str()); + return myFilename; } + + } //namespace Dialog } //namespace UI } //namespace Inkscape diff --git a/src/ui/dialog/filedialog.h b/src/ui/dialog/filedialog.h index c84a6a794..2f0bdfb8c 100644 --- a/src/ui/dialog/filedialog.h +++ b/src/ui/dialog/filedialog.h @@ -1,20 +1,32 @@ #ifndef __FILE_DIALOG_H__ #define __FILE_DIALOG_H__ +/** + * Defines the FileOpenDialog, FileSaveDialog, and FileExportDialog + * and their supporting classes. + * + * Authors: + * Bob Jamison + * Inkscape Guys + * + * Copyright (C) 2004-2006, Inkscape Authors + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include +#include -/** \file Defines classes FileOpenDialog, FileSaveDialog, - * and enums FileDialogType, FileDialogSelectionType. */ -#include -#include -namespace Inkscape { +class Inkscape::Extension::Extension; -namespace Extension { -class Extension; -} -namespace UI { -namespace Dialog { +namespace Inkscape +{ +namespace UI +{ +namespace Dialog +{ /** @@ -90,9 +102,9 @@ public: */ virtual Inkscape::Extension::Extension * getSelectionType() = 0; - virtual gchar * getFilename () =0; + virtual Glib::ustring getFilename () =0; - virtual Glib::SListHandle getFilenames () = 0; + virtual std::vector getFilenames () = 0; }; //FileOpenDialog @@ -152,7 +164,7 @@ public: */ virtual Inkscape::Extension::Extension * getSelectionType() = 0; - virtual gchar * getFilename () =0; + virtual Glib::ustring getFilename () =0; }; //FileSaveDialog @@ -212,7 +224,7 @@ public: */ virtual Inkscape::Extension::Extension * getSelectionType() = 0; - virtual gchar * getFilename () =0; + virtual Glib::ustring getFilename () =0; }; //FileSaveDialog -- 2.30.2