Skip to content

Commit

Permalink
Syncing from projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed Jul 22, 2009
1 parent fdd4fb4 commit a2726dd
Show file tree
Hide file tree
Showing 11 changed files with 381 additions and 980 deletions.
21 changes: 21 additions & 0 deletions configure.ac
Expand Up @@ -18,6 +18,27 @@ AX_CFLAGS_GCC_OPTION(-Wmissing-declarations)
AX_CFLAGS_GCC_OPTION(-Wunreachable-code)
AX_CFLAGS_GCC_OPTION(-Wwrite-strings)

AC_MSG_CHECKING([whether to use maemo launcher])
AC_ARG_ENABLE([maemo-launcher],
[AS_HELP_STRING([--enable-maemo-launcher],
[default=yes])],
[
case "${enableval}" in
yes) maemo_launcher=true
AC_MSG_RESULT([yes])
PKG_CHECK_MODULES(MAEMO_LAUNCHER, [maemo-launcher-app])
AC_SUBST(MAEMO_LAUNCHER_CFLAGS)
AC_SUBST(MAEMO_LAUNCHER_LIBS)
;;
no) maemo_launcher=false
AC_MSG_RESULT([no])
;;
*) AC_MSG_ERROR([
"Bad value ${enableval} for --enable-maemo-launcher,\n"
"give exactly 'yes' or 'no' value."]) ;;
esac
], [maemo_launcher=false])

