Re: [PATCH 4/4] Port to gtkmm 3.0 and gtksourceviewmm 3.0
- From: Dodji Seketeli <dodji seketeli org>
- To: The mailing list of the Nemiver project <nemiver-list gnome org>
- Cc: Kalev Lember <kalev smartlink ee>
- Subject: Re: [PATCH 4/4] Port to gtkmm 3.0 and gtksourceviewmm 3.0
- Date: Mon, 16 May 2011 12:28:12 +0200
Hey Kalev,
Thank you for this great patch. I have tested it and it works for me.
I have a couple of comments, though.
> * configure.ac: Require gtkmm-3.0, gtksourceviewmm-3.0,
> gtk+-3.0, and vte-2.90.
> * src/persp/dbgperspective/nmv-breakpoints-view.cc:
> * src/persp/dbgperspective/nmv-call-function-dialog.cc:
> * src/persp/dbgperspective/nmv-call-stack.cc:
> * src/persp/dbgperspective/nmv-file-list.[cc,h]:
> * src/persp/dbgperspective/nmv-local-vars-inspector.cc:
> * src/persp/dbgperspective/nmv-open-file-dialog.[cc,h]:
> * src/persp/dbgperspective/nmv-registers-view.cc:
> * src/persp/dbgperspective/nmv-thread-list.cc:
> * src/persp/dbgperspective/nmv-var-inspector-dialog.cc:
> * src/persp/dbgperspective/nmv-variables-utils.cc:
> * src/persp/dbgperspective/nmv-vars-treeview.cc:
> * src/persp/dbgperspective/ui/callfunctiondialog.ui:
> * src/persp/dbgperspective/ui/findtextdialog.ui:
> * src/persp/dbgperspective/ui/varinspectordialog.ui:
> * src/uicommon/nmv-dialog.cc:
> * src/uicommon/nmv-popup-tip.cc:
> * src/uicommon/nmv-terminal.[cc,h]:
> * src/workbench/nmv-workbench.cc: Port to gtkmm-3.0.
> * src/persp/dbgperspective/nmv-dbg-perspective.cc:
> * src/persp/dbgperspective/nmv-find-text-dialog.cc:
> * src/persp/dbgperspective/nmv-preferences-dialog.cc:
> * src/uicommon/nmv-source-editor.cc:
> * src/uicommon/nmv-source-editor.h: Port to
> gtksourceviewmm-3.0.
>
I would update this commit log to make it more precise about the
changes, as you did for the previous patches. I know this is tedious
for such a patch, but I think it's needed. If you don't have time,
I'll do it when I commit the patch.
[...]
> diff --git a/configure.ac b/configure.ac
> index fe0e7c3..67aa4cf 100644
> --- a/configure.ac
> +++ b/configure.ac
[...]
To make this compile on my system, I have added this hunk to the
changes of the configure.ac file:
@@ -62,4 +62,4 @@ GCONF_VERSION=2.14.0
AC_SUBST([GCONF_VERSION])
CPPUNIT_VERSION=1.10.0
AC_SUBST([CPPUNIT_VERSION])
-GTKHEX_VERSION=2.21.4
+GTKHEX_VERSION=2.99
In case i have ghex installed, it forces the build system to avoid
picking it, otherwise, we try to compile the memory view against a ghex
that is not ported to gtk3 yet and that breaks the build. When ghex is
ported to gtk3, we can change the version number to the correct one.
[...]
> diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
> index 609ab56..568dc64 100644
> --- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
> +++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
> @@ -39,13 +39,14 @@
> #include <giomm/contenttype.h>
>
> #include <gtksourceviewmm/init.h>
> -#include <gtksourceviewmm/sourcelanguagemanager.h>
> -#include <gtksourceviewmm/sourcestyleschememanager.h>
> +#include <gtksourceviewmm/languagemanager.h>
> +#include <gtksourceviewmm/styleschememanager.h>
>
> #include <pangomm/fontdescription.h>
> #include <gtkmm/clipboard.h>
> #include <gtkmm/separatortoolitem.h>
> #include <gdkmm/cursor.h>
> +#include <gdkmm/devicemanager.h>
> #include <gtk/gtk.h>
> #include "common/nmv-safe-ptr-utils.h"
> #include "common/nmv-env.h"
> @@ -94,7 +95,7 @@ using namespace std;
> using namespace nemiver::common;
> using namespace nemiver::debugger_utils;
> using namespace nemiver::ui_utils;
> -using namespace gtksourceview;
> +using namespace Gsv;
>
> NEMIVER_BEGIN_NAMESPACE (nemiver)
>
> @@ -191,14 +192,14 @@ private:
> // limit though. When we reach the screen border, we don't want the
> // container to grow past the border. At that point, the user will have
> // to scroll.
> - virtual void on_size_request (Gtk::Requisition *req)
> + virtual void get_preferred_height_vfunc (int &minimum_height,
> + int &natural_height) const
> {
> LOG_FUNCTION_SCOPE_NORMAL_DD
> NEMIVER_TRY
>
> - Gtk::ScrolledWindow::on_size_request (req);
> -
> if (!get_realized ()) {
> + Gtk::ScrolledWindow::get_preferred_width_vfunc (minimum_height, natural_height);
Shouldn't we call Gtk::ScrolledWindow::get_preferred_heigth_vfunc
instead of Gtk::ScrolledWindow::get_preferred_width_vfunc? Also, the
line is longer than 80 characters, so please consider filling it to 80
characters at most.
[...]
> diff --git a/src/persp/dbgperspective/nmv-file-list.cc b/src/persp/dbgperspective/nmv-file-list.cc
> index 01e97cd..e3974c7 100644
> --- a/src/persp/dbgperspective/nmv-file-list.cc
> +++ b/src/persp/dbgperspective/nmv-file-list.cc
> @@ -53,7 +53,7 @@ public:
[...]
> + m_menu_popup.append(*menu_item);
A space is missing between the append and the parenthesis. There are
several occurrences of this in the changes of this file.
[...]
> diff --git a/src/uicommon/nmv-source-editor.cc b/src/uicommon/nmv-source-editor.cc
> index bf0be28..2108d6d 100644
> --- a/src/uicommon/nmv-source-editor.cc
> +++ b/src/uicommon/nmv-source-editor.cc
[...]
> -class SourceView : public gtksourceview::SourceView
> +class View : public Gsv::View
> {
It seems to me that renaming SourceView into View gives a too general
name to this type as we have have several types of views in Nemiver.
But I guess we can deal with this later (if needed) by introducing a
namespace "source" here or something. Let's go with your change for
now then.
Thanks.
--
Dodji
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]