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
b5615905
Kaydet (Commit)
b5615905
authored
Eki 15, 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
Added a hack to make "Slide Show" menu item on "Slide Show" menu work.
Change-Id: I6c3865227702325e7f1545be893eb05b19c2e09f
üst
097e8668
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
11 deletions
+26
-11
gtksalmenu.cxx
vcl/unx/gtk/window/gtksalmenu.cxx
+26
-11
No files found.
vcl/unx/gtk/window/gtksalmenu.cxx
Dosyayı görüntüle @
b5615905
...
...
@@ -39,17 +39,29 @@
static
sal_Bool
bMenuVisibility
=
sal_False
;
/*
* This function generates an alternative command name to avoid name collisions
* or to give a valid command name to certain menu items.
*/
static
gchar
*
GetCommandForSpecialItem
(
GtkSalMenuItem
*
pSalMenuItem
)
{
gchar
*
aCommand
=
NULL
;
sal_uInt16
nId
=
pSalMenuItem
->
mnId
;
Menu
*
pMenu
=
pSalMenuItem
->
mpVCLMenu
;
// If item belongs to window list, generate a command with "window-(id)" format.
if
(
(
nId
>=
START_ITEMID_WINDOWLIST
)
&&
(
nId
<=
END_ITEMID_WINDOWLIST
)
)
{
aCommand
=
g_strdup_printf
(
"window-%d"
,
nId
);
}
else
if
(
pMenu
)
{
rtl
::
OUString
aMenuCommand
=
pMenu
->
GetItemCommand
(
nId
);
MenuItemBits
nBits
=
pMenu
->
GetItemBits
(
nId
);
if
(
aMenuCommand
.
equalsAscii
(
".uno:Presentation"
)
&&
nBits
==
0
)
aCommand
=
g_strdup
(
".uno:Presentation2"
);
}
return
aCommand
;
}
...
...
@@ -303,7 +315,8 @@ void GtkSalMenu::UpdateNativeMenu()
// Convert internal values to native values.
gboolean
bChecked
=
(
itemChecked
==
sal_True
)
?
TRUE
:
FALSE
;
gboolean
bEnabled
=
(
itemEnabled
==
sal_True
)
?
TRUE
:
FALSE
;
gchar
*
aNativeCommand
=
g_strdup
(
rtl
::
OUStringToOString
(
aCommand
,
RTL_TEXTENCODING_UTF8
).
getStr
()
);
// gchar* aNativeCommand = g_strdup( rtl::OUStringToOString( aCommand, RTL_TEXTENCODING_UTF8 ).getStr() );
gchar
*
aNativeCommand
=
GetCommandForSpecialItem
(
pSalMenuItem
);
// Store current item command in command list.
gchar
*
aCurrentCommand
=
g_lo_menu_get_command_from_item_in_section
(
pLOMenu
,
nSection
,
nItemPos
);
...
...
@@ -316,15 +329,17 @@ void GtkSalMenu::UpdateNativeMenu()
NativeSetAccelerator
(
nSection
,
nItemPos
,
nAccelKey
,
nAccelKey
.
GetName
(
GetFrame
()
->
GetWindow
()
)
);
// Some items are special, so they have different commands.
if
(
g_strcmp0
(
aNativeCommand
,
""
)
==
0
)
// if ( g_strcmp0( aNativeCommand, "" ) == 0 )
if
(
!
aNativeCommand
)
{
gchar
*
aSpecialItemCmd
=
GetCommandForSpecialItem
(
pSalMenuItem
);
if
(
aSpecialItemCmd
!=
NULL
)
{
g_free
(
aNativeCommand
);
aNativeCommand
=
aSpecialItemCmd
;
}
// gchar *aSpecialItemCmd = GetCommandForSpecialItem( pSalMenuItem );
aNativeCommand
=
g_strdup
(
rtl
::
OUStringToOString
(
aCommand
,
RTL_TEXTENCODING_UTF8
).
getStr
()
);
// if ( aSpecialItemCmd != NULL )
// {
// g_free( aNativeCommand );
// aNativeCommand = aSpecialItemCmd;
// }
}
if
(
g_strcmp0
(
aNativeCommand
,
""
)
!=
0
&&
pSalMenuItem
->
mpSubMenu
==
NULL
)
...
...
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