| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This is a temporary hack to work around a crash in QMenuModel.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn't require every consumer ("panel") to know about
IndicatorServiceManager's protocol.
Also, it ensures that objects are exported before the name is acquired, getting
rid of a race condition (when a consumer tries to access objects in
NameAppeared before they're exported).
This patch also adds a --replace command line option -- replacing the
INDICATOR_SERVICE_REPLACE_MODE environment variable.
|
| |
|
|
|
|
|
|
| |
It isn't used right now (the action group wasn't even exported on the bus) and
would need to be refactored anyway once chat status is added back in.
|
|
|
|
|
|
|
| |
The action for that root item lives in ImApplicationList for now, because it
owns the action group (which should probably factored into its own class at
some point).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Add ImApplicationList, a class that manages the list of applictions that are
currently registered with the messaging menu. It creates dbus proxies for
running applications and sends signals when the app adds messages or sources.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This is a rough first draft: It only fetched the sources and messages from
applications once and doesn't listen for further changes.
This removes all code for the desktop menu for now.
|
|
|
|
|
| |
And use g_icon_new_from_string in the indicator to make it load fallbacks.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Changes the state of the "messages" action from a boolean (draws-attention) to
a string (icon-name). This has the added benefit that more logic is moved from
the plugin into the service.
It also fixes an edge case: the messaging menu didn't have the blue icon after
the service restarted (if anything was drawing attention).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up until now, the global chat status was set every time an application called
_set_status. Thus, global status really meant "status of the app that last
changed the status".
Now, the service remembers the chat status for each application and sets the
global status as a combination of all of application statuses. If applications
have different statuses, the menu items are shown in an inconsistent state.
This is implemented in IdoMenuItem by making it accept state as an array of
strings in addition to a single string. It is drawn inconsistent if the state
contains the menu item's target value in addition to other values.
When the global status is changed through the messaging menu, the service
doesn't update the action immediately anymore. Instead, it notifies all
applications about the change via the "status-changed" signal. Applications
must call _set_state to acknowledge that they have indeed changed their state.
This is consistent with libmessaging-menu's documentation and design.
Also, the SetStatus D-Bus call was missing a "desktop-id" parameter to tell the
menu which application changed status. Changing this doesn't break existing
apps, as the D-Bus interface is considered private to indicator-messages.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Check whether no apps are left in remove_section instead of remove_application,
so that it is also done when an AppSection emits "destroy". This is a result
of improper merging of the watch-desktop-files and hide-indicator branches.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This introduces a slightly clumsy "destroy" signal for AppSection to notify
outsiders that the desktop file was deleted. This will do for now, but a
larger refactoring which pulls all the desktop-file-reading code out of
appsection is in order.
|
|/
|
|
|
|
| |
This is done by removing the header item from the menu model in the service.
On the panel side, call indicator_object_hide() if the recevied menu is empty.
|
|
|
|
|
|
|
| |
This introduces IdoMenuItem, a GtkCheckMenuItem that can also show icons. This
should go into libido at some point. Also, Im{App,Source}MenuItem could derive
from it so that the GMenuItem-setting logic is only in one place.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Everthing goes through GIcon now, using g_icon_{to,new_for}_string to set a
string attribute on the menu item. The attribute is prefixed x-canonical- for
now.
|
|
|
|
|
|
| |
This still isn't as specified by design (should be alphabetically), but at
least "Clear" is below the app items now.
|
|
|
|
| |
create_status_section() static
|
|
|
|
| |
notify::uses-chat-status handler
|
| |
|
|
|
|
|
|
|
|
| |
The chat section is only shown when an application that is registered to use it
is running. Applications are registered if their desktop file contains:
X-MessagingMenu-UsesChatStatus: true
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The toplevel menu represents the indicator itself. It has one item with a
submenu, which is the indicator's popup menu. The action that is set on the
toplevel will never be activated, but its state is used to indicate
"draws-attention".
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
AppSections watch those flags for associated sources and mux them into a
draws-attention property for the whole section.
|
|
|
|
|
| |
As a neat side-effect, this fixes a memory leak in app-section.c.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Applications will be able to set and retrieve status through libmessaging-menu
and telepathy.
|