aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Export menu for the phone clientLars Uebernickel2012-11-164-395/+169
| | | | | | | | 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.
* Change application to service d-bus protocolLars Uebernickel2012-11-141-160/+264
| | | | | | | | | | | | | | Previously, the protocol was simply a menu model and an action group of the currently active sources. The service inserted the menu as a section into the indicator menu. This doesn't work anymore, because applications can (soon) expose individual messages, and the messaging menu doesn't always display all of those at once. This patch introduces a more specific d-bus API. That API is still considered private: applications have to use libmessaging-menu.
* Move service .xml into a common directoryLars Uebernickel2012-11-132-48/+6
| | | | | | | | | | Both the service (in src/) and the client library (in libmessaging-menu/) need access to the dbus interface description file. Until now, it resided in src, with both Makefiles calling gdbus-codegen on it. This patch moves the file to common/ and builds a convenience library that contains only the generated code.
* Include fallback icon namesLars Uebernickel2012-09-282-3/+16
| | | | | And use g_icon_new_from_string in the indicator to make it load fallbacks.
* Request LARGE_TOOLBAR icons for the panelLars Uebernickel2012-09-251-3/+2
| | | | | To make it consistent with the other indicators.
* messages-service: define all global variables as staticLars Uebernickel2012-09-191-3/+3
|
* Use indicator-message icons with chat statusLars Uebernickel2012-09-182-30/+109
| | | | | | | | | | 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).
* Set the global chat status more intelligentlyLars Uebernickel2012-09-185-47/+167
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* messages-services: don't call g_object_unref with NULLLars Uebernickel2012-09-141-1/+2
|
* Show menu separators between sectionsLars Uebernickel2012-09-131-18/+8
| | | | | | | | | | | | | Previously, gtk didn't support changing the menu model on an already-created GtkMenu. Since IndicatorObject doesn't allow changing the GtkMenu it exports to the panel, IndicatorMessages created a menu with a single section, into which the menu from the service was inserted (and removed when the service died). This led to seperators not being shown, because separators are only shown between top-level sections. Gtk now has gtk_menu_shell_bind_model, which allows us to get rid of top-level wrapper section.
* messages-service: update chat section when an app is removedLars Uebernickel2012-09-061-3/+11
|
* messages-service: fix merge errorLars Uebernickel2012-09-061-7/+5
| | | | | | | 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.
* Merge lp:~larsu/indicator-messages/watch-desktop-filesLars Uebernickel2012-09-063-48/+128
|\
| * messages-service.c: remove redundant g_hash_table_removeLars Uebernickel2012-09-051-1/+0
| |
| * app-section.c: remove unused function app_section_get_nameLars Uebernickel2012-09-052-12/+0
| |
| * app-section.c: make destroy_signal staticLars Uebernickel2012-09-051-1/+1
| |
| * app-section: remove unused private memberLars Uebernickel2012-09-052-11/+0
| |
| * Watch desktop files for changesLars Uebernickel2012-09-052-26/+129
| | | | | | | | | | | | | | | | 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.
* | Hide the indicator when no application is configured to use it.. Fixes: ↵Lars Uebernickel2012-09-052-54/+71
|\ \ | |/ |/| | | https://bugs.launchpad.net/bugs/661059, https://bugs.launchpad.net/bugs/1045039. Approved by jenkins, Charles Kerr.
| * indicator-messages.c: don't call menu_items_changed directlyLars Uebernickel2012-09-051-31/+38
| |
| * Hide indicator when no applications are configured to use itLars Uebernickel2012-09-042-64/+74
| | | | | | | | | | | | 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.
* | ido-detail-label: factor common code out of set_text and _countLars Uebernickel2012-09-041-25/+25
| | | | | | | | | | | | | | | | This was only half-heartedly done with the _clear function, which left a dangling pointer. Contributed by Charles Kerr. Thanks!
* | ido-detail-label: chain up dispose and finalize callsLars Uebernickel2012-09-041-0/+4
| |
* | im-source-menu-item: ellipsize label when it's longer than 40 emLars Uebernickel2012-09-031-0/+3
| | | | | | | | | | Also make sure that the label is left-aligned when ellipsized.
* | im-source-menu-item: draw lozenges around countsLars Uebernickel2012-09-034-74/+458
| | | | | | | | | | | | A new widget class IdoDetailLabel is introduced, which can display either a string or a count. Counts are drawn as lozenges.
* | im-source-menu-item: refactor setting detail stringLars Uebernickel2012-09-031-15/+46
|/
* Merge lp:~larsu/messaging-menu/fix-iconsLars Uebernickel2012-08-278-8/+485
|\
| * ido_menu_item_set_menu_item: make sure g_free isn't called with dangling pointerLars Uebernickel2012-08-271-1/+1
| |
| * IdoMenuItem: clear target pointer in disposeLars Uebernickel2012-08-271-1/+4
| |
| * Increase spacing between icons and labelsLars Uebernickel2012-08-273-1/+3
| |
| * Indent application shortcutsLars Uebernickel2012-08-271-4/+15
| | | | | | | | | | | | This is done by setting their icon to the empty string, which IdoMenuItem interprets as "show a clear icon".
| * IdoMenuItem: don't try to set state on stateless actionsLars Uebernickel2012-08-272-3/+10
| |
| * Show icons on status menu itemsLars Uebernickel2012-08-275-5/+460
| | | | | | | | | | | | | | 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.
| * Remove unused #includeLars Uebernickel2012-08-271-1/+0
| |
* | Make sure the icon is cleared also when a source is removedLars Uebernickel2012-08-271-7/+0
| | | | | | | | | | | | The code was there, but an superfluous condition made the function return early.
* | Bring back the blue icon when a source is drawing attentionLars Uebernickel2012-08-271-1/+26
|/
* Plug memory leaks: return value of g_menu_model_get_item_link is transfer fullLars Uebernickel2012-08-252-1/+11
|
* Fix a memory leak and potential crash: ref_sink the widget, not the GMenuLars Uebernickel2012-08-251-1/+2
|
* Make sure the time shown in the menu is always currentLars Uebernickel2012-08-241-1/+33
|
* Don't spam debug messagesLars Uebernickel2012-08-241-1/+0
|
* Request showing the chat section also when the app is not runningLars Uebernickel2012-08-241-2/+1
|
* Make the panel plugin reconnect to the service when it restartsLars Uebernickel2012-08-231-36/+56
|
* Merge lp:~charlesk/indicator-messages/towards-q-redesignLars Uebernickel2012-08-211-2/+7
|\ | | | | | | | | Plugs several memory leaks in app-section.c
| * in app-section.c's activate_cb(), don't leak the GError if we can't launchCharles Kerr2012-08-211-2/+4
| |
| * in app-section's app_section_set_app_info(), don't leak the nicks' actionsCharles Kerr2012-08-211-0/+1
| |
| * in app-section.c's dispose(), clear the muxer objectCharles Kerr2012-08-211-0/+2
| |
* | Update remaining license headersLars Uebernickel2012-08-212-2/+4
| |
* | Show icons in application and source menu itemsLars Uebernickel2012-08-217-20/+104
| | | | | | | | | | | | | | 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.
* | ImSourceMenuItem: show source detail (count or time)Lars Uebernickel2012-08-211-3/+113
|/
* Use a custom menu item for message source menu itemsLars Uebernickel2012-08-214-0/+336
|