[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10572: Fix more warnings and hopefu
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10572: Fix more warnings and hopefully the build with older GTK versions |
Date: |
Wed, 11 Feb 2009 23:19:12 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10572
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2009-02-11 23:19:12 +0100
message:
Fix more warnings and hopefully the build with older GTK versions
(error popup).
modified:
gui/gtk.cpp
libbase/tu_file.cpp
=== modified file 'gui/gtk.cpp'
--- a/gui/gtk.cpp 2009-02-11 14:10:33 +0000
+++ b/gui/gtk.cpp 2009-02-11 22:19:12 +0000
@@ -328,7 +328,12 @@
g_signal_connect_swapped(popup, "response", G_CALLBACK(gtk_widget_destroy),
popup);
+#if GTK_CHECK_VERSION(2,14,0)
GtkWidget* content = gtk_dialog_get_content_area(GTK_DIALOG(popup));
+#else
+ GtkWidget* content = GTK_DIALOG(popup)->vbox;
+#endif
+
GtkWidget* label = gtk_label_new(msg.c_str());
gtk_widget_set_size_request(label, 400, 200);
gtk_label_set_line_wrap(GTK_LABEL(label), true);
=== modified file 'libbase/tu_file.cpp'
--- a/libbase/tu_file.cpp 2009-02-11 21:58:37 +0000
+++ b/libbase/tu_file.cpp 2009-02-11 22:19:12 +0000
@@ -38,7 +38,7 @@
// Return the number of bytes actually written.
{
assert(src);
- return std::fwrite( src, 1, bytes, static_cast<FILE*>(m_data));
+ return std::fwrite(src, 1, bytes, static_cast<FILE*>(m_data));
}
bool
@@ -46,7 +46,7 @@
{
// TODO: optimize this by caching total stream size ?
- if (pos > size()) return false;
+ if (static_cast<size_t>(pos) > size()) return false;
FILE* file = static_cast<FILE*>(m_data);
@@ -79,7 +79,7 @@
std::streampos ret = std::ftell(f);
if (ret < 0) throw IOException("Error getting stream position");
- assert(ret <= size());
+ assert(static_cast<size_t>(ret) <= size());
return ret;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10572: Fix more warnings and hopefully the build with older GTK versions,
Benjamin Wolsey <=