diff -Nru indicator-terminal-0.12/CMakeLists.txt indicator-terminal-0.1/CMakeLists.txt --- indicator-terminal-0.12/CMakeLists.txt 2013-08-24 07:46:44.000000000 +0000 +++ indicator-terminal-0.1/CMakeLists.txt 2013-08-25 20:51:08.000000000 +0000 @@ -27,6 +27,12 @@ set(CPACK_SOURCE_GENERATOR "TBZ2") set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}") set(CPACK_SOURCE_IGNORE_FILES "/build/;/.bzr/;~$;.bzrignore;${CPACK_SOURCE_IGNORE_FILES}") + + +file (GLOB _files "${CMAKE_CURRENT_SOURCE_DIR}/data/*") +install (FILES ${_files} DESTINATION ${PKGDATADIR}) + + include(CPack) add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) @@ -73,5 +79,5 @@ execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} indicator3-0.4 --variable=indicatordir OUTPUT_VARIABLE current_indicatordir OUTPUT_STRIP_TRAILING_WHITESPACE) set (INDICATORDIR ${current_indicatordir}) -install(TARGETS ${NAME} DESTINATION ${INDICATORDIR}) +install(TARGETS ${NAME} LIBRARY DESTINATION ${INDICATORDIR}) diff -Nru indicator-terminal-0.12/data/terminal-indicator-symbolic.svg indicator-terminal-0.1/data/terminal-indicator-symbolic.svg --- indicator-terminal-0.12/data/terminal-indicator-symbolic.svg 1970-01-01 00:00:00.000000000 +0000 +++ indicator-terminal-0.1/data/terminal-indicator-symbolic.svg 2013-08-25 20:51:08.000000000 +0000 @@ -0,0 +1,111 @@ + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + >_ + diff -Nru indicator-terminal-0.12/debian/bzr-builder.manifest indicator-terminal-0.1/debian/bzr-builder.manifest --- indicator-terminal-0.12/debian/bzr-builder.manifest 2013-08-24 07:46:45.000000000 +0000 +++ indicator-terminal-0.1/debian/bzr-builder.manifest 2013-08-25 20:51:10.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0~1 -lp:~tombeckmann/+junk/indicator-terminal revid:tomjonabc@gmail.com-20130821192532-ad1d0yntpd7im83s -nest-part packaging lp:~gotwig/+junk/indicator-terminal-deb-packaging debian debian revid:eduardgotwig@gmail.com-20130824074517-gal5tifjhzfphsvz +# bzr-builder format 0.3 deb-version {debupstream}-0~8 +lp:indicator-terminal revid:erasmo.marin@gmail.com-20130825025406-0po2lsnnjfgpx79i +nest-part packaging lp:~indicator-terminal/indicator-terminal/deb-packaging debian debian revid:eduardgotwig@gmail.com-20130825203053-cik4figpcqa0z871 diff -Nru indicator-terminal-0.12/debian/changelog indicator-terminal-0.1/debian/changelog --- indicator-terminal-0.12/debian/changelog 2013-08-24 07:46:45.000000000 +0000 +++ indicator-terminal-0.1/debian/changelog 2013-08-25 20:51:10.000000000 +0000 @@ -1,18 +1,11 @@ -indicator-terminal (0.12-0~1~precise1) precise; urgency=low +indicator-terminal (0.1-0~8~precise1) precise; urgency=low * Auto build. - -- Eduard Gotwig Sat, 24 Aug 2013 07:46:45 +0000 + -- Eduard Gotwig Sun, 25 Aug 2013 20:51:10 +0000 -indicator-terminal (0.12) precise; urgency=low +indicator-terminal (0.1-0) precise; urgency=low - * Initial Release, part two - - -- Eduard Gotwig Sat, 24 Aug 2013 09:44:28 +0200 - -indicator-terminal (0.11) UNRELEASED; urgency=low - - * Initial release. - - -- Eduard Gotwig Sun, 24 Aug 2013 09:38:00 +0200 + * Initial Release. + -- Erasmo Marín Thu, 22 Aug 2013 00:00:00 +0100 diff -Nru indicator-terminal-0.12/debian/control indicator-terminal-0.1/debian/control --- indicator-terminal-0.12/debian/control 2013-08-24 07:46:45.000000000 +0000 +++ indicator-terminal-0.1/debian/control 2013-08-25 20:51:09.000000000 +0000 @@ -1,21 +1,20 @@ Source: indicator-terminal Section: utils Priority: optional -Maintainer: Eduard Gotwig -Depends: ${misc:Depends} -Build-Depends: cmake, - debhelper (>= 7), - pkg-config, +Maintainer: Erasmo Marín +Build-Depends: cmake (>= 2.8), + debhelper, libgranite-dev, - libindicator3-dev, - libkeybinder-3.0-dev, - libvte-2.90-dev, - valac-0.16 | valac (>= 0.16) + libgtk-3-dev, + pkg-config, + libindicator-dev, + libkeybinder-3.0-dev, + libvte-2.90-dev, + valac-0.18 | valac (>= 0.18) Standards-Version: 3.9.3 -Homepage: https://code.launchpad.net/~tombeckmann/+junk/indicator-terminal +Homepage: https://launchpad.net/indicator-terminal Package: indicator-terminal Architecture: any -Depends: ${misc:Depends} -Description: A simple terminal in an indicator. - Run your favorite shell commands from a terminal indicator. +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: A very simple terminal indicator. diff -Nru indicator-terminal-0.12/debian/copyright indicator-terminal-0.1/debian/copyright --- indicator-terminal-0.12/debian/copyright 2013-08-24 07:46:45.000000000 +0000 +++ indicator-terminal-0.1/debian/copyright 2013-08-25 20:51:09.000000000 +0000 @@ -1,27 +1,86 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: indicator-terminal -Source: https://code.launchpad.net/~tombeckmann/+junk/indicator-terminal +Source: https://launchpad.net/indicator-terminal Files: * -Copyright: 2013 Eduard Gotwig , Tom Beckmann -License: GPL-3.0 - Indicator-Terminal by Tom Beckmann - Copyright (C) 2013 Tom Beckmann - . - This program is free software; you can redistribute it and/or modify +Copyright: 2013 Erasmo Marín +License: GPL-3.0+ + +Files: src/* +Copyright: 2013 Erasmo Marín +License: GPL-3.0+ + + +Files: cmake/vala/ParseArguments.cmake +Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium +License: 2-clause BSD + +Files: cmake/vala/FindVala.cmake + cmake/vala/ValaPrecompile.cmake + cmake/vala/ValaVersion.cmake +Copyright: 2009-2010 Jakob Westhoff +License: 2-clause BSD + + +Files: debian/* +Copyright: 2012 Erasmo Marín +License: GPL-3.0+ + + +License: GPL-3.0+ + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. . - This program is distributed in the hope that it will be useful, + This package 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 General Public License for more details. . You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + + +License: LGPL-2.1+ + This package 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; version 2.1 + of the License, or (at your option) any later version. + . + This package 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 General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU Lesser General + Public License 2.1 can be found in "/usr/share/common-licenses/LGPL-2.1". + -X-Comment: On Debian GNU/Linux systems, the complete text of the GNU General - Public License can be found in the /usr/share/common-licenses/GPL-3 file. +License: 2-clause BSD + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -Nru indicator-terminal-0.12/debian/indicator-terminal.lintian-overrides indicator-terminal-0.1/debian/indicator-terminal.lintian-overrides --- indicator-terminal-0.12/debian/indicator-terminal.lintian-overrides 2013-08-24 07:46:45.000000000 +0000 +++ indicator-terminal-0.1/debian/indicator-terminal.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -indicator-terminal: pkg-has-shlibs-control-file-but-no-actual-shared-libs diff -Nru indicator-terminal-0.12/debian/rules indicator-terminal-0.1/debian/rules --- indicator-terminal-0.12/debian/rules 2013-08-24 07:46:45.000000000 +0000 +++ indicator-terminal-0.1/debian/rules 2013-08-25 20:51:09.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/make -f -# Disable unit testing -export DEB_BUILD_OPTIONS=nocheck - %: - dh $@ + dh $@ + +override_dh_auto_install: + dh_auto_install --destdir=debian/indicator-terminal diff -Nru indicator-terminal-0.12/src/Main.vala indicator-terminal-0.1/src/Main.vala --- indicator-terminal-0.12/src/Main.vala 2013-08-24 07:46:44.000000000 +0000 +++ indicator-terminal-0.1/src/Main.vala 2013-08-25 20:51:08.000000000 +0000 @@ -1,20 +1,35 @@ -namespace Terminal -{ - public class Menu : Gtk.Menu - { +namespace Terminal { + + public class Menu : Gtk.Menu { + Vte.Terminal terminal; Pid pid; - public Menu () - { + public Menu () { + + this.margin = 0; + terminal.margin = 0; terminal = new Vte.Terminal (); terminal.fork_command_full (Vte.PtyFlags.DEFAULT, "~", { Vte.get_user_shell () }, null, SpawnFlags.SEARCH_PATH, null, out pid); - terminal.width_request = 480; - terminal.height_request = 320; + terminal.get_pty_object ().set_size (40, 50); + //minimal widht and height, just in case... + terminal.width_request = 150; + terminal.height_request = 200; + set_colors(); + + /*var scrolled = new Gtk.ScrolledWindow(null, null); + scrolled.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC); + scrolled.add_with_viewport (terminal);*/ + var item = new Gtk.MenuItem (); item.add (terminal); add (item); + //prevent the item to be selected (ugly blue background) + this.motion_notify_event.connect(()=>{ + item.deselect(); + return false; + }); show_all (); show.connect (() => { @@ -25,36 +40,58 @@ }); } - public override bool button_press_event (Gdk.EventButton event) - { + public override bool button_press_event (Gdk.EventButton event) { return terminal.button_press_event (event); } - public override bool button_release_event (Gdk.EventButton event) - { + public override bool button_release_event (Gdk.EventButton event) { return terminal.button_release_event (event); } - public override bool key_press_event (Gdk.EventKey event) - { + public override bool key_press_event (Gdk.EventKey event) { return terminal.key_press_event (event); } - public override bool key_release_event (Gdk.EventKey event) - { + public override bool key_release_event (Gdk.EventKey event) { return terminal.key_release_event (event); } + + public void set_colors() { + + Gdk.Color background; + Gdk.Color foreground; + Gdk.Color[] palette = {}; + + Gdk.RGBA theme_background; + Gdk.RGBA theme_foreground; + + + theme_background = this.get_style_context ().get_background_color (Gtk.StateFlags.NORMAL); + theme_foreground = this.get_style_context ().get_color (Gtk.StateFlags.NORMAL); + + Gdk.Color.parse(from_rgba_to_hex(theme_foreground), out foreground); + Gdk.Color.parse(from_rgba_to_hex(theme_background), out background); + + terminal.set_colors(foreground, background, palette); + } + + public string from_rgba_to_hex(Gdk.RGBA rgba) { + return "#%02x%02x%02x".printf((uint)Math.round(rgba.red*255), + (uint)Math.round(rgba.green*255), + (uint)Math.round(rgba.blue*255)); + } + } - public class Main : Object - { + public class Main : Object { + public Menu menu { get; private set; } string? current_shortcut; Cancellable? current_search = null; - public Main () - { + public Main () { + menu = new Menu (); // shortcut @@ -62,21 +99,21 @@ update_shortcut (); } - public void update_shortcut () - { + public void update_shortcut () { current_shortcut = "space"; Keybinder.bind (current_shortcut, handle_shortcut, this); } - public void show_menu () - { + public void show_menu () { + (menu.get_attach_widget () as Gtk.MenuItem).activate_item (); + menu.deselect (); } } - public static Gdk.Pixbuf? find_icon (string name, int size) - { + public static Gdk.Pixbuf? find_icon (string name, int size) { + try { var icon = Icon.new_for_string (name); if (icon == null) @@ -90,8 +127,7 @@ return null; } - public static void handle_shortcut (string key, void* data) - { + public static void handle_shortcut (string key, void* data) { var self = (Main)data; // unfortunately things are not that easy here. Gtk throws an error about no device // when trying to grab. Waiting until the key is released solves this problem, so @@ -104,4 +140,3 @@ self.show_menu (); } } - diff -Nru indicator-terminal-0.12/src/indicator-terminal.c indicator-terminal-0.1/src/indicator-terminal.c --- indicator-terminal-0.12/src/indicator-terminal.c 2013-08-24 07:46:44.000000000 +0000 +++ indicator-terminal-0.1/src/indicator-terminal.c 2013-08-25 20:51:08.000000000 +0000 @@ -26,7 +26,7 @@ #include "indicator-terminal.h" #include "main.h" -#define ICON "edit-find-symbolic" +#define ICON "terminal-indicator-symbolic" struct _IndicatorTerminalPrivate {