summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-03-19 09:38:56 +0000
committerJabiertxo Arraiza Zenotz <jtx@jtx.marker.es>2013-03-19 09:38:56 +0000
commit757f1b17bf5db6b7b5cc8725a0ee3c438c08cafc (patch)
treec62786af287828f0f70dba2e079be3cea604d8f4 /src/ui/dialog
parentWorking width widgets (diff)
parentDrop remaining unused functions (diff)
downloadinkscape-757f1b17bf5db6b7b5cc8725a0ee3c438c08cafc.tar.gz
inkscape-757f1b17bf5db6b7b5cc8725a0ee3c438c08cafc.zip
Widgets to effect added
(bzr r11950.1.59)
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/export.cpp5
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp8
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp4
-rw-r--r--src/ui/dialog/text-edit.cpp3
4 files changed, 8 insertions, 12 deletions
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 603786742..ac039bf77 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -412,7 +412,6 @@ void Export::set_default_filename () {
if ( SP_ACTIVE_DOCUMENT && SP_ACTIVE_DOCUMENT->getURI() )
{
- gchar *name;
SPDocument * doc = SP_ACTIVE_DOCUMENT;
const gchar *uri = doc->getURI();
const gchar *text_extension = get_file_save_extension (Inkscape::Extension::FILE_SAVE_METHOD_SAVE_AS).c_str();
@@ -441,7 +440,7 @@ void Export::set_default_filename () {
g_free(uri_copy);
}
} else {
- name = g_strconcat(uri, ".png", NULL);
+ gchar *name = g_strconcat(uri, ".png", NULL);
filename_entry.set_text(name);
filename_entry.set_position(strlen(name));
@@ -1310,7 +1309,7 @@ void Export::onBrowse ()
WCHAR _filename[_MAX_PATH + 1];
memset(_filename, 0, sizeof(_filename));
gunichar2* utf16_path_string = g_utf8_to_utf16(filename.c_str(), -1, NULL, NULL, NULL);
- wcsncpy(_filename, (wchar_t*)utf16_path_string, _MAX_PATH);
+ wcsncpy(_filename, reinterpret_cast<wchar_t*>(utf16_path_string), _MAX_PATH);
g_free(utf16_path_string);
opf.hwndOwner = (HWND)(GDK_WINDOW_HWND(gtk_widget_get_window(GTK_WIDGET(this))));
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index 75f80ed4a..cb6d92799 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -1068,7 +1068,7 @@ FileSaveDialogImplGtk::FileSaveDialogImplGtk( Gtk::Window &parentWindow,
std::vector<Gtk::Entry *> entries;
findEntryWidgets(cont, entries);
//g_message("Found %d entry widgets\n", entries.size());
- if (entries.size() >=1 )
+ if (!entries.empty())
{
//Catch when user hits [return] on the text field
fileNameEntry = entries[0];
@@ -1080,7 +1080,7 @@ FileSaveDialogImplGtk::FileSaveDialogImplGtk( Gtk::Window &parentWindow,
std::vector<Gtk::Expander *> expanders;
findExpanderWidgets(cont, expanders);
//g_message("Found %d expander widgets\n", expanders.size());
- if (expanders.size() >=1 )
+ if (!expanders.empty())
{
//Always show the file list
Gtk::Expander *expander = expanders[0];
@@ -1639,7 +1639,7 @@ FileExportDialogImpl::FileExportDialogImpl( Gtk::Window& parentWindow,
std::vector<Gtk::Entry *> entries;
findEntryWidgets(cont, entries);
//g_message("Found %d entry widgets\n", entries.size());
- if (entries.size() >=1 )
+ if (!entries.empty())
{
//Catch when user hits [return] on the text field
fileNameEntry = entries[0];
@@ -1651,7 +1651,7 @@ FileExportDialogImpl::FileExportDialogImpl( Gtk::Window& parentWindow,
std::vector<Gtk::Expander *> expanders;
findExpanderWidgets(cont, expanders);
//g_message("Found %d expander widgets\n", expanders.size());
- if (expanders.size() >=1 )
+ if (!expanders.empty())
{
//Always show the file list
Gtk::Expander *expander = expanders[0];
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 989c40264..5afc85f10 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -945,13 +945,11 @@ private:
and all widgets within the setting group are aligned automatically. */
void add_widget(Gtk::Widget* w, const Glib::ustring& label)
{
- Gtk::Label *lbl = 0;
Gtk::HBox *hb = Gtk::manage(new Gtk::HBox);
hb->set_spacing(12);
if(label != "") {
- //lbl = Gtk::manage(new Gtk::Label(label + (label == "" ? "" : ":"), Gtk::ALIGN_LEFT)); colon now in label (LP #358921)
- lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_START));
+ Gtk::Label *lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_START));
hb->pack_start(*lbl, false, false);
_size_group->add_widget(*lbl);
lbl->show();
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index a71227861..84d469750 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -423,12 +423,11 @@ void TextEdit::onSelectionChange()
void TextEdit::updateObjectText ( SPItem *text )
{
GtkTextIter start, end;
- gchar *str;
// write text
if (gtk_text_buffer_get_modified (text_buffer)) {
gtk_text_buffer_get_bounds (text_buffer, &start, &end);
- str = gtk_text_buffer_get_text (text_buffer, &start, &end, TRUE);
+ gchar *str = gtk_text_buffer_get_text (text_buffer, &start, &end, TRUE);
sp_te_set_repr_text_multiline (text, str);
g_free (str);
gtk_text_buffer_set_modified (text_buffer, FALSE);