[latexila] Fix conflict between GLib.Menu and Gtk.Menu



commit 681f4740ac8055abcc58c1a05efab3ef629bf502
Author: SÃbastien Wilmet <swilmet src gnome org>
Date:   Wed Feb 1 23:34:07 2012 +0100

    Fix conflict between GLib.Menu and Gtk.Menu

 src/main_window.vala |   12 ++++++------
 src/search.vala      |    2 +-
 src/structure.vala   |    4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/main_window.vala b/src/main_window.vala
index e2bbb0d..797b83c 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -288,7 +288,7 @@ public class MainWindow : Window
         documents_panel = new DocumentsPanel (this);
         documents_panel.right_click.connect ((event) =>
         {
-            Menu popup_menu = (Menu) ui_manager.get_widget ("/NotebookPopup");
+            Gtk.Menu popup_menu = ui_manager.get_widget ("/NotebookPopup") as Gtk.Menu;
             popup_menu.popup (null, null, null, event.button, event.time);
         });
 
@@ -568,9 +568,9 @@ public class MainWindow : Window
         // show tooltips in the statusbar
         ui_manager.connect_proxy.connect ((action, p) =>
         {
-            if (p is MenuItem)
+            if (p is Gtk.MenuItem)
             {
-                MenuItem proxy = (MenuItem) p;
+                Gtk.MenuItem proxy = p as Gtk.MenuItem;
                 proxy.select.connect (on_menu_item_select);
                 proxy.deselect.connect (on_menu_item_deselect);
             }
@@ -578,9 +578,9 @@ public class MainWindow : Window
 
         ui_manager.disconnect_proxy.connect ((action, p) =>
         {
-            if (p is MenuItem)
+            if (p is Gtk.MenuItem)
             {
-                MenuItem proxy = (MenuItem) p;
+                Gtk.MenuItem proxy = p as Gtk.MenuItem;
                 proxy.select.disconnect (on_menu_item_select);
                 proxy.deselect.disconnect (on_menu_item_deselect);
             }
@@ -598,7 +598,7 @@ public class MainWindow : Window
 
     private void on_menu_item_select (Item proxy)
     {
-        Gtk.Action action = ((MenuItem) proxy).get_related_action ();
+        Gtk.Action action = ((Gtk.MenuItem) proxy).get_related_action ();
         return_if_fail (action != null);
         if (action.tooltip != null)
             statusbar.push (tip_message_cid, action.tooltip);
diff --git a/src/search.vala b/src/search.vala
index 43046d1..30a2976 100644
--- a/src/search.vala
+++ b/src/search.vala
@@ -173,7 +173,7 @@ public class SearchAndReplace : GLib.Object
             eventbox_label2.modify_bg (StateType.NORMAL, white);
 
             /* options menu */
-            Menu menu = new Menu ();
+            Gtk.Menu menu = new Gtk.Menu ();
             check_case_sensitive = new CheckMenuItem.with_label (_("Case sensitive"));
             check_entire_word = new CheckMenuItem.with_label (_("Entire words only"));
             menu.append (check_case_sensitive);
diff --git a/src/structure.vala b/src/structure.vala
index 378b9b0..8004319 100644
--- a/src/structure.vala
+++ b/src/structure.vala
@@ -58,7 +58,7 @@ public enum StructAction
 public class Structure : VBox
 {
     private unowned MainWindow _main_window;
-    private Menu _popup_menu;
+    private Gtk.Menu _popup_menu;
     private Gtk.Action _action_all_menu;
     private Gtk.Action _action_cut;
     private Gtk.Action _action_copy;
@@ -92,7 +92,7 @@ public class Structure : VBox
         GLib.Object (spacing: 3);
         _main_window = main_window;
 
-        _popup_menu = (Menu) ui_manager.get_widget ("/StructurePopup");
+        _popup_menu = ui_manager.get_widget ("/StructurePopup") as Gtk.Menu;
         _action_all_menu = ui_manager.get_action ("/MainMenu/Structure");
         _action_cut = ui_manager.get_action ("/StructurePopup/StructureCut");
         _action_copy = ui_manager.get_action ("/StructurePopup/StructureCopy");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]