]> git.lyx.org Git - lyx.git/commitdiff
Rename some confusing variables (nested same-name variables)
authorJohn Spray <spray@lyx.org>
Sat, 21 Jan 2006 21:38:32 +0000 (21:38 +0000)
committerJohn Spray <spray@lyx.org>
Sat, 21 Jan 2006 21:38:32 +0000 (21:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10765 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/ChangeLog
src/frontends/gtk/GMenubar.C

index 41aed98f365fe92532e443166974c8398d1fdee6..4049b72e3a0adcc7790b72c6916e78a8faeff887 100644 (file)
@@ -6,6 +6,7 @@
          to the still-incomplete document dialog.
        * Alert_pimpl.C: Make generic dialogs use the titles LyX gives them
        * GGraphics.C: Default to scaling 100% when no scaling or size is given
+       * GMenubar.C: Rename some confusing variables
 
 2006-01-20  Bernhard Reiter  <ockham@gmx.net>
 
index f90780c0f3c37b0bc442c2a029e9a8ca6ca3a04b..f9b398c9f1b7c95868cf0b1e93646143c617106c 100644 (file)
@@ -181,10 +181,10 @@ void GMenubar::onSubMenuActivate(MenuItem const * item,
                                        Gtk::Menu_Helpers::CheckMenuElem(
                                                labelTrans(i->label(),
                                                           i->shortcut())));
-                               Gtk::CheckMenuItem& citem =
+                               Gtk::CheckMenuItem& checkitem =
                                        static_cast<Gtk::CheckMenuItem&>(
                                                gmenu->items().back());
-                               citem.set_active(on);
+                               checkitem.set_active(on);
                        } else {
                                // Choose an icon from the funcrequest
                                Gtk::BuiltinStockID stockID = getGTKStockIcon(i->func());
@@ -205,9 +205,9 @@ void GMenubar::onSubMenuActivate(MenuItem const * item,
                                        }
                                }
 
-                               Gtk::ImageMenuItem * item = Gtk::manage(new Gtk::ImageMenuItem);
+                               Gtk::ImageMenuItem * imgitem = Gtk::manage(new Gtk::ImageMenuItem);
                                if (image)
-                                       item->set_image(*image);
+                                       imgitem->set_image(*image);
 
                                // This hbox is necessary because add_accel_label is protected,
                                // and even if you subclass Gtk::MenuItem then add_accel_label
@@ -219,17 +219,17 @@ void GMenubar::onSubMenuActivate(MenuItem const * item,
                                        "   " + i->binding(), false));
                                hbox->pack_start(*label1, false, false, 0);
                                hbox->pack_end(*label2, false, false, 0);
-                               item->add(*hbox);
+                               imgitem->add(*hbox);
 
-                               gmenu->append(*item);
-                               item->show_all();
+                               gmenu->append(*imgitem);
+                               imgitem->show_all();
                        }
-                       Gtk::MenuItem & item = gmenu->items().back();
-                       item.signal_activate().connect(
+                       Gtk::MenuItem & newitem = gmenu->items().back();
+                       newitem.signal_activate().connect(
                                sigc::bind(sigc::mem_fun(*this, &GMenubar::onCommandActivate),
-                                          &(*i), &item));
+                                          &(*i), &newitem));
                        if (!flag.enabled())
-                               item.set_sensitive(false);
+                               newitem.set_sensitive(false);
                        break;
                }
                case MenuItem::Separator: