Only use the new Stock syntax if we have vala >= 0.12
authorJavier Jardón <javier.jardon@codethink.co.uk>
Wed, 4 May 2011 22:49:48 +0000 (23:49 +0100)
committerJavier Jardón <javier.jardon@codethink.co.uk>
Wed, 4 May 2011 22:50:49 +0000 (23:50 +0100)
src/moonshot-add-dialog.vala
src/moonshot-window.vala

index f425798..e490cbc 100644 (file)
@@ -24,7 +24,11 @@ class AddIdentityDialog : Dialog
         this.set_modal (true);
 
         this.add_buttons (_("Add ID Card"), ResponseType.OK,
+#if VALA_0_12
                           Stock.CANCEL, ResponseType.CANCEL);
+#else
+                          STOCK_CANCEL, ResponseType.CANCEL);
+#endif
 
         var content_area = this.get_content_area ();
         ((Box) content_area).set_spacing (12);
index 77973dc..af079ba 100644 (file)
@@ -409,9 +409,17 @@ class MainWindow : Window
         label_make_bold (services_vbox_title);
         services_vbox_title.set_alignment (0, (float) 0.5);
         var email_label = new Label (_("Email"));
+#if VALA_0_12
         var email_remove_button = new Button.from_stock (Stock.REMOVE);
+#else
+        var email_remove_button = new Button.from_stock (STOCK_REMOVE);
+#endif
         var im_label = new Label (_("IM"));
+#if VALA_0_12
         var im_remove_button = new Button.from_stock (Stock.REMOVE);
+#else
+        var im_remove_button = new Button.from_stock (STOCK_REMOVE);
+#endif
         var services_table = new Table (2, 2, false);
         services_table.set_col_spacings (10);
         services_table.set_row_spacings (10);