Browse Source

* a few fixes to make gtk_demo and helloworld2 examples compile

git-svn-id: trunk@3789 -
Almindor 19 years ago
parent
commit
25fa4a1748

+ 5 - 5
packages/extra/gtk2/examples/gtk_demo/appwindow.inc

@@ -279,11 +279,11 @@ begin
                               TGDestroyNotify (@g_object_unref));
 
     (* create menu items *)
-    menu_items[2].extra_data:=Pointer(GTK_STOCK_NEW);
-    menu_items[3].extra_data:=Pointer(GTK_STOCK_OPEN);
-    menu_items[4].extra_data:=Pointer(GTK_STOCK_SAVE);
-    menu_items[5].extra_data:=Pointer(GTK_STOCK_SAVE_AS);
-    menu_items[7].extra_data:=Pointer(GTK_STOCK_QUIT);
+    menu_items[2].extra_data:=PChar(GTK_STOCK_NEW);
+    menu_items[3].extra_data:=PChar(GTK_STOCK_OPEN);
+    menu_items[4].extra_data:=PChar(GTK_STOCK_SAVE);
+    menu_items[5].extra_data:=PChar(GTK_STOCK_SAVE_AS);
+    menu_items[7].extra_data:=PChar(GTK_STOCK_QUIT);
 
     gtk_item_factory_create_items (item_factory, high (menu_items),
                                    @menu_items[1], application_window );

+ 3 - 3
packages/extra/gtk2/examples/gtk_demo/textview.inc

@@ -333,9 +333,9 @@ begin
             + 'blah blah blah blah blah blah blah blah blah'#13#10#13#10, -1,
                                             'char_wrap', [NULL]);
 
-  gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
-            + 'This line has all wrapping turned off, so it makes the horizontal '
-            + 'scrollbar appear.'#13#10#13#10#13#10, -1,
+  gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, PChar(
+              'This line has all wrapping turned off, so it makes the horizontal '
+            + 'scrollbar appear.'#13#10#13#10#13#10), -1,
                                             'no_wrap', [NULL]);
 
   gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Justification. ', -1,

+ 2 - 2
packages/extra/gtk2/examples/helloworld2/helloworld2.pas

@@ -66,7 +66,7 @@ begin
     (* Now when the button is clicked, we call the "callback" function
      * with a pointer to "button 1" as its argument *)
     g_signal_connect (G_OBJECT (button), 'clicked',
-                              G_CALLBACK (@callback), gpointer('button 1'));
+                              G_CALLBACK (@callback), PChar('button 1'));
 
     (* Instead of gtk_container_add, we pack this button into the invisible
      * box, which has been packed into the window. *)
@@ -82,7 +82,7 @@ begin
     (* Call the same callback function with a different argument,
      * passing a pointer to "button 2" instead. *)
     g_signal_connect (G_OBJECT (button), 'clicked',
-                              G_CALLBACK (@callback), gpointer ('button 2'));
+                              G_CALLBACK (@callback), PChar('button 2'));
 
     gtk_box_pack_start(GTK_BOX (box1), button, TRUE, TRUE, 0);