Commit 347b34a1 authored by Mike Gabriel's avatar Mike Gabriel

Import Upstream version 1.1

parent 74f4886e
2014-12-31 Alessio Garzi <gun101@email.it>
1.1 release with "open in selected tab" option added
2014-12-24 Alessio Garzi <gun101@email.it> and Francesco Minà <mina.francesco@gmail.com>
1.0 release with the following features :
- switch to xml based configuration file
- new gui for configuration file builder
- suppressed ssh strongly related commands
- command passed to guake now is fully customizable
- added plugins managment
2014-07-15 Alessio Garzi <gun101@email.it>
* src/Changelog : Start of glade based gui development
2014-06-15 Alessio Garzi <gun101@email.it>
* src/COPYING : Changed with correct license
......
......@@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
......
SUBDIRS = src
SUBDIRS = src data plugins
# Makefile.in generated by automake 1.13.3 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
......@@ -80,7 +80,7 @@ DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in COPYING TODO compile depcomp install-sh \
missing
missing py-compile
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
......@@ -233,6 +233,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......@@ -268,9 +273,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
......@@ -279,7 +288,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src
SUBDIRS = src data plugins
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
......@@ -320,8 +329,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then rm -f stamp-h1; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
@test -f $@ || rm -f stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
......@@ -521,10 +530,16 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
......@@ -566,9 +581,10 @@ distcheck: dist
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
&& ../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
......
This diff is collapsed.
......@@ -40,9 +40,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Name of package */
#define PACKAGE "guake-indicator"
......@@ -53,7 +50,7 @@
#define PACKAGE_NAME "guake-indicator"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "guake-indicator 0.3"
#define PACKAGE_STRING "guake-indicator 1.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "guake-indicator"
......@@ -62,10 +59,10 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.3"
#define PACKAGE_VERSION "1.0"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "0.3"
#define VERSION "1.0"
......@@ -39,9 +39,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Name of package */
#undef PACKAGE
......
AC_INIT([guake-indicator], [0.4], [gun101@email.it])
AC_INIT([guake-indicator], [1.1], [gun101@email.it])
# safety check , make sure that config is not run from outer space
AC_CONFIG_SRCDIR([src/guake-indicator.c])
......@@ -8,6 +8,8 @@ AM_INIT_AUTOMAKE([-Wall -Werror])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AM_PATH_PYTHON(2.5.0)
#AC_CHECK_PROGS([GUAKE], [guake guake-prefs], [:])
#if test "$GUAKE" = :; then
#AC_MSG_ERROR([This package needs guake.])
......@@ -27,15 +29,49 @@ AC_SUBST([GTKLIB])
# Checks for header files.
AC_CHECK_HEADER([gtk/gtk.h])
AC_CHECK_HEADER([libappindicator/app-indicator.h])
AC_CHECK_HEADER([json-c/json.h])
AC_CHECK_HEADER([json-c/json.h],[],[AC_MSG_ERROR([libjson-c-dev not installed)])])
AC_CHECK_HEADER([glib.h])
AC_CHECK_HEADER([dbus/dbus-glib.h])
AC_CHECK_HEADER([gconf/gconf-client.h])
# python checks
AC_MSG_CHECKING([for the python-urllib package])
ac_urllib2_result=`$PYTHON -c 'try:
import urllib2
except Exception, e:
print str(e)' 2> /dev/null`
if test -z "$ac_urllib2_result"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot import Python module "urllib2".
Please check if you have python-urllib2 installed. The error was:
$ac_urllib2_results])
fi
AC_MSG_CHECKING([for the python-BeautifulSoup package])
ac_BeautifulSoup_result=`$PYTHON -c 'try:
import BeautifulSoup
except Exception, e:
print str(e)' 2> /dev/null`
if test -z "$ac_BeautifulSoup_result"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot import Python module "BeautifulSoup".
Please check if you have python-beautifulsoup installed. The error was:
$ac_BeautifulSoup_result])
fi
AC_MSG_CHECKING([for the python-BeautifulSoup package])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
# Output files.
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_CONFIG_FILES([Makefile src/Makefile data/Makefile plugins/Makefile data/icons/Makefile])
AC_OUTPUT
SUBDIRS = icons
uidir = $(datadir)/guake-indicator
ui_DATA = \
gi_edit_menu_dialog.glade \
gi_custom_cmd_form.glade \
gi_plugin_dialog.glade \
hosticon.png \
labelicon.png \
hostgroupicon.png
EXTRA_DIST = \
$(ui_DATA)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@dbus.service.method(DBUS_NAME, in_signature='i', out_signature='s')
def get_gtktab_name(self, tab_index=0):
return self.guake.tabs.get_children()[tab_index].get_label()
\ No newline at end of file
iconthemedir = $(datadir)/icons/hicolor
appsiconxpmdir=$(datadir)/pixmaps/guake-indicator
appsicon16dir = $(iconthemedir)/16x16/apps
appsicon22dir = $(iconthemedir)/22x22/apps
appsicon24dir = $(iconthemedir)/24x24/apps
appsicon32dir = $(iconthemedir)/32x32/apps
appsicon48dir = $(iconthemedir)/48x48/apps
appsicon256dir = $(iconthemedir)/256x256/apps
dist_appsiconxpm_DATA = guake-indicator.xpm
dist_appsicon16_DATA = 16x16/apps/guake-indicator.png
dist_appsicon22_DATA = 22x22/apps/guake-indicator.png
dist_appsicon24_DATA = 24x24/apps/guake-indicator.png
dist_appsicon32_DATA = 32x32/apps/guake-indicator.png
dist_appsicon48_DATA = 48x48/apps/guake-indicator.png
dist_appsicon256_DATA = 256x256/apps/guake-indicator.png
update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
install-data-hook: install-update-icon-cache
uninstall-hook: uninstall-update-icon-cache
install-update-icon-cache:
$(AM_V_at)$(POST_INSTALL)
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
uninstall-update-icon-cache:
$(AM_V_at)$(POST_UNINSTALL)
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2012-06-26.16; # UTC
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
......@@ -160,7 +160,7 @@ give_advice ()
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'automa4te' program to be rebuilt."
echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
......
#bin_SCRIPTS = guake-indicator-plugin-manager
#EXTRA_DIST = $(bin_SCRIPTS)
guakeindicatormoduledir = $(pkgpythondir)
guakeindicatormodule_PYTHON = guake-indicator-plugin-manager
guakeindicatordir = $(bindir)
EXTRA_DIST = $(guakeindicatormodule_PYTHON)
# -*- coding: utf-8 -*-
#
# guake-indicator-plugin-manager.py
#
# Copyright (C) 2013-2015 Alessio Garzi <gun101@email.it>
# Copyright (C) 2013-2015 Francesco Minà <mina.francesco@gmail.com>
#
# 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 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 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 Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
"""
Guake indicator Plugin
"""
import sys
import pygtk
import gtk
import gtk.glade
import os
import urllib2
from BeautifulSoup import BeautifulSoup
from os.path import expanduser
import subprocess as sub
draw_xml = [
"12 12 3 1",
" c #232323",
". c #ffff04",
"X c #b2c0dc",
"X XXX",
"X XXX",
"X .. .. X",
"X .. .. X",
"X .. .. X",
"X .... X",
"X .... X",
"X .. .. X",
"X .. .. X",
"X .. .. X",
"X X",
"X X"
]
draw_glade = [
"12 12 3 1",
" c #232323",
". c #ababab",
"X c #b2c0dc",
"X XXX",
"X ...... XXX",
"X ...... X",
"X .. X",
"X .. X",
"X .. .... X",
"X .. .... X",
"X .. .. X",
"X ........ X",
"X ........ X",
"X X",
"X X"
]
class GIPluginDialog:
pixmap_xml = gtk.gdk.pixbuf_new_from_xpm_data(draw_xml)
pixmap_glade = gtk.gdk.pixbuf_new_from_xpm_data(draw_glade)
def on_tree_selection_changed(self,selection):
model, treeiter = selection.get_selected()
if treeiter != None:
self.selected_file = model[treeiter][1]
def load_plugins(self):
response=None
try:
response = urllib2.urlopen('http://guake-indicator.ozzyboshi.com/plugins/plugin.xml')
except urllib2.HTTPError as e:
if e.code==407:
p = os.popen("gsettings get org.gnome.system.proxy.http host | awk -F \\' '{print $2}'","r")
output=p.readline()
p = os.popen('gsettings get org.gnome.system.proxy.http port',"r")
port=":"+p.readline()
output=output[:-1]
output+=port
proxy = urllib2.ProxyHandler({'http': output})
opener = urllib2.build_opener(proxy)
urllib2.install_opener(opener)
try:
response = urllib2.urlopen('http://guake-indicator.ozzyboshi.com/plugins/plugin.xml')
except urllib2.HTTPError as e:
print e.code
return
html = response.read()
y = BeautifulSoup(html)
self.rooturl=y.findAll("description")[0]["url"]
for feature in y.findAll("feature"):
fileName, fileExtension = os.path.splitext(feature['url'])
pm = 'pixmap' + fileExtension.replace('.','_')
self.tree_store.append(None, [getattr(self,pm),feature["url"],feature["description"]])
def download(self, widget, event, data=None):
if (self.selected_file == ''):
print 'selecet file first.'
return
url = self.rooturl + self.selected_file
#print url
file_name = url.split('/')[-1]
u = urllib2.urlopen(url)
f = open(expanduser("~")+"/.guake-indicator/plugins/"+file_name, 'wb')
meta = u.info()
file_size = int(meta.getheaders("Content-Length")[0])
#print "Downloading: %s Bytes: %s" % (file_name, file_size)
file_size_dl = 0
block_sz = 8192
while True:
buffer = u.read(block_sz)
if not buffer:
break
file_size_dl += len(buffer)
f.write(buffer)
status = r"%10d [%3.2f%%]" % (file_size_dl, file_size_dl * 100. / file_size)
status = status + chr(8)*(len(status)+1)
#print status,
f.close()
message = gtk.MessageDialog(type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE)
message.set_markup("Plugin downloaded into ~/.guake-indicator/plugins directory")
message.run()
message.destroy()
#gtk.main_quit()
def __init__(self,gladepath):
self.rooturl = ''
self.selected_file = ''
self.url = 'http://guake-indicator.ozzyboshi.com/plugins/'
#Set the Glade file
if (len(gladepath)>0) :
self.gladefile=gladepath+"/gi_plugin_dialog.glade"
else :
self.gladefile = "/usr/local/share/guake-indicator/gi_plugin_dialog.glade"
self.builder = gtk.Builder()
self.builder.add_from_file(self.gladefile)
#Get the Main Window, and connect the "destroy" event
self.window = self.builder.get_object("gi_plugin_window")
self.tree_view = self.builder.get_object("plugin_treeview")
self.btn_download = self.builder.get_object("btn_download")
self.btn_cancel = self.builder.get_object("btn_cancel")
self.btn_download.connect("clicked",self.download,None)
self.btn_cancel.connect("clicked",gtk.main_quit)
self.tree_store = gtk.TreeStore(gtk.gdk.Pixbuf,str,str)
self.tree_view.set_model(self.tree_store)
# create column that contains pixbuf and text
self.col = gtk.TreeViewColumn("Name")
self.tree_view.append_column(self.col)
# create a description columns
self.desccol = gtk.TreeViewColumn("Description")
self.tree_view.append_column(self.desccol)
# create cell: pixbuf and text
self.cell = gtk.CellRendererText()
self.cellpix = gtk.CellRendererPixbuf()
self.desccell = gtk.CellRendererText()
# add cell to column pixbuf and text in the same column
self.col.pack_start(self.cellpix, expand=False)
self.col.pack_start(self.cell,True)
self.desccol.pack_start(self.desccell,True)
#self.cell.set_property('cell-background', 'yellow')
# add cell to column
self.col.add_attribute(self.cellpix,'pixbuf',0)
self.col.add_attribute(self.cell,'text',1)
self.desccol.add_attribute(self.desccell,'text',2)
self.select = self.tree_view.get_selection()
self.select.connect("changed", self.on_tree_selection_changed)
self.window.show_all()
if (self.window):
self.window.connect("destroy", gtk.main_quit)
self.builder.connect_signals(self)
self.load_plugins()
def quit(self, button):
# close the window
gtk.main_quit()
if __name__ == "__main__":
hwg = GIPluginDialog(sys.argv[1])
gtk.main()
#!/bin/sh
# py-compile - Compile a Python program
scriptversion=2011-06-08.12; # UTC
# Copyright (C) 2000-2013 Free Software Foundation, Inc.
# 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 2, 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 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 <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
if [ -z "$PYTHON" ]; then
PYTHON=python
fi
me=py-compile
usage_error ()
{
echo "$me: $*" >&2
echo "Try '$me --help' for more information." >&2
exit 1
}
basedir=
destdir=
while test $# -ne 0; do
case "$1" in
--basedir)
if test $# -lt 2; then
usage_error "option '--basedir' requires an argument"
else
basedir=$2
fi
shift
;;
--destdir)
if test $# -lt 2; then
usage_error "option '--destdir' requires an argument"
else
destdir=$2
fi
shift
;;
-h|--help)
cat <<\EOF
Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
Byte compile some python scripts FILES. Use --destdir to specify any
leading directory path to the FILES that you don't want to include in the
byte compiled file. Specify --basedir for any additional path information you
do want to be shown in the byte compiled file.
Example:
py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v|--version)
echo "$me $scriptversion"
exit $?
;;
--)
shift
break
;;
-*)
usage_error "unrecognized option '$1'"
;;
*)
break
;;
esac
shift
done
files=$*
if test -z "$files"; then
usage_error "no files given"
fi
# if basedir was given, then it should be prepended to filenames before
# byte compilation.
if [ -z "$basedir" ]; then
pathtrans="path = file"
else
pathtrans="path = os.path.join('$basedir', file)"
fi
# if destdir was given, then it needs to be prepended to the filename to
# byte compile but not go into the compiled file.
if [ -z "$destdir" ]; then
filetrans="filepath = path"
else
filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
fi
$PYTHON -c "
import sys, os, py_compile, imp
files = '''$files'''
sys.stdout.write('Byte-compiling python modules...\n')
for file in files.split():
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
continue
sys.stdout.write(file)
sys.stdout.flush()
if hasattr(imp, 'get_tag'):
py_compile.compile(filepath, imp.cache_from_source(filepath), path)
else:
py_compile.compile(filepath, filepath + 'c', path)
sys.stdout.write('\n')" || exit $?
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
import sys, os, py_compile, imp
# pypy does not use .pyo optimization
if hasattr(sys, 'pypy_translation_info'):
sys.exit(0)
files = '''$files'''
sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
for file in files.split():
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
continue
sys.stdout.write(file)
sys.stdout.flush()
if hasattr(imp, 'get_tag'):
py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
else:
py_compile.compile(filepath, filepath + 'o', path)
sys.stdout.write('\n')" 2>/dev/null || :
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
This diff is collapsed.
guake_indicator-guake-indicator-delete-entry-group.o: \
guake-indicator-delete-entry-group.c /usr/include/stdc-predef.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h /usr/include/string.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/string.h /usr/include/features.h \