Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sophie Herold
gajim
Commits
fc627fc1
Commit
fc627fc1
authored
7 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Use appmenu only if system supports it
parent
276daa99
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gajim/common/app.py
+8
-0
8 additions, 0 deletions
gajim/common/app.py
gajim/gajim.py
+1
-2
1 addition, 2 deletions
gajim/gajim.py
gajim/gui_menu_builder.py
+6
-6
6 additions, 6 deletions
gajim/gui_menu_builder.py
with
15 additions
and
8 deletions
gajim/common/app.py
+
8
−
0
View file @
fc627fc1
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##
##
import
os
import
os
import
sys
import
logging
import
logging
import
locale
import
locale
import
uuid
import
uuid
...
@@ -500,3 +501,10 @@ def get_priority(account, show):
...
@@ -500,3 +501,10 @@ def get_priority(account, show):
def
log
(
domain
):
def
log
(
domain
):
root
=
'
gajim.
'
root
=
'
gajim.
'
return
logging
.
getLogger
(
root
+
domain
)
return
logging
.
getLogger
(
root
+
domain
)
def
prefers_app_menu
():
if
sys
.
platform
==
'
darwin
'
:
return
True
if
sys
.
platform
==
'
win32
'
:
return
False
return
app
.
prefers_app_menu
()
This diff is collapsed.
Click to expand it.
gajim/gajim.py
+
1
−
2
View file @
fc627fc1
...
@@ -215,10 +215,9 @@ class GajimApplication(Gtk.Application):
...
@@ -215,10 +215,9 @@ class GajimApplication(Gtk.Application):
builder
.
add_from_file
(
path
)
builder
.
add_from_file
(
path
)
menubar
=
builder
.
get_object
(
"
menubar
"
)
menubar
=
builder
.
get_object
(
"
menubar
"
)
appmenu
=
builder
.
get_object
(
"
appmenu
"
)
appmenu
=
builder
.
get_object
(
"
appmenu
"
)
if
os
.
name
!=
'
nt
'
:
if
app
.
prefers_app_menu
()
:
self
.
set_app_menu
(
appmenu
)
self
.
set_app_menu
(
appmenu
)
else
:
else
:
# Dont set Application Menu for Windows
# Add it to the menubar instead
# Add it to the menubar instead
menubar
.
prepend_submenu
(
'
Gajim
'
,
appmenu
)
menubar
.
prepend_submenu
(
'
Gajim
'
,
appmenu
)
self
.
set_menubar
(
menubar
)
self
.
set_menubar
(
menubar
)
...
...
This diff is collapsed.
Click to expand it.
gajim/gui_menu_builder.py
+
6
−
6
View file @
fc627fc1
...
@@ -767,9 +767,9 @@ def get_account_menu(account):
...
@@ -767,9 +767,9 @@ def get_account_menu(account):
def
build_accounts_menu
():
def
build_accounts_menu
():
menubar
=
app
.
app
.
get_menubar
()
menubar
=
app
.
app
.
get_menubar
()
# Accounts Submenu
# Accounts Submenu
menu_position
=
0
menu_position
=
1
if
os
.
name
==
'
nt
'
:
if
app
.
prefers_app_menu
()
:
menu_position
=
1
menu_position
=
0
acc_menu
=
menubar
.
get_item_link
(
menu_position
,
'
submenu
'
)
acc_menu
=
menubar
.
get_item_link
(
menu_position
,
'
submenu
'
)
acc_menu
.
remove_all
()
acc_menu
.
remove_all
()
...
@@ -796,9 +796,9 @@ def build_bookmark_menu(account):
...
@@ -796,9 +796,9 @@ def build_bookmark_menu(account):
if
not
bookmark_menu
:
if
not
bookmark_menu
:
return
return
menu_position
=
0
menu_position
=
1
if
os
.
name
==
'
nt
'
:
if
app
.
prefers_app_menu
()
:
menu_position
=
1
menu_position
=
0
# Accounts Submenu
# Accounts Submenu
acc_menu
=
menubar
.
get_item_link
(
menu_position
,
'
submenu
'
)
acc_menu
=
menubar
.
get_item_link
(
menu_position
,
'
submenu
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment