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
26d092b3
Kaydet (Commit)
26d092b3
authored
Nis 19, 2013
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
lp#1085169: we overactivate here, as it does not seem to hurt
Change-Id: I4f6e76347c5c9b5c67a09b8c3dcd1b1708e8e703
üst
bffb03fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
19 deletions
+23
-19
gtksalmenu.hxx
vcl/inc/unx/gtk/gtksalmenu.hxx
+2
-1
gloactiongroup.cxx
vcl/unx/gtk/window/gloactiongroup.cxx
+4
-3
gtksalmenu.cxx
vcl/unx/gtk/window/gtksalmenu.cxx
+17
-15
No files found.
vcl/inc/unx/gtk/gtksalmenu.hxx
Dosyayı görüntüle @
26d092b3
...
...
@@ -52,6 +52,7 @@ private:
GtkSalMenu
*
GetMenuForItemCommand
(
gchar
*
aCommand
,
gboolean
bGetSubmenu
);
void
ImplUpdate
(
gboolean
bRecurse
);
void
ActivateAllSubmenus
(
MenuBar
*
pMenuBar
);
public
:
GtkSalMenu
(
sal_Bool
bMenuBar
);
...
...
@@ -97,7 +98,7 @@ public:
void
NativeSetAccelerator
(
unsigned
nSection
,
unsigned
nItemPos
,
const
KeyCode
&
rKeyCode
,
const
OUString
&
rKeyName
);
void
DispatchCommand
(
gint
itemId
,
const
gchar
*
aCommand
);
void
Activate
(
const
gchar
*
aMenuCommand
);
void
Activate
();
void
Deactivate
(
const
gchar
*
aMenuCommand
);
void
Display
(
sal_Bool
bVisible
);
bool
PrepUpdate
();
...
...
vcl/unx/gtk/window/gloactiongroup.cxx
Dosyayı görüntüle @
26d092b3
...
...
@@ -167,20 +167,22 @@ g_lo_action_group_perform_submenu_action (GLOActionGroup *group,
const
gchar
*
action_name
,
GVariant
*
state
)
{
SAL_INFO
(
"vcl.unity"
,
"g_lo_action_group_perform_submenu_action on "
<<
group
);
GtkSalFrame
*
pFrame
=
group
->
priv
->
frame
;
SAL_INFO
(
"vcl.unity"
,
"g_lo_action_group_perform_submenu_action on "
<<
group
<<
" for frame "
<<
pFrame
);
if
(
pFrame
==
NULL
)
return
;
GtkSalMenu
*
pSalMenu
=
static_cast
<
GtkSalMenu
*>
(
pFrame
->
GetMenu
());
SAL_INFO
(
"vcl.unity"
,
"g_lo_action_group_perform_submenu_action on "
<<
group
<<
" for menu "
<<
pSalMenu
);
if
(
pSalMenu
!=
NULL
)
{
gboolean
bState
=
g_variant_get_boolean
(
state
);
SAL_INFO
(
"vcl.unity"
,
"g_lo_action_group_perform_submenu_action on "
<<
group
<<
" to "
<<
bState
);
if
(
bState
)
pSalMenu
->
Activate
(
action_name
);
pSalMenu
->
Activate
(
);
else
pSalMenu
->
Deactivate
(
action_name
);
}
...
...
@@ -191,7 +193,6 @@ g_lo_action_group_change_state (GActionGroup *group,
const
gchar
*
action_name
,
GVariant
*
value
)
{
SAL_INFO
(
"vcl.unity"
,
"g_lo_action_group_perform_submenu_action on "
<<
group
);
g_return_if_fail
(
value
!=
NULL
);
g_variant_ref_sink
(
value
);
...
...
vcl/unx/gtk/window/gtksalmenu.cxx
Dosyayı görüntüle @
26d092b3
...
...
@@ -353,10 +353,6 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
SAL_INFO
(
"vcl.unity"
,
"preparing submenu "
<<
pSubMenuModel
<<
" to menu model "
<<
G_MENU_MODEL
(
pSubMenuModel
)
<<
" and action group "
<<
G_ACTION_GROUP
(
pActionGroup
));
pSubmenu
->
SetMenuModel
(
G_MENU_MODEL
(
pSubMenuModel
)
);
pSubmenu
->
SetActionGroup
(
G_ACTION_GROUP
(
pActionGroup
)
);
pSubmenu
->
GetMenu
()
->
Activate
();
pSubmenu
->
GetMenu
()
->
Deactivate
();
pSubmenu
->
ImplUpdate
(
bRecurse
);
}
}
...
...
@@ -658,7 +654,6 @@ GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSub
{
SolarMutexGuard
aGuard
;
GtkSalMenu
*
pMenu
=
NULL
;
for
(
sal_uInt16
nPos
=
0
;
nPos
<
maItems
.
size
();
nPos
++
)
{
GtkSalMenuItem
*
pSalItem
=
maItems
[
nPos
];
...
...
@@ -695,24 +690,31 @@ void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand )
Menu
*
pSubMenu
=
(
pSalSubMenu
!=
NULL
)
?
pSalSubMenu
->
GetMenu
()
:
NULL
;
MenuBar
*
pMenuBar
=
static_cast
<
MenuBar
*
>
(
mpVCLMenu
);
pMenuBar
->
HandleMenuCommandEvent
(
pSubMenu
,
itemId
);
}
void
GtkSalMenu
::
Activate
(
const
gchar
*
aMenuCommand
)
void
GtkSalMenu
::
ActivateAllSubmenus
(
MenuBar
*
pMenuBar
)
{
pMenuBar
->
HandleMenuActivateEvent
(
mpVCLMenu
);
for
(
sal_uInt16
nPos
=
0
;
nPos
<
maItems
.
size
();
nPos
++
)
{
GtkSalMenuItem
*
pSalItem
=
maItems
[
nPos
];
if
(
pSalItem
->
mpSubMenu
!=
NULL
)
{
pSalItem
->
mpSubMenu
->
ActivateAllSubmenus
(
pMenuBar
);
pSalItem
->
mpSubMenu
->
Update
();
}
}
}
void
GtkSalMenu
::
Activate
()
{
if
(
mbMenuBar
!=
TRUE
)
return
;
GtkSalMenu
*
pSalSubMenu
=
GetMenuForItemCommand
(
(
gchar
*
)
aMenuCommand
,
TRUE
);
if
(
pSalSubMenu
!=
NULL
)
{
MenuBar
*
pMenuBar
=
static_cast
<
MenuBar
*
>
(
mpVCLMenu
);
pMenuBar
->
HandleMenuActivateEvent
(
pSalSubMenu
->
mpVCLMenu
);
pSalSubMenu
->
Update
();
}
ActivateAllSubmenus
(
static_cast
<
MenuBar
*>
(
mpVCLMenu
));
}
void
GtkSalMenu
::
Deactivate
(
const
gchar
*
aMenuCommand
)
{
if
(
mbMenuBar
==
sal_False
)
...
...
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