diff -Nru ebview-0.3.6/debian/changelog ebview-0.3.6/debian/changelog --- ebview-0.3.6/debian/changelog 2007-05-17 01:58:59.000000000 +0200 +++ ebview-0.3.6/debian/changelog 2007-05-17 01:59:00.000000000 +0200 @@ -1,3 +1,12 @@ +ebview (0.3.6-2.1ubuntu1) gutsy; urgency=low + + * Merge from Debian unstable, remaining changes: + - Upload maintainer in field debian/control. + - Added debian/patches/01_popup_window.dpatch: Fix to display popup window + in the right place. + + -- Michele Angrisano Thu, 17 May 2007 01:47:44 +0200 + ebview (0.3.6-2.1) unstable; urgency=low * Non-maintainer upload. @@ -7,6 +16,14 @@ -- Emanuele Rocca Sun, 18 Mar 2007 23:37:27 +0100 +ebview (0.3.6-2ubuntu1) feisty; urgency=low + + * Merge from debian unstable. Remaining changes: + - Added debian/patches/01_popup_window.patch: Fix to display popup window + in the right place + + -- William Alexander Grant Sun, 10 Dec 2006 12:18:48 +1100 + ebview (0.3.6-2) unstable; urgency=low * Bumped to Standards-Version: 3.7.2. diff -Nru ebview-0.3.6/debian/control ebview-0.3.6/debian/control --- ebview-0.3.6/debian/control 2007-05-17 01:58:59.000000000 +0200 +++ ebview-0.3.6/debian/control 2007-05-17 01:59:00.000000000 +0200 @@ -1,7 +1,8 @@ Source: ebview Section: text Priority: extra -Maintainer: Masayuki Hatta (mhatta) +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Masayuki Hatta (mhatta) Build-Depends: debhelper (>> 4.0.0), libeb12-dev, libgtk2.0-dev Standards-Version: 3.7.2 diff -Nru ebview-0.3.6/debian/patches/00list ebview-0.3.6/debian/patches/00list --- ebview-0.3.6/debian/patches/00list 1970-01-01 01:00:00.000000000 +0100 +++ ebview-0.3.6/debian/patches/00list 2007-05-17 01:59:00.000000000 +0200 @@ -0,0 +1 @@ +01_popup_window diff -Nru ebview-0.3.6/debian/patches/01_popup_window.dpatch ebview-0.3.6/debian/patches/01_popup_window.dpatch --- ebview-0.3.6/debian/patches/01_popup_window.dpatch 1970-01-01 01:00:00.000000000 +0100 +++ ebview-0.3.6/debian/patches/01_popup_window.dpatch 2007-05-17 01:59:00.000000000 +0200 @@ -0,0 +1,189 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_popup_window.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad ebview-0.3.6~/src/popup.c ebview-0.3.6/src/popup.c +--- ebview-0.3.6~/src/popup.c 2004-02-22 14:58:30.000000000 +0900 ++++ ebview-0.3.6/src/popup.c 2006-05-02 14:56:50.000000000 +0900 +@@ -51,6 +51,8 @@ + //static CONTENT_AREA *popup_area=NULL; + + ++static void update_result(RESULT *result); ++ + gint close_popup(GtkWidget *widget, gpointer data) + { + +@@ -164,7 +166,7 @@ + return(0); + rp = (RESULT *)(current_in_result->data); + if(current_in_result){ +- show_popup(rp); ++ update_result(rp); + } + + } else if(strcmp(data, "X") == 0){ +@@ -246,28 +248,13 @@ + return(FALSE); + } + +-static void create_popup_window(){ +- ++static void move_popup_window() { + GdkModifierType mask; + gint pos_x, pos_y; + gint pointer_x, pointer_y; + gint root_x, root_y; +- GdkWindow *root_win = NULL; + gint window_width, window_height; +- +- GtkWidget *vbox; +- GtkWidget *hbox; +- GtkWidget *eventbox; +- GtkWidget *image; +- GtkWidget *frame; +- GtkWidget *separator; +- +-#ifdef __WIN32__ +- HWND hWnd; +- long nStyle; +-#endif +- +- LOG(LOG_DEBUG, "IN : create_popup_window()"); ++ GdkWindow *root_win = NULL; + + #ifdef __WIN32__ + root_x = GetSystemMetrics(SM_CXSCREEN); +@@ -277,16 +264,9 @@ + gdk_window_get_size(root_win, &root_x, &root_y); + #endif + +- // If there already is an window, use that position. +- // Move if the window is out of the screen. +-// gdk_window_get_position(popup->window, &pos_x, &pos_y); +-// gtk_widget_destroy(popup); +-// redraw = TRUE; +- + window_width = popup_width; + window_height = popup_height; + +- // If there is no window, determine from the mouse position. + gdk_window_get_pointer(root_win, &pointer_x, &pointer_y, &mask); + pos_x = pointer_x + align_x; + pos_y = pointer_y + align_y; +@@ -305,15 +285,49 @@ + } + } + ++ gtk_window_move(GTK_WINDOW(popup), pos_x, pos_y); ++} ++ ++static void create_popup_window(){ ++ ++ gint window_width, window_height; ++ ++ GtkWidget *vbox; ++ GtkWidget *hbox; ++ GtkWidget *eventbox; ++ GtkWidget *image; ++ GtkWidget *frame; ++ GtkWidget *separator; ++ ++#ifdef __WIN32__ ++ HWND hWnd; ++ long nStyle; ++#endif ++ ++ LOG(LOG_DEBUG, "IN : create_popup_window()"); ++ ++ // If there already is an window, use that position. ++ // Move if the window is out of the screen. ++// gdk_window_get_position(popup->window, &pos_x, &pos_y); ++// gtk_widget_destroy(popup); ++// redraw = TRUE; ++ ++ window_width = popup_width; ++ window_height = popup_height; ++/* + popup = gtk_widget_new (GTK_TYPE_WINDOW, + "type", GTK_WINDOW_TOPLEVEL, + "allow-shrink", TRUE, + "allow-grow", TRUE, + "default-width", window_width, + "default-height", window_height, +- + NULL); +- gtk_window_move(GTK_WINDOW(popup), pos_x, pos_y); ++*/ ++ popup = gtk_window_new(GTK_WINDOW_TOPLEVEL); ++ gtk_window_set_resizable(GTK_WINDOW(popup), TRUE); ++ gtk_window_set_default_size(GTK_WINDOW(popup), window_width, window_height); ++ gtk_window_set_accept_focus(GTK_WINDOW(popup), FALSE); ++ move_popup_window(); + gtk_window_set_wmclass(GTK_WINDOW(popup), "Popup", "EBView"); + g_signal_connect(G_OBJECT(popup), "delete_event", + G_CALLBACK(close_popup), NULL); +@@ -478,7 +492,7 @@ + show_popup(current_in_result->data); + } + +-void show_popup(RESULT *result) ++static void update_result(RESULT *result) + { + gchar *text=NULL; + GtkTextIter iter; +@@ -489,7 +503,7 @@ + + g_assert(result->type == RESULT_TYPE_EB); + +- LOG(LOG_DEBUG, "IN : show_popup()"); ++ LOG(LOG_DEBUG, "IN : update_result()"); + + text = ebook_get_text(result->data.eb.book_info, + result->data.eb.pos_text.page, +@@ -552,14 +566,24 @@ + gtk_adjustment_set_value( + gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(popup_scroll)), 0); + +- +- gtk_window_present(GTK_WINDOW(popup)); +- + g_free(text); + set_current_result(result); + + gtk_timeout_add(10, scroll_to_top, NULL); + +- LOG(LOG_DEBUG, "OUT : show_popup()"); ++ LOG(LOG_DEBUG, "OUT : update_result()"); ++} ++ ++void show_popup(RESULT *result) ++{ ++ LOG(LOG_DEBUG, "IN : show_popup()"); + ++ update_result(result); ++ if(bpushpin_down == FALSE){ ++ move_popup_window(); ++ } ++ gdk_window_show(GTK_WIDGET(popup)->window); ++ gdk_window_focus(GTK_WIDGET(popup)->window, gtk_get_current_event_time()); ++ ++ LOG(LOG_DEBUG, "OUT : show_popup()"); + } +diff -urNad ebview-0.3.6~/src/selection.c ebview-0.3.6/src/selection.c +--- ebview-0.3.6~/src/selection.c 2004-02-22 15:24:26.000000000 +0900 ++++ ebview-0.3.6/src/selection.c 2006-05-02 14:55:22.000000000 +0900 +@@ -66,7 +66,9 @@ + SetFocus(hWnd); + } + #else +- gtk_window_present(GTK_WINDOW(win)); ++ gdk_window_show(GTK_WIDGET(win)->window); ++ gdk_window_focus(GTK_WIDGET(win)->window, gtk_get_current_event_time()); ++ + #endif + } +