From: hiroshi h. <cos...@gm...> - 2015-01-11 13:49:40
|
> > > + raise(error) if ret == 0 > > Where is the "error" variable definition? > Did you run the code? > i'm sorry. I've forgot to remove trial and error code.... > In <bdd...@je...> > "[ruby-gnome2-cvs] ruby-gnome2/ruby-gnome2@bdd4e1d [master] gtk3: > Implement Gtk::UIManager#add_ui" on Sun, 11 Jan 2015 15:25:39 +0900, > Hiroshi Hatake <nu...@co...> wrote: > > > Hiroshi Hatake 2015-01-11 15:25:39 +0900 (Sun, 11 Jan 2015) > > > > New Revision: bdd4e1de3dded99b9c465d7106f99b5ed5253fcc > > > https://github.com/ruby-gnome2/ruby-gnome2/commit/bdd4e1de3dded99b9c465d7106f99b5ed5253fcc > > > > Message: > > gtk3: Implement Gtk::UIManager#add_ui > > > > But, Gtk::UIManager#add_ui_raw method is not using now.... :< > > > > Added files: > > gtk3/lib/gtk3/ui-manager.rb > > Modified files: > > gtk3/lib/gtk3/loader.rb > > > > Modified: gtk3/lib/gtk3/loader.rb (+1 -0) > > =================================================================== > > --- gtk3/lib/gtk3/loader.rb 2015-01-11 15:00:09 +0900 (fbd5d24) > > +++ gtk3/lib/gtk3/loader.rb 2015-01-11 15:25:39 +0900 (f118a19) > > @@ -84,6 +84,7 @@ module Gtk > > require "gtk3/tree-selection" > > require "gtk3/tree-store" > > require "gtk3/tree-view-column" > > + require "gtk3/ui-manager" > > require "gtk3/window" > > > > require "gtk3/deprecated" > > > > Added: gtk3/lib/gtk3/ui-manager.rb (+33 -0) 100644 > > =================================================================== > > --- /dev/null > > +++ gtk3/lib/gtk3/ui-manager.rb 2015-01-11 15:25:39 +0900 (1328e52) > > @@ -0,0 +1,33 @@ > > +# Copyright (C) 2015 Ruby-GNOME2 Project Team > > +# > > +# This library is free software; you can redistribute it and/or > > +# modify it under the terms of the GNU Lesser General Public > > +# License as published by the Free Software Foundation; either > > +# version 2.1 of the License, or (at your option) any later version. > > +# > > +# This library is distributed in the hope that it will be useful, > > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > > +# Lesser General Public License for more details. > > +# > > +# You should have received a copy of the GNU Lesser General Public > > +# License along with this library; if not, write to the Free Software > > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > 02110-1301 USA > > + > > +module Gtk > > + class UIManager > > + alias_method :add_ui_raw, :add_ui > > + def add_ui(buffer_or_filename=nil) > > + ret = 0 > > + if buffer_or_filename =~ /<ui>/ > > + ret = add_ui_from_string(buffer_or_filename, > > + buffer_or_filename.length) > > + else > > + ret = add_ui_from_file(buffer_or_filename) > > + end > > + raise(error) if ret == 0 > > + > > + ret > > + end > > + end > > +end > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > |