const GValue *value,
GParamSpec *pspec)
{
- EmpathyAccountChooserPriv *priv;
-
- priv = GET_PRIV (object);
-
switch (param_id) {
case PROP_HAS_ALL_OPTION:
empathy_account_chooser_set_has_all_option (EMPATHY_ACCOUNT_CHOOSER (object),
TpAccount *
empathy_account_chooser_dup_account (EmpathyAccountChooser *chooser)
{
- EmpathyAccountChooserPriv *priv;
TpAccount *account;
GtkTreeModel *model;
GtkTreeIter iter;
g_return_val_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser), NULL);
- priv = GET_PRIV (chooser);
-
model = gtk_combo_box_get_model (GTK_COMBO_BOX (chooser));
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (chooser), &iter)) {
return NULL;
TpConnection *
empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser)
{
- EmpathyAccountChooserPriv *priv;
TpAccount *account;
TpConnection *connection;
g_return_val_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser), NULL);
- priv = GET_PRIV (chooser);
-
account = empathy_account_chooser_dup_account (chooser);
/* if the returned account is NULL, then the account manager probably
{
const gchar *nick = NULL;
const gchar *fullname = NULL;
- gint port = 6667;
- const gchar *charset;
- gboolean ssl = FALSE;
EmpathyAccountSettings *ac_settings;
g_object_get (settings->self, "settings", &ac_settings, NULL);
nick = empathy_account_settings_get_string (ac_settings, "account");
fullname = empathy_account_settings_get_string (ac_settings,
"fullname");
- charset = empathy_account_settings_get_string (ac_settings, "charset");
- port = empathy_account_settings_get_uint32 (ac_settings, "port");
- ssl = empathy_account_settings_get_boolean (ac_settings, "use-ssl");
if (!nick)
{
guint time_,
EmpathyAvatarChooser *chooser)
{
- EmpathyAvatarChooserPriv *priv;
GList *p;
- priv = GET_PRIV (chooser);
-
for (p = gdk_drag_context_list_targets (context); p != NULL;
p = p->next) {
gchar *possible_type;
guint time_,
EmpathyAvatarChooser *chooser)
{
- EmpathyAvatarChooserPriv *priv;
GList *p;
- priv = GET_PRIV (chooser);
-
if (gdk_drag_context_list_targets (context) == NULL) {
return FALSE;
}
static void
empathy_cell_renderer_expander_finalize (GObject *object)
{
- EmpathyCellRendererExpanderPriv *priv;
-
- priv = GET_PRIV (object);
-
(* G_OBJECT_CLASS (empathy_cell_renderer_expander_parent_class)->finalize) (object);
}
const GdkRectangle *cell_area,
GtkCellRendererState flags)
{
- EmpathyCellRendererExpander *expander;
EmpathyCellRendererExpanderPriv *priv;
GtkTreePath *path;
- expander = EMPATHY_CELL_RENDERER_EXPANDER (cell);
priv = GET_PRIV (cell);
if (!GTK_IS_TREE_VIEW (widget) || !priv->activatable)
EmpathyChat *chat)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
- TpConnection *connection;
if (new_status != TP_CONNECTION_STATUS_CONNECTED)
return;
- connection = tp_account_get_connection (account);
-
if (priv->tp_chat != NULL || account != priv->account ||
priv->handle_type == TP_HANDLE_TYPE_NONE ||
EMP_STR_EMPTY (priv->id))
chat_command_help (EmpathyChat *chat,
GStrv strv)
{
- EmpathyChatPriv *priv;
guint i;
- priv = GET_PRIV (chat);
-
/* If <command> part is not defined,
* strv[1] will be the terminal NULL */
if (strv[1] == NULL) {
static void
chat_input_text_view_send (EmpathyChat *chat)
{
- EmpathyChatPriv *priv;
GtkTextBuffer *buffer;
GtkTextIter start, end;
gchar *msg;
- priv = GET_PRIV (chat);
-
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view));
gtk_text_buffer_get_bounds (buffer, &start, &end);
GtkMenu *menu,
EmpathyChat *chat)
{
- EmpathyChatPriv *priv;
GtkTextBuffer *buffer;
GtkTextTagTable *table;
GtkTextTag *tag;
GtkWidget *smiley_menu;
GtkWidget *image;
- priv = GET_PRIV (chat);
buffer = gtk_text_view_get_buffer (view);
/* Add the emoticon menu. */
const GValue *value,
GParamSpec *pspec)
{
- EmpathyContactListStorePriv *priv;
-
- priv = GET_PRIV (object);
-
switch (param_id) {
case PROP_CONTACT_LIST:
contact_list_store_set_contact_list (EMPATHY_CONTACT_LIST_STORE (object),
gboolean is_member,
EmpathyContactListStore *store)
{
- EmpathyContactListStorePriv *priv;
-
- priv = GET_PRIV (store);
-
DEBUG ("Contact %s (%d) %s",
empathy_contact_get_id (contact),
empathy_contact_get_handle (contact),
gboolean is_favourite,
EmpathyContactListStore *store)
{
- EmpathyContactListStorePriv *priv;
-
- priv = GET_PRIV (store);
-
DEBUG ("Contact %s (%d) is %s a favourite",
empathy_contact_get_id (contact),
empathy_contact_get_handle (contact),
gchar *message,
EmpathyContactListStore *store)
{
- EmpathyContactListStorePriv *priv;
-
- priv = GET_PRIV (store);
-
DEBUG ("Contact %s (%d) renamed to %s (%d)",
empathy_contact_get_id (old_contact),
empathy_contact_get_handle (old_contact),
contact_list_store_remove_contact (EmpathyContactListStore *store,
EmpathyContact *contact)
{
- EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
GList *iters, *l;
- priv = GET_PRIV (store);
-
iters = contact_list_store_find_contact (store, contact);
if (!iters) {
return;
gboolean active,
gboolean set_changed)
{
- EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
GList *iters, *l;
- priv = GET_PRIV (store);
model = GTK_TREE_MODEL (store);
iters = contact_list_store_find_contact (store, contact);
gboolean *created,
gboolean is_fake_group)
{
- EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
GtkTreeIter iter_group;
GtkTreeIter iter_separator;
FindGroup fg;
- priv = GET_PRIV (store);
-
memset (&fg, 0, sizeof (fg));
fg.name = name;
/* protocol */
ret_val = strcmp (tp_account_get_protocol (account_a),
- tp_account_get_protocol (account_a));
+ tp_account_get_protocol (account_b));
if (ret_val != 0)
goto out;
/* account ID */
ret_val = strcmp (tp_proxy_get_object_path (account_a),
- tp_proxy_get_object_path (account_a));
+ tp_proxy_get_object_path (account_b));
out:
return ret_val;
contact_list_store_find_contact (EmpathyContactListStore *store,
EmpathyContact *contact)
{
- EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
GList *l = NULL;
FindContact fc;
- priv = GET_PRIV (store);
-
memset (&fc, 0, sizeof (fc));
fc.contact = contact;
const gchar *contact_id = NULL;
gchar *new_group = NULL;
gchar *old_group = NULL;
- gboolean success = TRUE;
gboolean new_group_is_fake, old_group_is_fake = TRUE;
priv = GET_PRIV (view);
if (!connection) {
DEBUG ("Failed to get connection for account '%s'", account_id);
- success = FALSE;
g_free (new_group);
g_free (old_group);
g_object_unref (account_manager);
EmpathyContact *
empathy_contact_list_view_dup_selected (EmpathyContactListView *view)
{
- EmpathyContactListViewPriv *priv;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeModel *model;
g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view), NULL);
- priv = GET_PRIV (view);
-
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
return NULL;
EmpathyContactListFlags
empathy_contact_list_view_get_flags (EmpathyContactListView *view)
{
- EmpathyContactListViewPriv *priv;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeModel *model;
g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view), 0);
- priv = GET_PRIV (view);
-
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
return 0;
empathy_contact_list_view_get_selected_group (EmpathyContactListView *view,
gboolean *is_fake_group)
{
- EmpathyContactListViewPriv *priv;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeModel *model;
g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view), NULL);
- priv = GET_PRIV (view);
-
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
return NULL;
const GValue *value,
GParamSpec *pspec)
{
- EmpathyGroupsWidgetPriv *priv;
-
- priv = GET_PRIV (object);
-
switch (param_id)
{
case PROP_GROUP_DETAILS:
const GValue *value,
GParamSpec *pspec)
{
- EmpathyIndividualLinkerPriv *priv;
-
- priv = GET_PRIV (object);
-
switch (param_id)
{
case PROP_START_INDIVIDUAL:
gboolean *created,
gboolean is_fake_group)
{
- EmpathyIndividualStorePriv *priv;
GtkTreeModel *model;
GtkTreeIter iter_group;
GtkTreeIter iter_separator;
FindGroup fg;
- priv = GET_PRIV (self);
-
memset (&fg, 0, sizeof (fg));
fg.name = name;
individual_store_find_contact (EmpathyIndividualStore *self,
FolksIndividual *individual)
{
- EmpathyIndividualStorePriv *priv;
GtkTreeModel *model;
GList *l = NULL;
FindContact fc;
- priv = GET_PRIV (self);
-
memset (&fc, 0, sizeof (fc));
fc.individual = individual;
individual_store_remove_individual (EmpathyIndividualStore *self,
FolksIndividual *individual)
{
- EmpathyIndividualStorePriv *priv;
GtkTreeModel *model;
GList *iters, *l;
- priv = GET_PRIV (self);
-
iters = individual_store_find_contact (self, individual);
if (iters == NULL)
return;
gboolean active,
gboolean set_changed)
{
- EmpathyIndividualStorePriv *priv;
GtkTreeModel *model;
GList *iters, *l;
- priv = GET_PRIV (self);
model = GTK_TREE_MODEL (self);
iters = individual_store_find_contact (self, individual);
gboolean is_favourite,
EmpathyIndividualStore *self)
{
- EmpathyIndividualStorePriv *priv;
-
- priv = GET_PRIV (self);
-
DEBUG ("Individual %s is %s a favourite",
folks_individual_get_id (individual),
is_favourite ? "now" : "no longer");
const gchar *message,
EmpathyIndividualStore *self)
{
- EmpathyIndividualStorePriv *priv;
-
- priv = GET_PRIV (self);
-
DEBUG ("Individual %s renamed to %s",
folks_individual_get_id (old_individual),
folks_individual_get_id (new_individual));
const GValue *value,
GParamSpec *pspec)
{
- EmpathyIndividualStorePriv *priv;
-
- priv = GET_PRIV (object);
-
switch (param_id)
{
case PROP_INDIVIDUAL_MANAGER:
GtkTreePath *path,
GtkSelectionData *selection)
{
- EmpathyIndividualViewPriv *priv;
EmpathyIndividualManager *manager = NULL;
FolksIndividual *individual = NULL;
FolksPersona *persona = NULL;
GList *individuals, *l;
gboolean retval = FALSE;
- priv = GET_PRIV (self);
-
persona_uid = (const gchar *) gtk_selection_data_get_data (selection);
/* FIXME: This is slow, but the only way to find the Persona we're having
FolksIndividual *
empathy_individual_view_dup_selected (EmpathyIndividualView *view)
{
- EmpathyIndividualViewPriv *priv;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeModel *model;
g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_VIEW (view), NULL);
- priv = GET_PRIV (view);
-
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return NULL;
empathy_individual_view_dup_selected_group (EmpathyIndividualView *view,
gboolean *is_fake_group)
{
- EmpathyIndividualViewPriv *priv;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeModel *model;
g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_VIEW (view), NULL);
- priv = GET_PRIV (view);
-
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return NULL;
gboolean is_chatroom,
GtkWindow *parent)
{
- EmpathyAccountChooser *account_chooser;
TpAccountManager *account_manager;
GtkBuilder *gui;
gchar *filename;
/* Account chooser for chats */
window->account_chooser_chats = empathy_account_chooser_new ();
- account_chooser = EMPATHY_ACCOUNT_CHOOSER (window->account_chooser_chats);
gtk_box_pack_start (GTK_BOX (window->vbox_chats),
window->account_chooser_chats,
{
GtkTreeView *view;
GtkTreeModel *model;
- GtkTreeSelection *selection;
GtkListStore *store;
view = GTK_TREE_VIEW (window->treeview_find);
model = gtk_tree_view_get_model (view);
- selection = gtk_tree_view_get_selection (view);
store = GTK_LIST_STORE (model);
empathy_chat_view_clear (window->chatview_find);
gboolean active,
gboolean set_changed)
{
- EmpathyPersonaStorePriv *priv;
GtkTreePath *path;
GtkTreeIter iter;
- priv = GET_PRIV (self);
-
path = find_persona (self, persona);
if (path == NULL)
return;
/* protocol */
ret_val = strcmp (tp_account_get_protocol (account_a),
- tp_account_get_protocol (account_a));
+ tp_account_get_protocol (account_b));
if (ret_val != 0)
goto out;
/* account ID */
ret_val = strcmp (tp_proxy_get_object_path (account_a),
- tp_proxy_get_object_path (account_a));
+ tp_proxy_get_object_path (account_b));
out:
return ret_val;
GdkDragContext *context,
GtkSelectionData *selection)
{
- EmpathyPersonaViewPriv *priv;
EmpathyIndividualManager *manager = NULL;
FolksIndividual *individual;
const gchar *individual_id;
gboolean success = FALSE;
- priv = GET_PRIV (self);
-
individual_id = (const gchar *) gtk_selection_data_get_data (selection);
manager = empathy_individual_manager_dup_singleton ();
individual = empathy_individual_manager_lookup_member (manager,
guint time_)
{
EmpathyPersonaView *self = EMPATHY_PERSONA_VIEW (widget);
- EmpathyPersonaViewPriv *priv;
GdkAtom target;
- priv = GET_PRIV (self);
-
target = gtk_drag_dest_find_target (GTK_WIDGET (self), context, NULL);
if (target == drag_atoms_dest[DND_DRAG_TYPE_INDIVIDUAL_ID])
guint time_)
{
EmpathyPersonaView *self = EMPATHY_PERSONA_VIEW (widget);
- EmpathyPersonaViewPriv *priv;
FolksPersona *persona;
const gchar *persona_uid;
if (info != DND_DRAG_TYPE_PERSONA_ID)
return;
- priv = GET_PRIV (self);
-
persona = empathy_persona_view_dup_selected (self);
if (persona == NULL)
return;
FolksPersona *
empathy_persona_view_dup_selected (EmpathyPersonaView *self)
{
- EmpathyPersonaViewPriv *priv;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeModel *model;
g_return_val_if_fail (EMPATHY_IS_PERSONA_VIEW (self), NULL);
- priv = GET_PRIV (self);
-
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (self));
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return NULL;
mc_set_custom_state (self);
}
else {
- PresenceChooserEntryType type;
TpConnectionPresenceType state;
char *status;
- type = presence_chooser_get_entry_type (self);
state = get_state_and_status (self, &status);
if (!empathy_status_presets_is_valid (state)) {
static gboolean
empathy_gdk_pixbuf_is_opaque (GdkPixbuf *pixbuf)
{
- gint width, height, rowstride, i;
+ gint height, rowstride, i;
guchar *pixels;
guchar *row;
- width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
pixels = gdk_pixbuf_get_pixels (pixbuf);
{
EmpathyServerTLSHandler *handler;
GError *error = NULL;
- EmpathyAuthFactoryPriv *priv;
HandlerContextData *data = user_data;
- priv = GET_PRIV (data->self);
handler = empathy_server_tls_handler_new_finish (res, &error);
if (error != NULL)
empathy_chatroom_manager_add (EmpathyChatroomManager *manager,
EmpathyChatroom *chatroom)
{
- EmpathyChatroomManagerPriv *priv;
-
g_return_val_if_fail (EMPATHY_IS_CHATROOM_MANAGER (manager), FALSE);
g_return_val_if_fail (EMPATHY_IS_CHATROOM (chatroom), FALSE);
- priv = GET_PRIV (manager);
-
/* don't add more than once */
if (!empathy_chatroom_manager_find (manager,
empathy_chatroom_get_account (chatroom),
const GValue *value,
GParamSpec *pspec)
{
- EmpathyChatroomPriv *priv;
-
- priv = GET_PRIV (object);
-
switch (param_id) {
case PROP_ACCOUNT:
empathy_chatroom_set_account (EMPATHY_CHATROOM (object),
{
HashingData *hash_data = user_data;
gssize bytes_read;
- EmpathyFTHandlerPriv *priv;
GError *error = NULL;
- priv = GET_PRIV (hash_data->handler);
-
again:
if (hash_data->buffer == NULL)
hash_data->buffer = g_malloc0 (BUFFER_SIZE);
empathy_individual_manager_supports_blocking (EmpathyIndividualManager *self,
FolksIndividual *individual)
{
- EmpathyIndividualManagerPriv *priv;
GList *personas, *l;
g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_MANAGER (self), FALSE);
- priv = GET_PRIV (self);
-
personas = folks_individual_get_personas (individual);
for (l = personas; l != NULL; l = l->next)
gboolean blocked,
gboolean abusive)
{
- EmpathyIndividualManagerPriv *priv;
GList *personas, *l;
g_return_if_fail (EMPATHY_IS_INDIVIDUAL_MANAGER (self));
- priv = GET_PRIV (self);
-
personas = folks_individual_get_personas (individual);
for (l = personas; l != NULL; l = l->next)
const gchar *filename,
gboolean user_defined)
{
- EmpathyIrcNetworkManagerPriv *priv;
xmlParserCtxtPtr ctxt;
xmlDocPtr doc;
xmlNodePtr networks;
xmlNodePtr node;
- priv = GET_PRIV (self);
-
DEBUG ("Attempting to parse file:'%s'...", filename);
ctxt = xmlNewParserCtxt ();