webpin/src/UrlEntry.vala
2017-07-31 22:55:55 +02:00

41 lines
1.8 KiB
Vala

/*-
* Copyright (c) 2015 Erasmo Marín <erasmo.marin@gmail.com>
* Copyright (c) 2017-2017 Artem Anufrij <artem.anufrij@live.de>
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 program. If not, see <http://www.gnu.org/licenses/>.
*
* The Noise authors hereby grant permission for non-GPL compatible
* GStreamer plugins to be used and distributed together with GStreamer
* and Noise. This permission is above and beyond the permissions granted
* by the GPL license by which Noise is covered. If you modify this code
* you may extend this exception to your version of the code, but you are not
* obligated to do so. If you do not wish to do so, delete this exception
* statement from your version.
*
* Authored by: Artem Anufrij <artem.anufrij@live.de>
*/
namespace Webpin {
public class UrlEntry : Gtk.Entry {
public UrlEntry () {
editable = false;
set_icon_from_icon_name (Gtk.EntryIconPosition.SECONDARY, "view-refresh-symbolic");
set_icon_from_icon_name (Gtk.EntryIconPosition.PRIMARY, "text-html-symbolic");
}
public override void get_preferred_width (out int minimum_width, out int natural_width) {
minimum_width = -1;
natural_width = 3000;
}
}
}