aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-19 15:22:58 -0500
committerTed Gould <ted@canonical.com>2009-08-19 15:22:58 -0500
commitaed88cf243dc4862683acc886513ad970aafad60 (patch)
treeedaca20b3dcd15dcb225c137248ae48a4d5beaa9 /src
parent1656fcc2e581fe4ba9bf8befbf6c94fe1f0a8f20 (diff)
downloadayatana-indicator-messages-aed88cf243dc4862683acc886513ad970aafad60.tar.gz
ayatana-indicator-messages-aed88cf243dc4862683acc886513ad970aafad60.tar.bz2
ayatana-indicator-messages-aed88cf243dc4862683acc886513ad970aafad60.zip
Adding the basis for launchers
Diffstat (limited to 'src')
-rw-r--r--src/indicator-service.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/indicator-service.c b/src/indicator-service.c
index cb7e23a..93c926b 100644
--- a/src/indicator-service.c
+++ b/src/indicator-service.c
@@ -28,6 +28,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "im-menu-item.h"
#include "app-menu-item.h"
+#include "launcher-menu-item.h"
#include "dbus-data.h"
static IndicateListener * listener;
@@ -116,6 +117,25 @@ imList_sort (gconstpointer a, gconstpointer b)
return (gint)(im_menu_item_get_seconds(IM_MENU_ITEM(pb->menuitem)) - im_menu_item_get_seconds(IM_MENU_ITEM(pa->menuitem)));
}
+typedef struct _launcherList_t launcherList_t;
+struct _launcherList_t {
+ LauncherMenuItem * menuitem;
+};
+
+static gint
+launcherList_sort (gconstpointer a, gconstpointer b)
+{
+ launcherList_t * pa, * pb;
+
+ pa = (launcherList_t *)a;
+ pb = (launcherList_t *)b;
+
+ const gchar * pan = launcher_menu_item_get_name(pa->menuitem);
+ const gchar * pbn = launcher_menu_item_get_name(pb->menuitem);
+
+ return g_strcmp0(pan, pbn);
+}
+
static void
server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data)
{
@@ -466,6 +486,15 @@ indicator_removed (IndicateListener * listener, IndicateListenerServer * server,
return;
}
+gboolean
+build_launchers (gpointer data)
+{
+
+
+
+ return FALSE;
+}
+
int
main (int argc, char ** argv)
{
@@ -498,6 +527,8 @@ main (int argc, char ** argv)
g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), root_menuitem);
g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_CALLBACK(server_removed), root_menuitem);
+ g_idle_add(build_launchers, NULL);
+
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);