| 1 | # Copyright 2008, 2009, 2010, 2011 Kevin Ryde | ||
| 2 | |||
| 3 | # This file is part of Chart. | ||
| 4 | # | ||
| 5 | # Chart is free software; you can redistribute it and/or modify it under the | ||
| 6 | # terms of the GNU General Public License as published by the Free Software | ||
| 7 | # Foundation; either version 3, or (at your option) any later version. | ||
| 8 | # | ||
| 9 | # Chart is distributed in the hope that it will be useful, but WITHOUT ANY | ||
| 10 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 11 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
| 12 | # details. | ||
| 13 | # | ||
| 14 | # You should have received a copy of the GNU General Public License along | ||
| 15 | # with Chart. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | |||
| 17 | package App::Chart::Gtk2::Symlist::Join; | ||
| 18 | use 5.008; | ||
| 19 | use strict; | ||
| 20 | use warnings; | ||
| 21 | use Gtk2; | ||
| 22 | |||
| 23 | use App::Chart; | ||
| 24 | |||
| 25 | use Gtk2::Ex::ListModelConcat; | ||
| 26 | use Glib::Object::Subclass | ||
| 27 | 'Gtk2::Ex::ListModelConcat', | ||
| 28 | |||
| 29 | properties => [ Glib::ParamSpec->string | ||
| 30 | ('key', | ||
| 31 | 'key', | ||
| 32 | 'The symlist database key.', | ||
| 33 | '', | ||
| 34 | Glib::G_PARAM_READWRITE), | ||
| 35 | |||
| 36 | Glib::ParamSpec->string | ||
| 37 | ('name', | ||
| 38 | 'name', | ||
| 39 | 'The symlist name.', | ||
| 40 | 'Join ...', # default | ||
| 41 | Glib::G_PARAM_READWRITE) ]; | ||
| 42 | |||
| 43 | use App::Chart::Gtk2::Symlist; | ||
| 44 | use base 'App::Chart::Gtk2::Symlist'; | ||
| 45 | |||
| 46 | |||
| 47 | sub can_edit { return 0; } | ||
| 48 | sub can_destroy { return 0; } | ||
| 49 | |||
| 50 | my $counter = 0; | ||
| 51 | |||
| 52 | sub new { | ||
| 53 | my ($class, @symlists) = @_; | ||
| 54 | my $self = Glib::Object::new ($class, models => \@symlists); | ||
| 55 | $self->{'key'} = '_join_' . $counter++; | ||
| 56 | return $self; | ||
| 57 | } | ||
| 58 | |||
| 59 | |||
| 60 | 1; | ||
| 61 | __END__ |