[mlview] Bring mlview back to live wrt gcc 4.4



commit 0b113e4bf6add76fa7c23d3bad31eb7217632eb6
Author: Dodji Seketeli <dodji redhat com>
Date:   Wed Jul 1 20:59:49 2009 +0200

    Bring mlview back to live wrt gcc 4.4
    
    	* configure.in: Bump to 0.10
    	Cleanup to make it pass autogen.sh
    	* src/mlview-editor.cc (Editor::select_view_to_open):
    	Don't cast int into enum.
    	* src/mlview-validator.cc (ViewManager::get_views_of_document):
    	Avoid returning a non initialized variable.
    	(ViewManager::select_view_to_open): Don't cast int into enum.
    	* src/recent-files/egg-recent-util.c (egg_recent_util_get_unique_id):
    	Use the right variable.

 ChangeLog                          |   12 ++++++++++++
 configure.in                       |    6 ++----
 src/mlview-editor.cc               |    5 ++---
 src/mlview-validator-window.cc     |    2 --
 src/mlview-validator.cc            |    3 +++
 src/mlview-view-manager.cc         |    9 ++++-----
 src/recent-files/egg-recent-util.c |    2 +-
 7 files changed, 24 insertions(+), 15 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3dcb9cf..b833a8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-07-01  Dodji Seketeli  <dodji gnome org>
+
+	* configure.in: Bump to 0.10
+	Cleanup to make it pass autogen.sh
+	* src/mlview-editor.cc (Editor::select_view_to_open):
+	Don't cast int into enum.
+	* src/mlview-validator.cc (ViewManager::get_views_of_document):
+	Avoid returning a non initialized variable.
+	(ViewManager::select_view_to_open): Don't cast int into enum.
+	* src/recent-files/egg-recent-util.c (egg_recent_util_get_unique_id):
+	Use the right variable.
+
 2008-01-18  Gil Forcada  <gforcada gnome org>
 
 	* configure.in: Added missing languages codes to ALL_LINGUAS.
diff --git a/configure.in b/configure.in
index 06b3620..177727c 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
 dnl **************************************************************
 dnl Process this file with autoconf to produce a configure script.
 dnl **************************************************************
