Commit 9b95c605 authored by Frédéric Péters's avatar Frédéric Péters

preliminary toolbar work

parent b57bb13e
[submodule "libgd"]
path = libgd
url = git://git.gnome.org/libgd
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = po src data misc contrib
SUBDIRS = libgd po src data misc contrib
EXTRA_DIST = \
autogen.sh \
......
......@@ -5,6 +5,7 @@ srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="Devhelp"
ACLOCAL_FLAGS="-I libgd $ACLOCAL_FLAGS"
(test -f $srcdir/src/dh-main.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
......
......@@ -123,6 +123,11 @@ AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
AM_PATH_PYTHON([2.3],[],[no])
LIBGD_INIT([
main-toolbar
static
])
AC_CONFIG_FILES([
Makefile
po/Makefile.in
......@@ -133,6 +138,7 @@ data/devhelp.desktop.in
data/icons/Makefile
data/ui/Makefile
data/dtd/Makefile
libgd/Makefile
misc/Makefile
misc/gedit-plugin/Makefile
contrib/Makefile
......
libgd @ dbbf10d6
Subproject commit dbbf10d6eaaba74b44c21fa08cbb34d34dbf53ea
......@@ -54,7 +54,8 @@ devhelp_CFLAGS = \
$(DEVHELP_CFLAGS)
devhelp_LDADD = \
$(DEVHELP_LIBS) \
$(DEVHELP_LIBS) \
$(top_builddir)/libgd/libgd.la \
libdevhelp-3.la
lib_LTLIBRARIES = libdevhelp-3.la
......@@ -113,6 +114,8 @@ libdevhelp_3_la_CPPFLAGS = \
$(ZLIB_CPPFLAGS)
libdevhelp_3_la_CFLAGS = \
-I$(top_srcdir)/libgd \
$(top_builddir)/libgd/libgd.la \
$(LIBDEVHELP_CFLAGS)
libdevhelp_3_la_LIBADD = \
......
......@@ -43,6 +43,8 @@
#include <gtkosxapplication.h>
#endif
#include <libgd/gd.h>
#include "dh-book-tree.h"
#include "dh-book-manager.h"
#include "dh-book.h"
......@@ -1041,34 +1043,25 @@ window_populate (DhWindow *window)
priv = window->priv;
toolbar = GTK_WIDGET (gtk_builder_get_object (priv->builder, "toolbar"));
toolbar = gd_main_toolbar_new ();
gd_main_toolbar_add_button (GD_MAIN_TOOLBAR (toolbar),
"go-previous-symbolic",
_("Back"),
TRUE);
gd_main_toolbar_add_button (GD_MAIN_TOOLBAR (toolbar),
"go-next-symbolic",
_("Forward"),
TRUE);
gd_main_toolbar_add_menu (GD_MAIN_TOOLBAR (toolbar),
"emblem-system-symbolic",
"",
FALSE);
/* Add toolbar to main box */
gtk_style_context_add_class (gtk_widget_get_style_context (toolbar),
GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
gtk_box_pack_start (GTK_BOX (priv->main_box), toolbar,
FALSE, FALSE, 0);
#ifdef GDK_WINDOWING_QUARTZ
{
GtkOSXApplication *theApp;
/* Hide toolbar labels. */
gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS);
/* Setup menubar. */
theApp = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL);
gtk_osxapplication_set_menu_bar (theApp, GTK_MENU_SHELL (menubar));
g_signal_connect (theApp,
"NSApplicationWillTerminate",
G_CALLBACK (window_activate_quit),
window);
gtk_osxapplication_ready (theApp);
}
#endif
priv->hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start (GTK_BOX (priv->main_box), priv->hpaned, TRUE, TRUE, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment