~ubuntu-branches/debian/sid/gnome-chess/sid

« back to all changes in this revision

Viewing changes to debian/patches/004-board-window-fix.diff

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2005-09-04 18:16:43 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050904181643-qfph33u3pa4azz5h
Tags: 0.3.3-6
* Fix problems with gcc 4.0:
  + debian/patches/021-gcc-4.0-fixes.diff: New patch.
  + Closes: #258798 "FTBFS with gcc-3.4: label at end of compound statement"
* Fix wrong Debian patch:
  + debian/patch/019-assertions.diff: Fixed.
  + Partly addresses bug #247846 "Crashes after a few moves (assertion
    failed)". This fix is not perfect. As Göran Weinholt notes in the
    bug report, assertions are not the way to go, but are a temporary
    stop-gap measure. (Better assertions than unpredicable results.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- src/board-window.c.old      2003-06-12 02:34:33.000000000 +0200
 
2
+++ src/board-window.c  2003-06-12 02:34:53.000000000 +0200
 
3
@@ -110,6 +110,7 @@
 
4
 
 
5
        board_window_set_program_menu (window);
 
6
        board_window_set_server_menu (window);
 
7
+       gtk_notebook_set_page(GTK_NOTEBOOK(priv->view_nb),0);
 
8
 
 
9
        gtk_signal_connect_after (GTK_OBJECT (priv->view_nb), "switch_page",
 
10
                                  (GtkSignalFunc) bw_switch_page_cb, window);
 
11
@@ -168,6 +169,9 @@
 
12
        priv = window->priv;
 
13
        
 
14
        gtk_notebook_remove_page (priv->view_nb, page_num);
 
15
+       if (g_list_length(gtk_container_children(GTK_CONTAINER(priv->view_nb)))
 
16
+                       == 0)
 
17
+                gtk_main_quit();
 
18
 }
 
19
 
 
20
 void 
 
21
@@ -277,7 +281,7 @@
 
22
        priv = window->priv;
 
23
        
 
24
        page_num = gtk_notebook_page_num (priv->info_nb, child);
 
25
-       if (page_num < 0)
 
26
+       if (page_num <= 0)
 
27
                return;
 
28
        
 
29
        gtk_notebook_remove_page (priv->info_nb, page_num);
 
30
@@ -295,6 +299,8 @@
 
31
        g_free (priv);
 
32
 
 
33
        GTK_OBJECT_CLASS (parent_class)->destroy (object);
 
34
+
 
35
+       gtk_main_quit ();
 
36
 }
 
37
 
 
38
 static void