projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use the functions from the last two revisions to rebuild the layer tree whenever...
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
widget_filename.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/widget_filename.cpp
b/synfig-studio/trunk/src/gtkmm/widget_filename.cpp
index
6eeeb62
..
a178614
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/widget_filename.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/widget_filename.cpp
@@
-6,6
+6,7
@@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-33,6
+34,9
@@
#include <gtkmm/button.h>
#include "widget_filename.h"
#include "app.h"
#include <gtkmm/button.h>
#include "widget_filename.h"
#include "app.h"
+#include "canvasview.h"
+
+#include "general.h"
#endif
#endif
@@
-45,10
+49,6
@@
using namespace studio;
/* === M A C R O S ========================================================= */
/* === M A C R O S ========================================================= */
-#if ! defined(_)
-#define _(x) (x)
-#endif
-
/* === G L O B A L S ======================================================= */
/* === P R O C E D U R E S ================================================= */
/* === G L O B A L S ======================================================= */
/* === P R O C E D U R E S ================================================= */
@@
-82,7
+82,7
@@
Widget_Filename::set_has_frame(bool x)
void
void
-Widget_Filename::set_value(const string &data)
+Widget_Filename::set_value(const st
d::st
ring &data)
{
entry_filename->set_text(data);
}
{
entry_filename->set_text(data);
}
@@
-112,6
+112,11
@@
Widget_Filename::on_button_choose_pressed()
string filename=entry_filename->get_text();
if(filename.empty())
filename=".";
string filename=entry_filename->get_text();
if(filename.empty())
filename=".";
- if(App::dialog_open_file(_("Choose File"),filename))
+ else
+ filename = etl::absolute_path(
+ etl::dirname(App::get_selected_canvas_view()->get_canvas()->get_file_name()) +
+ ETL_DIRECTORY_SEPARATOR +
+ filename);
+ if(App::dialog_open_file(_("Choose File"), filename, MISC_DIR_PREFERENCE))
entry_filename->set_text(filename);
}
entry_filename->set_text(filename);
}