AC_ARG_WITH(
svgpix,
[ --with-svgpix[[=ARG]] use SVG icons ARG=[[detect]]|yes|no ],
Expand Down
24 changes: 23 additions & 1 deletion debian/changelog
@@ -1,9 +1,31 @@
osso-xterm (0.14.mh24) unstable; urgency=low

* bump

-- Peter Csaszar <csjpeter@gmail.com> Wed, 17 Jun 2009 12:49:29 +0200

osso-xterm (0.14.mh23) unstable; urgency=low

[ Gabriel Schulhof ]
* Re-do logic for showing/hiding the Pan button
* Fixes: NB#117410 (Select/Panning icon appears even when there is no choice between selection and panning.)

-- Gabriel Schulhof <gabriel.schulhof@nokia.com> Mon, 18 May 2009 13:45:52 +0300
[ Peter Csaszar ]
* Use maemo launcher if DEB_BUILD_OPTIONS is empty
* Fixes: NB#117410 - Select/Panning icon appears even when there is no
choice between selection and panning.
* Fixes: NB#115735 - Desktop hanged while changing xterm application
from normal screen to full screen in a scenario
* adding debian rules to have dbg package
* Fixed: using fullscreen button when more terminal window is opened
resulted in random window on (top) fullscreen.
* fixing many of object ref/unref and signal connect/disconnect
problems
* Fixes: NB116810 - Proper error message not displayed when unable to
open a new xterm-window
* Fixes: NB#116750 - The X terminal window title is osso_xterm

-- Peter Csaszar <csjpeter@gmail.com> Wed, 17 Jun 2009 12:49:29 +0200

osso-xterm (0.14.mh22) unstable; urgency=low

Expand Down
7 changes: 6 additions & 1 deletion debian/control
Expand Up @@ -2,7 +2,7 @@ Source: osso-xterm
Section: system/Applications
Priority: optional
Maintainer: Santtu Lakkala <inz@inz.fi>
Build-Depends: debhelper (>= 4.0.0), libvte-dev, libdbus-1-dev, libgconf2-dev, libdbus-glib-1-dev, libglib2.0-dev, libhildon1-dev (>= 0.9.9) | hildon-libs-dev (>= 0.12.0), libosso-dev, tablet-browser-interface-dev | maemo-browser-interface-dev | osso-browser-interface-dev
Build-Depends: debhelper (>= 4.0.0), libvte-dev, libdbus-1-dev, libgconf2-dev, libdbus-glib-1-dev, libglib2.0-dev, libhildon1-dev (>= 0.9.9) | hildon-libs-dev (>= 0.12.0), libosso-dev, tablet-browser-interface-dev | maemo-browser-interface-dev | osso-browser-interface-dev, maemo-launcher-dev
Standards-Version: 3.6.2.1

Package: osso-xterm
Expand All @@ -14,3 +14,8 @@ Description: X Terminal Emulator for OS2008
This package contains an X Terminal Emulator which is based on xterminal
(http://www.os-cillation.com/article.php?sid=40) by Benedikt Meurer
<benny@xfce.org> and Francois Le Clainche <fleclainche@wanadoo.fr>

Package: osso-xterm-dbg
Architecture: any
Depends: osso-xterm (= ${Source-Version})
Description: Debug symbols for osso-xterm
35 changes: 16 additions & 19 deletions debian/rules
Expand Up @@ -3,6 +3,7 @@
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

OPTS = ""
CFLAGS += -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
Expand All @@ -13,30 +14,26 @@ endif
ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
CFLAGS += -mthumb
endif
ifneq (,$(findstring maemo-launcher,$(DEB_BUILD_OPTIONS)))
LAUNCHER = yes
endif

ifeq "$(strip $(LAUNCHER))" "yes"
LAUNCHER_DEPENDS = -Vlauncher:Depends="maemo-launcher"
LAUNCHER_CFLAGS = -shared
LAUNCHER_LDFLAGS = -shared
ifeq (,$(findstring nolauncher,$(DEB_BUILD_OPTIONS)))
OPTS += "--enable-maemo-launcher=yes"
USE_MAEMO_LAUNCHER = true
endif

PACKAGENAME=osso-xterm

config.status:
dh_testdir
-make squeaky
# -make squeaky
./autogen.sh
# Add here commands to configure the package.
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/sbin --enable-final
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/sbin --enable-final $(OPTS)
build: build-stamp

build-stamp: config.status

dh_testdir
$(MAKE) \
LAUNCHER_CFLAGS="$(LAUNCHER_CFLAGS)" \
LAUNCHER_LDFLAGS="$(LAUNCHER_LDFLAGS)"
$(MAKE)
touch build-stamp

clean:
Expand All @@ -51,6 +48,8 @@ clean:
cp -f /usr/share/misc/config.sub config.sub
-test -r /usr/share/misc/config.guess && \
cp -f /usr/share/misc/config.guess config.guess
rm -fr debian/${PACKAGENAME}
rm -fr debian/${PACKAGENAME}-dbg

dh_clean

Expand All @@ -61,12 +60,6 @@ install: build
dh_clean -k

$(MAKE) install DESTDIR=`pwd`/debian/osso-xterm
ifeq "$(strip $(LAUNCHER))" "yes"
mv $(CURDIR)/debian/osso-xterm/usr/bin/osso-xterm \
$(CURDIR)/debian/osso-xterm/usr/bin/osso-xterm.launch
ln -s /usr/bin/maemo-invoker \
$(CURDIR)/debian/osso-xterm/usr/bin/osso-xterm
endif

install -d `pwd`/debian/osso-xterm/usr/share/man/man1
install `pwd`/debian/osso-xterm.1 `pwd`/debian/osso-xterm/usr/share/man/man1
Expand All @@ -86,7 +79,11 @@ binary-arch: build install

dh_link -a

dh_strip -a
if test "x$(USE_MAEMO_LAUNCHER)" = "xtrue"; then \
dh_maemolauncher /usr/bin/osso-xterm; \
fi

dh_strip --dbg-package=${PACKAGENAME}
dh_compress -a

dh_fixperms -a
Expand Down
10 changes: 7 additions & 3 deletions src/Makefile.am
Expand Up @@ -17,16 +17,20 @@ osso_xterm_CFLAGS = \
$(OSSO_CFLAGS) \
$(DBUS_CFLAGS) \
$(BROWSER_CFLAGS) \
$(LAUNCHER_CFLAGS) \
$(MAEMO_LAUNCHER_CFLAGS) \
$(NULL)

UNWANTED = -export-dynamic -Wl,--export-dynamic
osso_xterm_LDADD = \
$(filter-out $(UNWANTED), \
$(MAEMO_LAUNCHER_LIBS) \
$(DBUS_LIBS) \
$(GCONF_LIBS) \
$(HILDON_LIBS_LIBS) \
$(HILDON_LIBS) \
$(OSSO_LIBS) \
$(VTE_LIBS) \
) \
$(NULL)

EXTRA_DIST = \
Expand All @@ -40,8 +44,8 @@ BUILT_SOURCES = \
$(NULL)

osso_xterm_LDFLAGS = \
-no-undefined \
$(LAUNCHER_LDFLAGS) \
-no-undefined \
-Wl,--version-script=export.map \
$(NULL)

osso_xterm_headers = \
Expand Down
15 changes: 15 additions & 0 deletions src/maemo-vte.c
Expand Up @@ -84,11 +84,26 @@ sync_vadj_value(GtkAdjustment *src, MaemoVte *mvte)

if (!(src && dst)) return;

/* g_printerr("%s : before : src : "
"upper: %f, lower: %f, page_size: %f, value: %f, step_inc: %f, page_inc: %f\n",
__FUNCTION__, src->upper, src->lower, src->page_size, src->value, src->step_increment, src->page_increment);
g_printerr("%s : before : dst : "
"upper: %f, lower: %f, page_size: %f, value: %f, step_inc: %f, page_inc: %f\n",
__FUNCTION__, dst->upper, dst->lower, dst->page_size, dst->value, dst->step_increment, dst->page_increment);
*/
if (dst->value != src->value * factor) {
dst->value = src->value * factor;
mvte->priv->been_panning = TRUE;
gtk_adjustment_value_changed(dst);
}
/*
g_printerr("%s : after : src : "
"upper: %f, lower: %f, page_size: %f, value: %f, step_inc: %f, page_inc: %f\n",
__FUNCTION__, src->upper, src->lower, src->page_size, src->value, src->step_increment, src->page_increment);
g_printerr("%s : after : dst : "
"upper: %f, lower: %f, page_size: %f, value: %f, step_inc: %f, page_inc: %f\n",
__FUNCTION__, dst->upper, dst->lower, dst->page_size, dst->value, dst->step_increment, dst->page_increment);
*/
}

static void
Expand Down
44 changes: 6 additions & 38 deletions src/terminal-manager.c
@@ -1,3 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: s; c-basic-offset: 2; tab-width: 2 -*- */
/* vim:set et ai sw=2 ts=2 sts=2: tw=80 cino="(0,W2s,i2s,t0,l1,:0" */
#include <libintl.h>
#include <locale.h>
#define _(String) gettext(String)
Expand All @@ -20,16 +22,10 @@ static void terminal_manager_window_new_window (TerminalWindow *window,
const gchar *command,
TerminalManager *manager);
static void terminal_manager_last_window_closed (TerminalManager *manager);
static void terminal_manager_global_state_changed (TerminalWindow *window,
TerminalManager *manager);
static gboolean terminal_manager_focus_in_actions (TerminalWindow *window,
GdkEventFocus *event,
TerminalManager *manager);

/* Helpers */
static void _state_change_helper (gpointer window, gpointer data);
static gboolean _set_window_to_top (GtkWindow *window);

G_DEFINE_TYPE (TerminalManager, terminal_manager, HILDON_TYPE_PROGRAM);

TerminalManager *terminal_manager_get_instance (void)
Expand Down Expand Up @@ -100,10 +96,6 @@ gboolean terminal_manager_new_window (TerminalManager *manager,
"new_window",
G_CALLBACK(terminal_manager_window_new_window),
manager);
g_signal_connect (window,
"global_state_changed",
G_CALLBACK (terminal_manager_global_state_changed),
manager);

/* when focused */
g_signal_connect (window,
Expand All @@ -116,8 +108,6 @@ gboolean terminal_manager_new_window (TerminalManager *manager,

hildon_program_add_window(HILDON_PROGRAM(manager), HILDON_WINDOW(window));

terminal_window_set_state (window, window);

manager->current = window;

return TRUE;
Expand Down Expand Up @@ -153,7 +143,9 @@ static void terminal_manager_window_new_window (TerminalWindow *window,
{
GError *error = NULL;
if (!terminal_manager_new_window(manager, command, &error)) {
hildon_banner_show_information(GTK_WIDGET(window), GTK_STOCK_DIALOG_ERROR, g_dgettext("gtk20", "Unspecified error"));
hildon_banner_show_information(GTK_WIDGET(window),
GTK_STOCK_DIALOG_ERROR,
g_dgettext("gtk20", "Could not open console."));
if (error)
g_error_free(error);
}
Expand All @@ -163,32 +155,8 @@ static gboolean terminal_manager_focus_in_actions (TerminalWindow *window,
GdkEventFocus *event,
TerminalManager *manager)
{
if ((event->type == GDK_FOCUS_CHANGE) && (manager->current != window)) {
if ((event->type == GDK_FOCUS_CHANGE) && (manager->current != window))
manager->current = window;
terminal_window_set_state (window, window);
}
return FALSE;
}

static void terminal_manager_global_state_changed (TerminalWindow *window,
TerminalManager *manager)
{
g_slist_foreach (manager->windows, (GFunc)_state_change_helper, manager);
if (manager->current != NULL) {
g_idle_add ((GSourceFunc)_set_window_to_top, manager->current);
}
}

/* Helpers */
static void
_state_change_helper (gpointer window, gpointer data)
{
terminal_window_set_state (window, TERMINAL_MANAGER(data)->current);
}

static gboolean
_set_window_to_top (GtkWindow *window)
{
gtk_window_present (window);
return FALSE;
}

0 comments on commit a2726dd

Please sign in to comment.