Re: [gitg] [PATCH] gdk_window_get_pointer is deprecated



Hi,

have a look at how to clone it here:
https://github.com/nacho/libgit2-glib

Regards.

On Tue, May 8, 2012 at 1:07 PM, Adam Dingle <adam yorba org> wrote:
Ignacio,

nice to hear about the Vala port.  I just tried to build the vala branch of gitg.  It uses a couple of submodules:

$ cat .gitmodules
[submodule "libgit2"]
path = libgit2
url = "" href="https://github.com/libgit2/libgit2.git" target="_blank">https://github.com/libgit2/libgit2.git
[submodule "libgit2-glib"]
path = libgit2-glib
url = "" github com:nacho/libgit2-glib.git

One of these has your username in it, so I can't clone it:

$ git submodule update
...
Cloning into 'libgit2-glib'...
..
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Clone of 'git github com:nacho/libgit2-glib.git' into submodule path 'libgit2-glib' failed

Any advice?

adam


On Tue, May 8, 2012 at 3:31 AM, Ignacio Casal Quinteiro <nacho resa gmail com> wrote:
Hi Conor,

See that gitg is being reworked in vala so that's the reason we don't
pay attention to the master branch anymore.

Regards.

On Fri, May 4, 2012 at 7:40 PM, Conor O'Gorman <i conorogorman net> wrote:
Signed-off-by: Conor O'Gorman <i conorogorman net>
---
 gitg/gitg-commit-view.c |   12 ++++++++++--
 gitg/gitg-dnd.c         |    9 ++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/gitg/gitg-commit-view.c b/gitg/gitg-commit-view.c
index bda199e..6b94839 100644
--- a/gitg/gitg-commit-view.c
+++ b/gitg/gitg-commit-view.c
@@ -1114,11 +1114,15 @@ get_info_at_pointer (GitgCommitView    *view,
       gint height;
       gint buf_x;
       gint buf_y;
+       GdkDeviceManager *device_manager;
+       GdkDevice *pointer;

       /* Get where the pointer really is. */
       GdkWindow *win = gtk_text_view_get_window (textview, GTK_TEXT_WINDOW_TEXT);

-       gdk_window_get_pointer (win, &x, &y, NULL);
+       device_manager = gdk_display_get_device_manager (gdk_window_get_display (win));
+       pointer = gdk_device_manager_get_client_pointer (device_manager);
+       gdk_window_get_device_position (win, pointer, &x, &y, NULL);

       width = gdk_window_get_width (win);
       height = gdk_window_get_height (win);
@@ -1237,11 +1241,15 @@ gutter_event (GtkWidget      *widget,
       GitgDiffLineType line_type;
       GtkSourceGutter *gutter;
       GtkSourceGutterRenderer *renderer_at_pos;
+       GdkDeviceManager *device_manager;
+       GdkDevice *pointer;

       /* Get where the pointer really is. */
       GdkWindow *win = gtk_text_view_get_window (textview, GTK_TEXT_WINDOW_LEFT);

-       gdk_window_get_pointer (win, &x, &y, NULL);
+       device_manager = gdk_display_get_device_manager (gdk_window_get_display (win));
+       pointer = gdk_device_manager_get_client_pointer (device_manager);
+       gdk_window_get_device_position (win, pointer, &x, &y, NULL);

       width = gdk_window_get_width (win);
       height = gdk_window_get_height (win);
diff --git a/gitg/gitg-dnd.c b/gitg/gitg-dnd.c
index 2b6b91b..b41f877 100644
--- a/gitg/gitg-dnd.c
+++ b/gitg/gitg-dnd.c
@@ -512,8 +512,15 @@ vertical_autoscroll (GitgDndData *data)
       gint y;
       gint offset;
       gfloat value;
+       GdkDeviceManager *device_manager;
+       GdkDevice *pointer;
+       GdkWindow *window;
+
+       window = gtk_tree_view_get_bin_window (data->tree_view);
+       device_manager = gdk_display_get_device_manager (gdk_window_get_display (window));
+       pointer = gdk_device_manager_get_client_pointer (device_manager);
+       gdk_window_get_device_position (window, pointer, NULL, &y, NULL);

-       gdk_window_get_pointer (gtk_tree_view_get_bin_window (data->tree_view), NULL, &y, NULL);
       gtk_tree_view_convert_bin_window_to_tree_coords (data->tree_view, 0, y, NULL, &y);

       gtk_tree_view_get_visible_rect (data->tree_view, &visible_rect);
--
1.7.9.5

_______________________________________________
gitg-list mailing list
gitg-list gnome org
http://mail.gnome.org/mailman/listinfo/gitg-list



--
Ignacio Casal Quinteiro




--
Ignacio Casal Quinteiro


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]