-AC_INIT(mlview,0.9.0, http://bugzilla.gnome.org/enter_bug.cgi?product=mlview)
+AC_INIT(mlview,0.9.0)
 AC_PREREQ(2.59)
 AC_CONFIG_SRCDIR(src/main.cc)
 AC_CANONICAL_TARGET
@@ -10,7 +10,7 @@ AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 AM_CONFIG_HEADER(config.h)
 
 MLVIEW_MAJOR_VERSION=0
-MLVIEW_MINOR_VERSION=9
+MLVIEW_MINOR_VERSION=10
 MLVIEW_MICRO_VERSION=0
 
 
@@ -77,11 +77,9 @@ MLVIEW_VERSION_NUMBER=`expr $MLVIEW_MAJOR_VERSION \
 MLVIEW_EXE=$prefix/bin/mlv
 AC_SUBST(MLVIEW_VERSION_NUMBER)
 AC_SUBST(MLVIEW_VERSION)
-AC_SUBST(AC_PACKAGE_VERSION)
 AC_SUBST(LIBMLVIEW_VERSION_NUMBER)
 AC_SUBST(LIBMLVIEW_VERSION_INFO)
 AC_SUBST(LIBMLVIEW_VERSION)
-AC_SUBST(AC_PACKAGE_VERSION)
 AC_SUBST(MLVIEW_EXE)
 
 dnl *********************
diff --git a/src/mlview-editor.cc b/src/mlview-editor.cc
index bc48206..ed9b2cf 100644
--- a/src/mlview-editor.cc
+++ b/src/mlview-editor.cc
@@ -352,7 +352,7 @@ Editor::select_view_to_open (void)
 	GtkWidget *button6 = NULL ;
 	GtkWidget *sel_menu_item = NULL ;
 
-	enum MLVIEW_SELECTED_BUTTON button;
+	int button;
 	ViewDescriptor const *result = NULL;
 	ViewDescriptor const *view_desc_ptr = NULL ;
 	gchar *base_name = NULL;
@@ -421,8 +421,7 @@ Editor::select_view_to_open (void)
 	GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT);
 
 	/* show dialog */
-	button = (enum MLVIEW_SELECTED_BUTTON)
-	         gtk_dialog_run (GTK_DIALOG (dialog));
+	button = gtk_dialog_run (GTK_DIALOG (dialog));
 
 
 	switch (button) {
diff --git a/src/mlview-validator-window.cc b/src/mlview-validator-window.cc
index 6c863e9..ec3c726 100644
--- a/src/mlview-validator-window.cc
+++ b/src/mlview-validator-window.cc
@@ -23,9 +23,7 @@
  *See COPYRIGHT file for copyright information.
  */
 #include <string.h>
-
 #include <glade/glade.h>
-
 #include "mlview-validator-window.h"
 #include "mlview-validator.h"
 
diff --git a/src/mlview-validator.cc b/src/mlview-validator.cc
index 3712962..77ec4c3 100644
--- a/src/mlview-validator.cc
+++ b/src/mlview-validator.cc
@@ -23,9 +23,12 @@
  *See COPYRIGHT file for copyright information.
  */
 
+#include <memory>
 #include "mlview-validator.h"
 #include "mlview-safe-ptr-utils.h"
 
+using namespace std;
+
 #define MESSAGE_LINE_LENGTH 55
 namespace mlview
 {
diff --git a/src/mlview-view-manager.cc b/src/mlview-view-manager.cc
index 7df4e03..e6a7cb4 100644
--- a/src/mlview-view-manager.cc
+++ b/src/mlview-view-manager.cc
@@ -523,13 +523,13 @@ list<IView*>
 ViewManager::get_views_of_document (const MlViewXMLDocument *a_doc) const
 {
 	THROW_IF_FAIL (a_doc) ;
-	list<IView*> *result ;
+	list<IView*> *result = 0;
 
 	DocToViewsMap::iterator it = m_priv->doc_to_views_map.find
 	                             (const_cast<MlViewXMLDocument*>(a_doc))  ;
 
 	if (it == m_priv->doc_to_views_map.end ()) {
-		return *result ;
+		return list<IView*> ();
 	}
 	result = it->second ;
 	return *result ;
@@ -641,7 +641,7 @@ ViewManager::select_view_to_open (void)
 	GtkWidget *button6 = NULL ;
 	GtkWidget *sel_menu_item = NULL ;
 
-	enum MLVIEW_SELECTED_BUTTON button;
+	int button;
 	struct ViewDescriptor *result = NULL;
 	ViewDescriptor const *view_desc_ptr = NULL ;
 	gchar *base_name = NULL;
@@ -714,8 +714,7 @@ ViewManager::select_view_to_open (void)
 	GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT);
 
 	/* show dialog */
-	button = (enum MLVIEW_SELECTED_BUTTON)
-	         gtk_dialog_run (GTK_DIALOG (dialog));
+	button = gtk_dialog_run (GTK_DIALOG (dialog));
 
 
 	switch (button) {
diff --git a/src/recent-files/egg-recent-util.c b/src/recent-files/egg-recent-util.c
index 6780cd1..8eb13ff 100644
--- a/src/recent-files/egg-recent-util.c
+++ b/src/recent-files/egg-recent-util.c
@@ -134,5 +134,5 @@ egg_recent_util_get_unique_id (void)
 	rand = g_random_int ();
 	pid = getpid ();
 
-	return g_strdup_printf ("%s-%d-%d-%d", hostname, (int)time, (int)rand, (int)pid);
+	return g_strdup_printf ("%s-%d-%d-%d", hostname, (int)the_time, (int)rand, (int)pid);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]