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
eta
gajim
Commits
65d1ac19
Commit
65d1ac19
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
adding prefs in tryaicon menu
parent
51ef2a23
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gtkgui.glade
+11
-2
11 additions, 2 deletions
src/gtkgui.glade
src/systray.py
+21
-17
21 additions, 17 deletions
src/systray.py
with
32 additions
and
19 deletions
src/gtkgui.glade
+
11
−
2
View file @
65d1ac19
...
...
@@ -11025,7 +11025,7 @@ send a chat message to</property>
<child>
<widget class="GtkMenuItem" id="status_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">Status</property>
<property name="label" translatable="yes">
_
Status</property>
<property name="use_underline">True</property>
<child>
...
...
@@ -11125,7 +11125,7 @@ send a chat message to</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image
505
">
<widget class="GtkImage" id="image
687
">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
...
...
@@ -11138,6 +11138,15 @@ send a chat message to</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="preferences_menuitem">
<property name="visible">True</property>
<property name="label">gtk-preferences</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_preferences_menuitem_activate" last_modification_time="Wed, 15 Jun 2005 10:18:26 GMT"/>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator">
<property name="visible">True</property>
...
...
This diff is collapsed.
Click to expand it.
src/systray.py
+
21
−
17
View file @
65d1ac19
...
...
@@ -43,6 +43,17 @@ GTKGUI_GLADE = 'gtkgui.glade'
class
Systray
:
"""
Class for icon in the systray
"""
def
__init__
(
self
,
plugin
):
self
.
plugin
=
plugin
self
.
jids
=
[]
self
.
t
=
None
self
.
tip
=
gtk
.
Tooltips
()
self
.
img_tray
=
gtk
.
Image
()
self
.
status
=
'
offline
'
self
.
xml
=
gtk
.
glade
.
XML
(
GTKGUI_GLADE
,
'
systray_context_menu
'
,
APP
)
self
.
systray_context_menu
=
self
.
xml
.
get_widget
(
'
systray_context_menu
'
)
self
.
xml
.
signal_autoconnect
(
self
)
def
set_img
(
self
):
if
len
(
self
.
jids
)
>
0
:
status
=
'
message
'
...
...
@@ -117,15 +128,13 @@ class Systray:
"""
create chat with and new message (sub) menus/menuitems
"""
chat_with_menuitem
=
self
.
xml
.
get_widget
(
'
chat_with_menuitem
'
)
#menu.append(chat_with_menuitem)
new_message_menuitem
=
self
.
xml
.
get_widget
(
'
new_message_menuitem
'
)
#menu.append(new_message_menuitem)
iskey
=
len
(
gajim
.
connections
.
keys
()
)
>
0
iskey
=
len
(
gajim
.
connections
)
>
0
chat_with_menuitem
.
set_sensitive
(
iskey
)
new_message_menuitem
.
set_sensitive
(
iskey
)
if
len
(
gajim
.
connections
.
keys
()
)
>=
2
:
# 2 or more connections? make submenus
if
len
(
gajim
.
connections
)
>=
2
:
# 2 or more connections? make submenus
account_menu_for_chat_with
=
gtk
.
Menu
()
chat_with_menuitem
.
set_submenu
(
account_menu_for_chat_with
)
...
...
@@ -142,7 +151,7 @@ class Systray:
item
.
set_submenu
(
group_menu
)
#for new_message
item
=
gtk
.
MenuItem
(
_
(
'
as
'
)
+
our_jid
)
item
.
connect
(
'
activate
'
,
\
item
.
connect
(
'
activate
'
,
self
.
on_new_message_menuitem_activate
,
account
)
account_menu_for_new_message
.
append
(
item
)
...
...
@@ -161,7 +170,13 @@ class Systray:
self
.
systray_context_menu
.
popup
(
None
,
None
,
None
,
event
.
button
,
event
.
time
)
self
.
systray_context_menu
.
show_all
()
self
.
systray_context_menu
.
reposition
()
def
on_preferences_menuitem_activate
(
self
,
widget
):
if
self
.
plugin
.
windows
[
'
preferences
'
].
window
.
get_property
(
'
visible
'
):
self
.
plugin
.
windows
[
'
preferences
'
].
window
.
present
()
else
:
self
.
plugin
.
windows
[
'
preferences
'
].
window
.
show_all
()
def
on_quit_menuitem_activate
(
self
,
widget
):
self
.
plugin
.
roster
.
on_quit_menuitem_activate
(
widget
)
...
...
@@ -265,14 +280,3 @@ class Systray:
if
self
.
t
:
self
.
t
.
destroy
()
self
.
t
=
None
def
__init__
(
self
,
plugin
):
self
.
plugin
=
plugin
self
.
jids
=
[]
self
.
t
=
None
self
.
tip
=
gtk
.
Tooltips
()
self
.
img_tray
=
gtk
.
Image
()
self
.
status
=
'
offline
'
self
.
xml
=
gtk
.
glade
.
XML
(
GTKGUI_GLADE
,
'
systray_context_menu
'
,
APP
)
self
.
systray_context_menu
=
self
.
xml
.
get_widget
(
'
systray_context_menu
'
)
self
.
xml
.
signal_autoconnect
(
self
)
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