~ubuntu-branches/ubuntu/trusty/libgtkada2/trusty

« back to all changes in this revision

Viewing changes to patches/06-415137.patch

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Brenta
  • Date: 2007-08-03 00:09:37 UTC
  • Revision ID: james.westby@ubuntu.com-20070803000937-r99pyiuwre5b2hde
Tags: 2.8.1-6

* Gratefully acknowledge the non-maintainer upload.  Thanks, Kees.
* patches/02-commands.patch (gtkada-config): fix the directory for .ali
  files.  Closes: #402505.
* patches/06-415137.patch: new.  Closes: #415137.
* debian/gtkada2.gpr: clarify the documentation, and replace the &
  concatenation operator, which was incorrect, with a comma which is
  correct.  Closes: #435440.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: libgtkada2-2.8.1/src/gtk-dialog.ads
 
2
===================================================================
 
3
--- libgtkada2-2.8.1.orig/src/gtk-dialog.ads    2007-08-02 22:42:39.289756028 +0200
 
4
+++ libgtkada2-2.8.1/src/gtk-dialog.ads 2007-08-02 22:43:01.921265956 +0200
 
5
@@ -46,6 +46,8 @@
 
6
 --  <testgtk>create_dialog.adb</testgtk>
 
7
 --  <screenshot>gtk-dialog</screenshot>
 
8
 
 
9
+with Interfaces.C;
 
10
+
 
11
 with Glib.Properties;
 
12
 with Gtk.Box;
 
13
 with Gtk.Widget;
 
14
@@ -60,11 +62,10 @@
 
15
    -- Enumeration types --
 
16
    -----------------------
 
17
 
 
18
-   type Gtk_Dialog_Flags is mod 3;
 
19
-   pragma Convention (C, Gtk_Dialog_Flags);
 
20
-   Modal               : constant Gtk_Dialog_Flags := 0;
 
21
-   Destroy_With_Parent : constant Gtk_Dialog_Flags := 1;
 
22
-   No_Separator        : constant Gtk_Dialog_Flags := 2;
 
23
+   type Gtk_Dialog_Flags is new Interfaces.C.int;
 
24
+   Modal               : constant Gtk_Dialog_Flags := 2 ** 0;
 
25
+   Destroy_With_Parent : constant Gtk_Dialog_Flags := 2 ** 1;
 
26
+   No_Separator        : constant Gtk_Dialog_Flags := 2 ** 2;
 
27
    --  Various flags that can be set for the dialog, with the following
 
28
    --  implications:
 
29
    --     - Modal : the dialog is modal, see Gtk.Window.Set_Modal
 
30
@@ -72,6 +73,12 @@
 
31
    --       destroyed. See Gtk.Window.Set_Destroy_With_Parent
 
32
    --     - No_Separator: No separator bar above the buttons.
 
33
 
 
34
+   -- ??? The C definition of this type is wrong, as they use an enumeration
 
35
+   -- for values that can be added together, as shown in the example for
 
36
+   -- gtk_dialog_new_with_buttons.  In fact this is really a bit field.  Per C
 
37
+   -- rules, enumerations are implicitly converted to "int", so we base the
 
38
+   -- Gtk_Dialog_Flags on that.
 
39
+
 
40
    type Gtk_Response_Type is new Gint;
 
41
    --  Type used for Response_Id's.
 
42
    --  Positive values are totally user-interpreted.
 
43
Index: libgtkada2-2.8.1/src/gtkada-dialogs.adb
 
44
===================================================================
 
45
--- libgtkada2-2.8.1.orig/src/gtkada-dialogs.adb        2007-08-02 22:42:39.333755075 +0200
 
46
+++ libgtkada2-2.8.1/src/gtkada-dialogs.adb     2007-08-02 22:43:01.921265956 +0200
 
47
@@ -229,7 +229,7 @@
 
48
         (Dialog,
 
49
          Title  => Title,
 
50
          Parent => Parent,
 
51
-         Flags  => Modal or Destroy_With_Parent);
 
52
+         Flags  => Modal + Destroy_With_Parent);
 
53
 
 
54
       --  Realize it so that we force the creation of its Gdk_Window.
 
55
       --  This is needed below to create a pixmap.
 
56
Index: libgtkada2-2.8.1/src/gtkada-mdi.adb
 
57
===================================================================
 
58
--- libgtkada2-2.8.1.orig/src/gtkada-mdi.adb    2007-08-02 23:07:02.314158152 +0200
 
59
+++ libgtkada2-2.8.1/src/gtkada-mdi.adb 2007-08-02 23:07:07.910037024 +0200
 
60
@@ -2900,7 +2900,7 @@
 
61
                Gtk_New (Diag,
 
62
                         Title  => Child.Title.all,
 
63
                         Parent => Parent,
 
64
-                        Flags  => No_Separator or Destroy_With_Parent);
 
65
+                        Flags  => No_Separator + Destroy_With_Parent);
 
66
             end;
 
67
 
 
68
             Set_Has_Separator (Diag, False);