static void chat_window_update (EmpathyChatWindow *window);
+static void empathy_chat_window_add_chat (EmpathyChatWindow *window,
+ EmpathyChat *chat);
+
+static void empathy_chat_window_remove_chat (EmpathyChatWindow *window,
+ EmpathyChat *chat);
+
+static void empathy_chat_window_move_chat (EmpathyChatWindow *old_window,
+ EmpathyChatWindow *new_window,
+ EmpathyChat *chat);
+
+static void empathy_chat_window_get_nb_chats (EmpathyChatWindow *self,
+ guint *nb_rooms,
+ guint *nb_private);
+
G_DEFINE_TYPE (EmpathyChatWindow, empathy_chat_window, G_TYPE_OBJECT);
static void
chat_window_menu_context_update (priv, num_pages);
}
+static EmpathyChatWindow *
+empathy_chat_window_new (void)
+{
+ return EMPATHY_CHAT_WINDOW (g_object_new (EMPATHY_TYPE_CHAT_WINDOW, NULL));
+}
+
static void
chat_window_detach_activate_cb (GtkAction *action,
EmpathyChatWindow *window)
g_free (markup);
}
+static gboolean
+empathy_chat_window_has_focus (EmpathyChatWindow *window)
+{
+ EmpathyChatWindowPriv *priv;
+ gboolean has_focus;
+
+ g_return_val_if_fail (EMPATHY_IS_CHAT_WINDOW (window), FALSE);
+
+ priv = GET_PRIV (window);
+
+ g_object_get (priv->dialog, "has-toplevel-focus", &has_focus, NULL);
+
+ return has_focus;
+}
+
static void
chat_window_new_message_cb (EmpathyChat *chat,
EmpathyMessage *message,
window);
}
-EmpathyChatWindow *
-empathy_chat_window_new (void)
+static GtkWidget *
+empathy_chat_window_get_dialog (EmpathyChatWindow *window)
{
- return EMPATHY_CHAT_WINDOW (g_object_new (EMPATHY_TYPE_CHAT_WINDOW, NULL));
+ EmpathyChatWindowPriv *priv;
+
+ g_return_val_if_fail (window != NULL, NULL);
+
+ priv = GET_PRIV (window);
+
+ return priv->dialog;
}
/* Returns the window to open a new tab in if there is only one window
* visble, otherwise, returns NULL indicating that a new window should
* be added.
*/
-EmpathyChatWindow *
+static EmpathyChatWindow *
empathy_chat_window_get_default (gboolean room)
{
GSettings *gsettings = g_settings_new (EMPATHY_PREFS_UI_SCHEMA);
return NULL;
}
-GtkWidget *
-empathy_chat_window_get_dialog (EmpathyChatWindow *window)
-{
- EmpathyChatWindowPriv *priv;
-
- g_return_val_if_fail (window != NULL, NULL);
-
- priv = GET_PRIV (window);
-
- return priv->dialog;
-}
-
-void
+static void
empathy_chat_window_add_chat (EmpathyChatWindow *window,
EmpathyChat *chat)
{
DEBUG ("Chat added (%d references)", G_OBJECT (chat)->ref_count);
}
-void
+static void
empathy_chat_window_remove_chat (EmpathyChatWindow *window,
EmpathyChat *chat)
{
g_object_unref (chat);
}
-void
+static void
empathy_chat_window_move_chat (EmpathyChatWindow *old_window,
EmpathyChatWindow *new_window,
EmpathyChat *chat)
g_object_unref (chat);
}
-void
+static void
empathy_chat_window_switch_to_chat (EmpathyChatWindow *window,
EmpathyChat *chat)
{
page_num);
}
-gboolean
-empathy_chat_window_has_focus (EmpathyChatWindow *window)
-{
- EmpathyChatWindowPriv *priv;
- gboolean has_focus;
-
- g_return_val_if_fail (EMPATHY_IS_CHAT_WINDOW (window), FALSE);
-
- priv = GET_PRIV (window);
-
- g_object_get (priv->dialog, "has-toplevel-focus", &has_focus, NULL);
-
- return has_focus;
-}
-
EmpathyChat *
empathy_chat_window_find_chat (TpAccount *account,
const gchar *id)
gtk_widget_grab_focus (chat->input_text_view);
}
-void
+static void
empathy_chat_window_get_nb_chats (EmpathyChatWindow *self,
guint *nb_rooms,
guint *nb_private)
};
GType empathy_chat_window_get_type (void);
-EmpathyChatWindow *empathy_chat_window_get_default (gboolean room);
-EmpathyChatWindow *empathy_chat_window_new (void);
-GtkWidget * empathy_chat_window_get_dialog (EmpathyChatWindow *window);
-void empathy_chat_window_add_chat (EmpathyChatWindow *window,
- EmpathyChat *chat);
-void empathy_chat_window_remove_chat (EmpathyChatWindow *window,
- EmpathyChat *chat);
-void empathy_chat_window_move_chat (EmpathyChatWindow *old_window,
- EmpathyChatWindow *new_window,
- EmpathyChat *chat);
-void empathy_chat_window_switch_to_chat (EmpathyChatWindow *window,
- EmpathyChat *chat);
-gboolean empathy_chat_window_has_focus (EmpathyChatWindow *window);
+
EmpathyChat * empathy_chat_window_find_chat (TpAccount *account,
const gchar *id);
void empathy_chat_window_present_chat (EmpathyChat *chat,
gint64 timestamp);
-void empathy_chat_window_get_nb_chats (EmpathyChatWindow *window,
- guint *nb_rooms,
- guint *nb_private);
-
G_END_DECLS
#endif /* __EMPATHY_CHAT_WINDOW_H__ */