[Pkg-octave-commit] [SCM] Debian packaging for qtoctave branch, master, updated. 73e9377560af1f88bc4b9a1d8f0510d73e593497
Sébastien Villemot
sebastien.villemot at ens.fr
Sun Mar 11 16:38:08 UTC 2012
The following commit has been merged in the master branch:
commit 66e2e5c88cc4c5d438355c2de92a6e420f978292
Author: Sébastien Villemot <sebastien.villemot at ens.fr>
Date: Sun Mar 11 17:02:58 2012 +0100
debian/patches/no-native-menubars: new patch imported from Ubuntu
diff --git a/debian/patches/no-native-menubars b/debian/patches/no-native-menubars
new file mode 100644
index 0000000..677b5e5
--- /dev/null
+++ b/debian/patches/no-native-menubars
@@ -0,0 +1,35 @@
+Description: Do not export docked window menubars to desktop panel
+Author: Aurélien Gâteau <aurelien.gateau at canonical.com>
+Forwarded: Sent to http://groups.google.com/group/qtoctave-english
+Bug-Ubuntu: https://bugs.launchpad.net/appmenu-qt/+bug/673210
+Index: qtoctave-0.10.1/qtoctave/src/basewidget.cpp
+===================================================================
+--- qtoctave-0.10.1.orig/qtoctave/src/basewidget.cpp 2011-01-06 22:48:07.000000000 +0100
++++ qtoctave-0.10.1/qtoctave/src/basewidget.cpp 2011-09-14 11:03:11.000000000 +0200
+@@ -30,6 +30,7 @@
+ //setFocusPolicy(Qt::StrongFocus);
+ session=NULL;
+ QWidget *central=new QWidget(this);
++ menuBar()->setNativeMenuBar(false);
+ setCentralWidget(central);
+
+ QMenu *windows_menu=menuBar()->addMenu(tr("View"));
+Index: qtoctave-0.10.1/qtoctave/src/mainwindow.cpp
+===================================================================
+--- qtoctave-0.10.1.orig/qtoctave/src/mainwindow.cpp 2011-01-06 22:48:07.000000000 +0100
++++ qtoctave-0.10.1/qtoctave/src/mainwindow.cpp 2011-09-14 12:03:14.000000000 +0200
+@@ -39,7 +39,13 @@
+ setSession(session);
+ setWindowIcon(QIcon(QString(ICON_PATH) + "/qtoctave.png"));
+
+- menuBar()->clear();
++ //The menubar provided by BaseWidget is set as not-native to avoid showing up
++ //in top-panel menubars on desktops like Unity, but we want a native menubar
++ //here, and we also want to get rid of the generic "View" item BaseWidget
++ //added to the menubar. Setting a new menubar is the simplest way to do this
++ //(the old one gets deleted).
++ //[1] https://bugs.launchpad.net/appmenu-qt/+bug/673210
++ setMenuBar(new QMenuBar());
+
+ setWindowTitle("QtOctave ["+session->getProjectName()+"]");
+ //resize(QSize(800, 600).expandedTo(minimumSizeHint()));
diff --git a/debian/patches/series b/debian/patches/series
index 7f16e4e..29f8d02 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ build-widgetserver
filedialog-filters
qtinfo-octave3.4
initial_position
+no-native-menubars
--
Debian packaging for qtoctave
More information about the Pkg-octave-commit
mailing list