aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorMarco Barisione <marco.barisione@collabora.co.uk>2013-05-10 22:09:02 +0800
committerMarco Barisione <marco.barisione@collabora.co.uk>2013-08-20 18:03:06 +0800
commit4598bce7db6276a9f1f9e21adef8723b646bf44b (patch)
tree36619009e101de4b0db54926352cffd8f1a3625a /libempathy-gtk
parent44c61cce71ad3683aa6a284ce117e286423f555c (diff)
downloadgsoc2013-empathy-4598bce7db6276a9f1f9e21adef8723b646bf44b.tar
gsoc2013-empathy-4598bce7db6276a9f1f9e21adef8723b646bf44b.tar.gz
gsoc2013-empathy-4598bce7db6276a9f1f9e21adef8723b646bf44b.tar.bz2
gsoc2013-empathy-4598bce7db6276a9f1f9e21adef8723b646bf44b.tar.lz
gsoc2013-empathy-4598bce7db6276a9f1f9e21adef8723b646bf44b.tar.xz
gsoc2013-empathy-4598bce7db6276a9f1f9e21adef8723b646bf44b.tar.zst
gsoc2013-empathy-4598bce7db6276a9f1f9e21adef8723b646bf44b.zip
tpaw-utils: move empathy_window_present* to tp-aw and rename it
This commit also changes the licence of the moved code from GPL to LGPL. See GOSSIP-RELICENSING.txt for details. https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c41
-rw-r--r--libempathy-gtk/empathy-ui-utils.h5
2 files changed, 0 insertions, 46 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index c230324bb..272c42513 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -810,47 +810,6 @@ empathy_filename_from_icon_name (const gchar *icon_name,
return ret;
}
-/* Takes care of moving the window to the current workspace. */
-void
-empathy_window_present_with_time (GtkWindow *window,
- guint32 timestamp)
-{
- GdkWindow *gdk_window;
-
- g_return_if_fail (GTK_IS_WINDOW (window));
-
- /* Move the window to the current workspace before trying to show it.
- * This is the behaviour people expect when clicking on the statusbar icon. */
- gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
-
- if (gdk_window)
- {
- gint x, y;
- gint w, h;
-
- /* Has no effect if the WM has viewports, like compiz */
- gdk_x11_window_move_to_current_desktop (gdk_window);
-
- /* If window is still off-screen, hide it to force it to
- * reposition on the current workspace. */
- gtk_window_get_position (window, &x, &y);
- gtk_window_get_size (window, &w, &h);
- if (!EMPATHY_RECT_IS_ON_SCREEN (x, y, w, h))
- gtk_widget_hide (GTK_WIDGET (window));
- }
-
- if (timestamp == GDK_CURRENT_TIME)
- gtk_window_present (window);
- else
- gtk_window_present_with_time (window, timestamp);
-}
-
-void
-empathy_window_present (GtkWindow *window)
-{
- empathy_window_present_with_time (window, gtk_get_current_event_time ());
-}
-
/** empathy_make_absolute_url_len:
* @url: an url
* @len: a length
diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h
index f9627f7fe..79e3e1160 100644
--- a/libempathy-gtk/empathy-ui-utils.h
+++ b/libempathy-gtk/empathy-ui-utils.h
@@ -94,11 +94,6 @@ GdkPixbuf * empathy_pixbuf_from_icon_name_sized (const gchar *icon_name,
gchar * empathy_filename_from_icon_name (const gchar *icon_name,
GtkIconSize icon_size);
-/* Windows */
-void empathy_window_present (GtkWindow *window);
-void empathy_window_present_with_time (GtkWindow *window,
- guint32 timestamp);
-
void empathy_move_to_window_desktop (GtkWindow *window,
guint32 timestamp);