Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
5178cabb
Kaydet (Commit)
5178cabb
authored
Eyl 24, 2012
tarafından
Antonio Fernandez
Kaydeden (comit)
Bjoern Michaelsen
Kas 14, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Extra menu items are removed when needed, but not their actions.
Change-Id: If817b03cc7b30bfeb751e47fff4aa571fdaaafdc
üst
30e4465c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
+24
-9
gtksalmenu.cxx
vcl/unx/gtk/window/gtksalmenu.cxx
+24
-9
No files found.
vcl/unx/gtk/window/gtksalmenu.cxx
Dosyayı görüntüle @
5178cabb
...
...
@@ -171,12 +171,12 @@ void GtkSalMenu::UpdateNativeMenu( )
if
(
nLOMenuSize
==
0
)
g_lo_menu_new_section
(
pLOMenu
,
0
,
NULL
);
sal_
uInt16
nSection
=
0
;
sal_
uInt16
nItemPos
=
0
;
sal_
uInt16
validItems
=
0
;
sal_
uInt16
nItem
;
sal_
Int32
nSection
=
0
;
sal_
Int32
nItemPos
=
0
;
sal_
Int32
validItems
=
0
;
sal_
Int32
nItem
;
for
(
nItem
=
0
;
nItem
<
pMenu
->
GetItemCount
();
nItem
++
)
{
for
(
nItem
=
0
;
nItem
<
(
sal_Int32
)
pMenu
->
GetItemCount
();
nItem
++
)
{
if
(
pMenu
->
IsItemVisible
(
nItem
)
==
sal_False
)
continue
;
...
...
@@ -185,9 +185,13 @@ void GtkSalMenu::UpdateNativeMenu( )
if
(
pSalMenuItem
->
mnType
==
MENUITEM_SEPARATOR
)
{
while
(
nItemPos
<
g_lo_menu_get_n_items_from_section
(
pLOMenu
,
nSection
)
)
g_lo_menu_remove_from_section
(
pLOMenu
,
nSection
,
nItemPos
);
// Delete extra items from current section.
sal_uInt16
nSectionItems
=
g_lo_menu_get_n_items_from_section
(
pLOMenu
,
nSection
);
while
(
nSectionItems
>
validItems
)
// FIXME Remove associated command if needed.
g_lo_menu_remove_from_section
(
pLOMenu
,
nSection
,
--
nSectionItems
);
nSection
++
;
nItemPos
=
0
;
validItems
=
0
;
...
...
@@ -279,6 +283,17 @@ void GtkSalMenu::UpdateNativeMenu( )
SAL_INFO
(
"vcl.unity"
,
"nSection "
<<
nSection
<<
" model sections "
<<
g_menu_model_get_n_items
(
G_MENU_MODEL
(
pLOMenu
)
));
g_lo_menu_remove
(
pLOMenu
,
nSection
);
}
// Delete extra items in last section.
sal_Int32
nSectionItems
=
(
sal_Int32
)
g_lo_menu_get_n_items_from_section
(
pLOMenu
,
nSection
);
while
(
nSectionItems
>
validItems
)
g_lo_menu_remove_from_section
(
pLOMenu
,
nSection
,
--
nSectionItems
);
// Delete extra sections.
for
(
sal_Int32
n
=
nLOMenuSize
-
1
;
n
>
nSection
;
)
// FIXME Remove associated command if needed.
g_lo_menu_remove
(
pLOMenu
,
n
--
);
}
void
GtkSalMenu
::
DisconnectFrame
()
...
...
@@ -630,7 +645,7 @@ void GtkSalMenu::EnableItem( unsigned nPos, sal_Bool bEnable )
void
GtkSalMenu
::
ShowItem
(
unsigned
nPos
,
sal_Bool
bShow
)
{
if
(
nPos
<
maItems
.
size
()
)
(
(
GtkSalMenuItem
*
)
maItems
[
nPos
])
->
mbVisible
=
bShow
;
(
(
GtkSalMenuItem
*
)
maItems
[
nPos
]
)
->
mbVisible
=
bShow
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment