static UniqueResponse message_received_cb (UniqueApp *app, UniqueCommand command, UniqueMessageData *message, guint time_, gpointer user_data) { UniqueResponse res; gchar *feed; debug1(DEBUG_GUI, "libunique command received >>>%d<<<", command); switch (command) { case UNIQUE_ACTIVATE: /* Raise the liferea window */ debug0 (DEBUG_GUI, "-> raise window requested"); liferea_shell_present (); res = UNIQUE_RESPONSE_OK; break; case COMMAND_ADD_FEED: feed = unique_message_data_get_text (message); feedlist_add_subscription (feed, NULL, NULL, 0); res = UNIQUE_RESPONSE_OK; break; default: g_warning ("Received unknown libunique command: >>>%d<<<", command); res = UNIQUE_RESPONSE_OK; break; } return res; }
/* Called when the indicator menu entry for a specific feed is clicked, meaning Liferea should switch to that feed. */ static void on_indicator_clicked (IndicateIndicator *indicator, guint timestamp, gpointer user_data) { feed_list_view_select ((nodePtr) user_data); liferea_shell_present (); remove_all_indicators (); }
gboolean liferea_dbus_subscribe (LifereaDBus *self, gchar *url, gboolean *ret, GError **err) { liferea_shell_present (); feedlist_add_subscription (url, NULL, NULL, 0); *ret = TRUE; return TRUE; }
static void notif_libnotify_callback_open (NotifyNotification *n, gchar *action, gpointer user_data) { nodePtr node_p; g_assert(action != NULL); g_assert(strcmp(action, "open") == 0); node_p = node_from_id (user_data); if (node_p) feed_list_view_select (node_p); else ui_show_error_box (_("This feed does not exist anymore!")); notify_notification_close (n, NULL); liferea_shell_present (); }
/* Called when the main "Liferea" entry in the indicator menu is clicked. */ static void on_indicator_server_clicked (IndicateServer *server, gchar *type, gpointer user_data) { liferea_shell_present (); remove_all_indicators (); }