From 0b0df86bc68c3755bcef970b28214a8e6b9d9cd3 Mon Sep 17 00:00:00 2001 From: Fabien Bodard Date: Tue, 10 Nov 2009 13:41:32 +0000 Subject: [PATCH] [GB.QT4] * NEW: Now in the tabstrip, the Align.Left and Align.Right Orientation are allowed. [GB.GTK] * NEW: Now in the tabstrip, the Align.Left and Align.Right Orientation are allowed. git-svn-id: svn://localhost/gambas/trunk@2415 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- app/src/gambas3/.lang/.pot | 118 ++++++++++++++----------------- app/src/gbs3/.settings | 11 ++- gb.desktop/src/gb.desktop/.info | 100 -------------------------- gb.desktop/src/gb.desktop/.list | 4 -- gb.gtk/src/CTabStrip.cpp | 23 ++++-- gb.gtk/src/gtabstrip.cpp | 14 +--- gb.qt/share/gb.form.properties.h | 2 +- gb.qt4/src/CTabStrip.cpp | 20 +++++- 8 files changed, 99 insertions(+), 193 deletions(-) diff --git a/app/src/gambas3/.lang/.pot b/app/src/gambas3/.lang/.pot index 1f0210051..860b7a29e 100644 --- a/app/src/gambas3/.lang/.pot +++ b/app/src/gambas3/.lang/.pot @@ -10,34 +10,6 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: CComponentBox.class:92 -msgid "Experimental" -msgstr "" - -#: CComponentBox.class:94 FPropertyProject.class:1884 -msgid "Not finished but stable" -msgstr "" - -#: CComponentBox.class:200 ProjectItem.class:62 -msgid "Authors" -msgstr "" - -#: CComponentBox.class:207 FPropertyProject.class:2082 -msgid "Requires" -msgstr "" - -#: CComponentBox.class:209 -msgid "Excludes" -msgstr "" - -#: CComponentBox.class:215 -msgid "Implements" -msgstr "" - -#: CComponentBox.class:228 FPropertyProject.class:2057 -msgid "Provides" -msgstr "" - #: CComponent.class:63 msgid "Internal native classes" msgstr "" @@ -290,6 +262,34 @@ msgstr "" msgid "Loading information on component &1..." msgstr "" +#: CComponentBox.class:92 +msgid "Experimental" +msgstr "" + +#: CComponentBox.class:94 FPropertyProject.class:1884 +msgid "Not finished but stable" +msgstr "" + +#: CComponentBox.class:200 ProjectItem.class:62 +msgid "Authors" +msgstr "" + +#: CComponentBox.class:207 FPropertyProject.class:2082 +msgid "Requires" +msgstr "" + +#: CComponentBox.class:209 +msgid "Excludes" +msgstr "" + +#: CComponentBox.class:215 +msgid "Implements" +msgstr "" + +#: CComponentBox.class:228 FPropertyProject.class:2057 +msgid "Provides" +msgstr "" + #: CModule.class:28 FCreateFile.class:625 FEditor.class:3376 FForm.class:3519 #: FInfo.class:88 msgid "Form" @@ -434,15 +434,15 @@ msgstr "" #: FColorChooser.class:203 FCommit.class:397 FConflict.class:191 #: FConnectionEditor.class:261 FCreateFile.class:885 FDebugInfo.class:492 -#: FEditor.class:2128 FFindList.class:195 FFind.class:114 +#: FEditor.class:2128 FFind.class:114 FFindList.class:195 #: FFontChooser.class:86 FForm.class:2821 FGotoLine.class:63 #: FIconEditor.class:1393 FImportTable.class:38 FList.class:155 #: FMain.class:203 FMakeExecutable.class:142 FMakeInstall.class:309 #: FMenu.class:1097 FNewConnection.class:317 FNewTable.class:167 #: FNewTranslation.class:70 FOpenProject.class:146 FPasteSpecial.class:279 #: FPropertyProject.class:1236 FSave.class:118 FSelectExtraFile.class:78 -#: FSelectIcon.class:271 FTableChooser.class:145 FTextEditor.class:462 -#: FText.class:107 FTranslate.class:606 Project.module:327 +#: FSelectIcon.class:271 FTableChooser.class:145 FText.class:107 +#: FTextEditor.class:462 FTranslate.class:606 Project.module:327 msgid "Cancel" msgstr "" @@ -1324,18 +1324,6 @@ msgstr "" msgid "Procedure list" msgstr "" -#: FFindList.class:75 -msgid "Column" -msgstr "" - -#: FFindList.class:238 -msgid "Find list" -msgstr "" - -#: FFindList.class:273 FFind.class:395 FOutput.class:309 FTranslate.class:567 -msgid "Search string cannot be found." -msgstr "" - #: FFind.class:114 msgid "Are you sure to want to replace all?" msgstr "" @@ -1344,6 +1332,10 @@ msgstr "" msgid "Replace" msgstr "" +#: FFind.class:395 FFindList.class:273 FOutput.class:309 FTranslate.class:567 +msgid "Search string cannot be found." +msgstr "" + #: FFind.class:397 msgid "Search string replaced once." msgstr "" @@ -1400,6 +1392,14 @@ msgstr "" msgid "Search in strings" msgstr "" +#: FFindList.class:75 +msgid "Column" +msgstr "" + +#: FFindList.class:238 +msgid "Find list" +msgstr "" + #: FFontChooser.class:57 msgid "Select a font" msgstr "" @@ -3155,10 +3155,6 @@ msgstr "" msgid "Clipboard contents" msgstr "" -#: FProjectItem.class:20 FPropertyProject.class:1644 -msgid "Author(s)" -msgstr "" - #: FProperty.class:346 msgid "Forbidden characters in control name." msgstr "" @@ -3260,6 +3256,10 @@ msgstr "" msgid "Version" msgstr "" +#: FPropertyProject.class:1644 +msgid "Author(s)" +msgstr "" + #: FPropertyProject.class:1659 msgid "Edition" msgstr "" @@ -3446,10 +3446,6 @@ msgstr "" msgid "Connection" msgstr "" -#: FTextEditor.class:764 -msgid "Text editor" -msgstr "" - #: FText.class:77 msgid "Edit text property" msgstr "" @@ -3458,6 +3454,10 @@ msgstr "" msgid "Use a fixed font" msgstr "" +#: FTextEditor.class:764 +msgid "Text editor" +msgstr "" + #: FTips.class:47 msgid "Tip of the day" msgstr "" @@ -4762,18 +4762,6 @@ msgstr "" msgid "'tar' has returned the following error code:" msgstr "" -#: ProjectItem.class:62 -msgid "Author" -msgstr "" - -#: .project:1 -msgid "Gambas 3" -msgstr "" - -#: .project:2 -msgid "Integrated Development Environment for Gambas" -msgstr "" - #: Project.module:145 msgid "Automation" msgstr "" @@ -5079,6 +5067,10 @@ msgstr "" msgid "Unable to update all forms." msgstr "" +#: ProjectItem.class:62 +msgid "Author" +msgstr "" + #: Save.module:38 msgid "Cannot save file !" msgstr "" diff --git a/app/src/gbs3/.settings b/app/src/gbs3/.settings index d924c10ef..e8e50d83c 100644 --- a/app/src/gbs3/.settings +++ b/app/src/gbs3/.settings @@ -42,12 +42,11 @@ SearchComment=False SearchString=True [OpenFile] -File[1]="/home/benoit/gambas/3.0/trunk/app/src/gbs3/.src/MMain.module:109.0" -Active=2 -File[2]="/home/benoit/gambas/3.0/trunk/app/src/gbs3/.src/CComponent.class:33.7" -File[3]="/home/benoit/gambas/3.0/trunk/app/src/gbs3/.src/MServerPage.module:33.0" -File[4]="/home/benoit/gambas/3.0/trunk/app/src/gbs3/helptext:8.11" -Count=4 +Active=1 +File[1]="/home/fabien/gambas/app/src/gbs3/.src/MMain.module:109.0" +File[2]="/home/fabien/gambas/app/src/gbs3/.src/CComponent.class:33.7" +File[3]="/home/fabien/gambas/app/src/gbs3/.src/MServerPage.module:33.0" +Count=3 [Watches] Count=0 diff --git a/gb.desktop/src/gb.desktop/.info b/gb.desktop/src/gb.desktop/.info index 282776afd..4cf497983 100644 --- a/gb.desktop/src/gb.desktop/.info +++ b/gb.desktop/src/gb.desktop/.info @@ -294,103 +294,3 @@ Resize m (Width)i(Height)i -#_DesktopPasswords - -CA -_get -m -s -(Key)s -_put -m - -(Value)s(Key)s -#_DesktopScreenSaver - -CA -Enabled -R -b - -Suspend -M - -(Window)Window; -Resume -M - -(Window)Window; -Activate -M - - -Lock -M - - -Reset -M - - -#_DesktopVirtual - -C -X -r -i - -Y -r -i - -Width -r -i - -Height -r -i - -Index -r -i - -Name -p -s - -Refresh -m - - -_new -m - -(iIndex)i -#_DesktopWindows - -CA -Count -r -i - -_new -m - - -Refresh -m - - -_get -m -DesktopWindow -(Index)i -FromHandle -m -DesktopWindow -(Window)i -_next -m -DesktopWindow - diff --git a/gb.desktop/src/gb.desktop/.list b/gb.desktop/src/gb.desktop/.list index 6d8c931be..baf165f2d 100644 --- a/gb.desktop/src/gb.desktop/.list +++ b/gb.desktop/src/gb.desktop/.list @@ -2,7 +2,3 @@ Desktop DesktopFile DesktopWatcher DesktopWindow -_DesktopPasswords -_DesktopScreenSaver -_DesktopVirtual -_DesktopWindows diff --git a/gb.gtk/src/CTabStrip.cpp b/gb.gtk/src/CTabStrip.cpp index 54aa042e2..79eb4a6de 100644 --- a/gb.gtk/src/CTabStrip.cpp +++ b/gb.gtk/src/CTabStrip.cpp @@ -115,10 +115,25 @@ END_METHOD BEGIN_PROPERTY(CTABSTRIP_orientation) if (READ_PROPERTY) - GB.ReturnInteger(TABSTRIP->orientation() ? ALIGN_BOTTOM : ALIGN_TOP); - else - TABSTRIP->setOrientation(VPROP(GB_BOOLEAN) ? ALIGN_BOTTOM : ALIGN_TOP); - + switch (TABSTRIP->orientation()) + { + case GTK_POS_TOP: GB.ReturnInteger(ALIGN_TOP); break; + case GTK_POS_BOTTOM: GB.ReturnInteger(ALIGN_BOTTOM); break; + case GTK_POS_LEFT: GB.ReturnInteger(ALIGN_LEFT); break; + case GTK_POS_RIGHT: GB.ReturnInteger(ALIGN_RIGHT); break; + default: GB.ReturnInteger(ALIGN_NORMAL); break; + } + + else + switch (VPROP(GB_INTEGER)) + { + case ALIGN_TOP: TABSTRIP->setOrientation(GTK_POS_TOP); break; + case ALIGN_BOTTOM: TABSTRIP->setOrientation(GTK_POS_BOTTOM); break; + case ALIGN_LEFT: TABSTRIP->setOrientation(GTK_POS_LEFT); break; + case ALIGN_RIGHT: TABSTRIP->setOrientation(GTK_POS_RIGHT); break; + + } + END_PROPERTY diff --git a/gb.gtk/src/gtabstrip.cpp b/gb.gtk/src/gtabstrip.cpp index 053d38561..a2aee6206 100644 --- a/gb.gtk/src/gtabstrip.cpp +++ b/gb.gtk/src/gtabstrip.cpp @@ -388,11 +388,7 @@ void gTabStrip::setIndex(int vl) int gTabStrip::orientation() { - switch ( gtk_notebook_get_tab_pos(GTK_NOTEBOOK(border)) ) - { - case GTK_POS_TOP: return 0; - default: return 1; - } + return gtk_notebook_get_tab_pos(GTK_NOTEBOOK(border)); } void gTabStrip::destroyTab(int ind) @@ -461,13 +457,7 @@ bool gTabStrip::setCount(int vl) void gTabStrip::setOrientation(int vl) { - switch (vl) - { - case 0: - gtk_notebook_set_tab_pos(GTK_NOTEBOOK(border),GTK_POS_TOP); break; - case 1: - gtk_notebook_set_tab_pos(GTK_NOTEBOOK(border),GTK_POS_BOTTOM); break; - } + gtk_notebook_set_tab_pos(GTK_NOTEBOOK(border),GtkPositionType(vl)); } gPicture* gTabStrip::tabPicture(int ind) diff --git a/gb.qt/share/gb.form.properties.h b/gb.qt/share/gb.form.properties.h index 07836501a..c2d1be01c 100644 --- a/gb.qt/share/gb.form.properties.h +++ b/gb.qt/share/gb.form.properties.h @@ -64,7 +64,7 @@ #define CHSPLIT_PROPERTIES "*" #define CVSPLIT_PROPERTIES "*" #define CFRAME_PROPERTIES "*,Text" -#define CTABSTRIP_PROPERTIES "*," CARRANGEMENT_PROPERTIES ",Count{Range:1;256}=1,Index,Text,Picture,Orientation{Align.Top;Bottom}" +#define CTABSTRIP_PROPERTIES "*," CARRANGEMENT_PROPERTIES ",Count{Range:1;256}=1,Index,Text,Picture,Orientation{Align.Top;Bottom;Left;Right}" #define CWINDOW_PROPERTIES "*,Action,Text,Icon,Picture,Mask,Persistent,Resizable=True,Border=True,Type{WindowType.*}=Normal,Stacking{Window.Normal;Above;Below}=Normal,Minimized,Maximized,FullScreen,Sticky,SkipTaskbar," CWINDOW_ARRANGEMENT_PROPERTIES #define CMOVIEBOX_PROPERTIES "*,Path,Playing,Border{Border.*}" #define CPROGRESSBAR_PROPERTIES "*,Action,Label=True" diff --git a/gb.qt4/src/CTabStrip.cpp b/gb.qt4/src/CTabStrip.cpp index 3ea05674e..19ec0dd36 100644 --- a/gb.qt4/src/CTabStrip.cpp +++ b/gb.qt4/src/CTabStrip.cpp @@ -425,10 +425,24 @@ END_METHOD BEGIN_PROPERTY(CTABSTRIP_orientation) - if (READ_PROPERTY) - GB.ReturnInteger(WIDGET->tabPosition() == QTabWidget::North ? ALIGN_TOP : ALIGN_BOTTOM); + if (READ_PROPERTY) + switch(WIDGET->tabPosition()) + { + case QTabWidget::North: GB.ReturnInteger(ALIGN_TOP); break; + case QTabWidget::South: GB.ReturnInteger(ALIGN_BOTTOM); break; + case QTabWidget::West: GB.ReturnInteger(ALIGN_LEFT); break; + case QTabWidget::East: GB.ReturnInteger(ALIGN_RIGHT); break; + default: GB.ReturnInteger(ALIGN_NORMAL); break; + } + else - WIDGET->setTabPosition(VPROP(GB_INTEGER) == ALIGN_BOTTOM ? QTabWidget::South : QTabWidget::North); + switch(VPROP(GB_INTEGER)) + { + case ALIGN_TOP: WIDGET->setTabPosition(QTabWidget::North); break; + case ALIGN_BOTTOM: WIDGET->setTabPosition(QTabWidget::South); break; + case ALIGN_LEFT: WIDGET->setTabPosition(QTabWidget::West); break; + case ALIGN_RIGHT: WIDGET->setTabPosition(QTabWidget::East); break; + } END_PROPERTY