[gnome-control-center] Copied latest libslab
- From: Rodrigo Moya <rodrigo src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Copied latest libslab
- Date: Wed, 5 Aug 2009 10:20:47 +0000 (UTC)
commit 6b76c6a770784130e97a8344613391232698afd3
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Wed Aug 5 12:20:19 2009 +0200
Copied latest libslab
libslab/Makefile.am | 33 +++++++--------------------
libslab/app-resizer.c | 41 ++++++-----------------------------
libslab/app-resizer.h | 2 +
libslab/app-shell.c | 30 ++++++++++++-------------
libslab/app-shell.h | 13 ++++++-----
libslab/application-tile.c | 3 +-
libslab/application-tile.h | 2 +-
libslab/bookmark-agent.c | 2 +-
libslab/directory-tile.c | 3 +-
libslab/directory-tile.h | 2 +-
libslab/document-tile.c | 5 ++-
libslab/double-click-detector.c | 39 +--------------------------------
libslab/libslab-utils.c | 28 +++++++++++++++++++++--
libslab/libslab-utils.h | 2 +
libslab/nameplate-tile.c | 1 -
libslab/nameplate-tile.h | 2 +-
libslab/search-bar.c | 5 ++-
libslab/shell-window.c | 36 +------------------------------
libslab/shell-window.h | 3 +-
libslab/slab-gnome-util.c | 6 +---
libslab/slab-section.c | 2 -
libslab/slab.h | 45 +++++++++++++++++++++++++++++++++++++++
libslab/system-tile.c | 4 +-
libslab/system-tile.h | 2 +-
24 files changed, 134 insertions(+), 177 deletions(-)
---
diff --git a/libslab/Makefile.am b/libslab/Makefile.am
index 5f6c4b3..d2ffe6a 100644
--- a/libslab/Makefile.am
+++ b/libslab/Makefile.am
@@ -1,16 +1,20 @@
INCLUDES = \
+ -I$(top_srcdir) \
$(LIBSLAB_CFLAGS) \
$(WARN_CFLAGS)
+
HEADER_FILES= \
$(BUILT_SOURCES) \
app-resizer.h \
app-shell.h \
- app-shell-startup.h \
application-tile.h \
+ bookmark-agent.h \
directory-tile.h \
document-tile.h \
+ double-click-detector.h \
gnome-utils.h \
+ libslab-utils.h \
nameplate-tile.h \
search-bar.h \
search-context-picker.h \
@@ -18,33 +22,23 @@ HEADER_FILES= \
shell-window.h \
slab-gnome-util.h \
slab-section.h \
+ slab.h \
system-tile.h \
tile.h
-if ENABLE_DYNAMIC_LIBSLAB
lib_LTLIBRARIES = libslab.la
-SOURCE_HEADER_FILES=
-else
-noinst_LTLIBRARIES = libslab.la
-SOURCE_HEADER_FILES=$(HEADER_FILES)
-endif
libslab_la_SOURCES = \
- $(SOURCE_HEADER_FILES) \
$(MARSHAL_GENERATED) \
app-resizer.c \
app-shell.c \
- app-shell-startup.c \
application-tile.c \
- bookmark-agent.h \
bookmark-agent.c \
directory-tile.c \
document-tile.c \
double-click-detector.c \
- double-click-detector.h \
gnome-utils.c \
libslab-utils.c \
- libslab-utils.h \
nameplate-tile.c \
search-bar.c \
search-context-picker.c \
@@ -59,19 +53,12 @@ libslab_la_SOURCES = \
tile-action.c \
tile.c
-if ENABLE_DYNAMIC_LIBSLAB
-libslab_includedir = $(includedir)/slab
+libslab_includedir = $(includedir)/libslab
libslab_include_HEADERS = $(HEADER_FILES)
-libslab_la_LDFLAGS = \
- -version-info $(LT_VERSION)
-endif
-libslab_la_LIBADD = $(LIBSLAB_LIBS)
+libslab_la_LDFLAGS = -version-info $(LT_VERSION)
-if ENABLE_DYNAMIC_LIBSLAB
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libslab.pc
-endif
+libslab_la_LIBADD = $(LIBSLAB_LIBS)
search-entry-watermark.h: search-entry-watermark.svg
echo '#define SEARCH_ENTRY_WATERMARK_SVG "\' > $@; \
@@ -103,5 +90,3 @@ CLEANFILES = \
EXTRA_DIST= \
search-entry-watermark.svg \
nld-marshal.list
-
--include $(top_srcdir)/git.mk
diff --git a/libslab/app-resizer.c b/libslab/app-resizer.c
index 44f7b02..118406d 100644
--- a/libslab/app-resizer.c
+++ b/libslab/app-resizer.c
@@ -24,8 +24,6 @@
#include "app-shell.h"
#include "app-resizer.h"
-static GtkLayoutClass *parent_class = NULL;
-
static void app_resizer_class_init (AppResizerClass *);
static void app_resizer_init (AppResizer *);
static void app_resizer_destroy (GtkObject *);
@@ -34,39 +32,14 @@ static void app_resizer_size_allocate (GtkWidget * resizer, GtkAllocation * allo
static gboolean app_resizer_paint_window (GtkWidget * widget, GdkEventExpose * event,
AppShellData * app_data);
-GType
-app_resizer_get_type (void)
-{
- static GType object_type = 0;
+G_DEFINE_TYPE (AppResizer, app_resizer, GTK_TYPE_LAYOUT);
- if (!object_type)
- {
- static const GTypeInfo object_info = {
- sizeof (AppResizerClass),
- NULL,
- NULL,
- (GClassInitFunc) app_resizer_class_init,
- NULL,
- NULL,
- sizeof (AppResizer),
- 0,
- (GInstanceInitFunc) app_resizer_init
- };
-
- object_type =
- g_type_register_static (GTK_TYPE_LAYOUT, "AppResizer", &object_info, 0);
- }
-
- return object_type;
-}
static void
app_resizer_class_init (AppResizerClass * klass)
{
GtkWidgetClass *widget_class;
- parent_class = g_type_class_peek_parent (klass);
-
((GtkObjectClass *) klass)->destroy = app_resizer_destroy;
widget_class = GTK_WIDGET_CLASS (klass);
@@ -225,8 +198,8 @@ app_resizer_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
if (first_time)
{
/* we are letting the first show be the "natural" size of the child widget so do nothing. */
- if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
- (*GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
+ if (GTK_WIDGET_CLASS (app_resizer_parent_class)->size_allocate)
+ (*GTK_WIDGET_CLASS (app_resizer_parent_class)->size_allocate) (widget, allocation);
first_time = FALSE;
gtk_layout_set_size (GTK_LAYOUT (resizer), child->allocation.width,
@@ -238,8 +211,8 @@ app_resizer_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
{
GtkAllocation child_allocation;
- if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
- (*GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
+ if (GTK_WIDGET_CLASS (app_resizer_parent_class)->size_allocate)
+ (*GTK_WIDGET_CLASS (app_resizer_parent_class)->size_allocate) (widget, allocation);
/* We want the message to center itself and only scroll if it's bigger than the available real size. */
child_allocation.x = 0;
@@ -268,8 +241,8 @@ app_resizer_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
resizer->cur_num_cols = new_num_cols;
}
- if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
- (*GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
+ if (GTK_WIDGET_CLASS (app_resizer_parent_class)->size_allocate)
+ (*GTK_WIDGET_CLASS (app_resizer_parent_class)->size_allocate) (widget, allocation);
gtk_layout_set_size (GTK_LAYOUT (resizer), child->allocation.width,
child->allocation.height);
}
diff --git a/libslab/app-resizer.h b/libslab/app-resizer.h
index b84cfb9..690d7ae 100644
--- a/libslab/app-resizer.h
+++ b/libslab/app-resizer.h
@@ -24,6 +24,8 @@
#include <glib.h>
#include <gtk/gtk.h>
+#include <libslab/app-shell.h>
+
G_BEGIN_DECLS
#define INITIAL_NUM_COLS 3
diff --git a/libslab/app-shell.c b/libslab/app-shell.c
index c2a2ee2..2cf8e02 100644
--- a/libslab/app-shell.c
+++ b/libslab/app-shell.c
@@ -18,14 +18,11 @@
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#undef GTK_DISABLE_DEPRECATED
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <libgnome/gnome-desktop-item.h>
-#include <libgnomeui/libgnomeui.h>
#include <gio/gio.h>
#include <gdk/gdkkeysyms.h>
#include <sys/types.h>
@@ -97,47 +94,48 @@ gboolean regenerate_categories (AppShellData * app_data);
void
hide_shell (AppShellData * app_data)
{
- gtk_window_get_position (GTK_WINDOW (app_data->main_gnome_app),
- &app_data->main_gnome_app_window_x, &app_data->main_gnome_app_window_y);
- /* printf("x:%d, y:%d\n", app_data->main_gnome_app_window_x, app_data->main_gnome_app_window_y); */
+ gtk_window_get_position (GTK_WINDOW (app_data->main_app),
+ &app_data->main_app_window_x, &app_data->main_app_window_y);
+ /* printf("x:%d, y:%d\n", app_data->main_app_window_x, app_data->main_app_window_y); */
/* clear the search bar now so reshowing is fast and flicker free - BNC#283186 */
application_launcher_clear_search_bar (app_data);
- gtk_widget_hide (app_data->main_gnome_app);
+ gtk_widget_hide (app_data->main_app);
}
void
show_shell (AppShellData * app_data)
{
- gtk_widget_show_all (app_data->main_gnome_app);
+ gtk_widget_show_all (app_data->main_app);
if (!app_data->static_actions)
gtk_widget_hide_all (app_data->actions_section); /* don't show unless a launcher is selected */
- if (app_data->main_gnome_app_window_shown_once)
- gtk_window_move (GTK_WINDOW (app_data->main_gnome_app),
- app_data->main_gnome_app_window_x, app_data->main_gnome_app_window_y);
+ if (app_data->main_app_window_shown_once)
+ gtk_window_move (GTK_WINDOW (app_data->main_app),
+ app_data->main_app_window_x, app_data->main_app_window_y);
/* if this is the first time shown, need to clear this handler */
else
shell_window_clear_resize_handler (SHELL_WINDOW (app_data->shell));
- app_data->main_gnome_app_window_shown_once = TRUE;
+ app_data->main_app_window_shown_once = TRUE;
}
gboolean
create_main_window (AppShellData * app_data, const gchar * app_name, const gchar * title,
const gchar * window_icon, gint width, gint height, gboolean hidden)
{
- GtkWidget *main_app = gnome_app_new (app_name, title);
- app_data->main_gnome_app = main_app;
+ GtkWidget *main_app = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ app_data->main_app = main_app;
gtk_widget_set_name (main_app, app_name);
+ gtk_window_set_title (GTK_WINDOW (main_app), title);
/* gtk_window_set_default_size(GTK_WINDOW(main_app), width, height); */
gtk_window_set_icon_name (GTK_WINDOW (main_app), window_icon);
- gnome_app_set_contents (GNOME_APP (main_app), app_data->shell);
+ gtk_container_add (GTK_CONTAINER (main_app), app_data->shell);
g_signal_connect (main_app, "delete-event", G_CALLBACK (main_delete_callback), app_data);
g_signal_connect (main_app, "key-press-event", G_CALLBACK (main_keypress_callback),
app_data);
- gtk_window_set_position (GTK_WINDOW (app_data->main_gnome_app), GTK_WIN_POS_CENTER);
+ gtk_window_set_position (GTK_WINDOW (app_data->main_app), GTK_WIN_POS_CENTER);
if (!hidden)
show_shell (app_data);
gtk_main ();
diff --git a/libslab/app-shell.h b/libslab/app-shell.h
index 2add230..0be9a8b 100644
--- a/libslab/app-shell.h
+++ b/libslab/app-shell.h
@@ -25,9 +25,10 @@
#include <gtk/gtk.h>
#define GMENU_I_KNOW_THIS_IS_UNSTABLE
#include <gmenu-tree.h>
+#include <libgnome/gnome-desktop-item.h>
-#include "slab-section.h"
-#include "tile.h"
+#include <libslab/slab-section.h>
+#include <libslab/tile.h>
G_BEGIN_DECLS
@@ -54,10 +55,10 @@ typedef struct
typedef struct _AppShellData
{
- GtkWidget *main_gnome_app;
- gint main_gnome_app_window_x;
- gint main_gnome_app_window_y;
- gboolean main_gnome_app_window_shown_once;
+ GtkWidget *main_app;
+ gint main_app_window_x;
+ gint main_app_window_y;
+ gboolean main_app_window_shown_once;
GtkWidget *shell;
GtkWidget *groups_section;
diff --git a/libslab/application-tile.c b/libslab/application-tile.c
index 5b94497..bc82f3e 100644
--- a/libslab/application-tile.c
+++ b/libslab/application-tile.c
@@ -19,10 +19,11 @@
*/
#include "application-tile.h"
+#include "config.h"
#include <string.h>
#include <glib.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
#include <gconf/gconf-client.h>
#include <unistd.h>
diff --git a/libslab/application-tile.h b/libslab/application-tile.h
index 57a97d9..6df049f 100644
--- a/libslab/application-tile.h
+++ b/libslab/application-tile.h
@@ -21,7 +21,7 @@
#ifndef __APPLICATION_TILE_H__
#define __APPLICATION_TILE_H__
-#include "nameplate-tile.h"
+#include <libslab/nameplate-tile.h>
#include <libgnome/gnome-desktop-item.h>
diff --git a/libslab/bookmark-agent.c b/libslab/bookmark-agent.c
index 9bd4bd2..bdd418a 100644
--- a/libslab/bookmark-agent.c
+++ b/libslab/bookmark-agent.c
@@ -30,7 +30,7 @@
#include <string.h>
#include <stdlib.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
diff --git a/libslab/directory-tile.c b/libslab/directory-tile.c
index cb4b7d9..6d94aef 100644
--- a/libslab/directory-tile.c
+++ b/libslab/directory-tile.c
@@ -19,8 +19,9 @@
*/
#include "directory-tile.h"
+#include "config.h"
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#include <string.h>
#include <gio/gio.h>
#include <gdk/gdk.h>
diff --git a/libslab/directory-tile.h b/libslab/directory-tile.h
index d6ef0d5..9c730fc 100644
--- a/libslab/directory-tile.h
+++ b/libslab/directory-tile.h
@@ -23,7 +23,7 @@
#include <time.h>
-#include "nameplate-tile.h"
+#include <libslab/nameplate-tile.h>
G_BEGIN_DECLS
diff --git a/libslab/document-tile.c b/libslab/document-tile.c
index d5b6673..3592ffe 100644
--- a/libslab/document-tile.c
+++ b/libslab/document-tile.c
@@ -19,8 +19,9 @@
*/
#include "document-tile.h"
+#include "config.h"
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#include <string.h>
#include <gio/gio.h>
@@ -436,7 +437,7 @@ load_image (DocumentTile *tile)
g_object_get (icon, "name", &icon_id, NULL);
g_object_unref (icon);
- }
+ }
exit:
diff --git a/libslab/double-click-detector.c b/libslab/double-click-detector.c
index df77351..64ed58e 100644
--- a/libslab/double-click-detector.c
+++ b/libslab/double-click-detector.c
@@ -24,43 +24,11 @@
#include "libslab-utils.h"
-static void double_click_detector_class_init (DoubleClickDetectorClass *);
-static void double_click_detector_init (DoubleClickDetector *);
-static void double_click_detector_dispose (GObject *);
-
-GType
-double_click_detector_get_type (void)
-{
- static GType object_type = 0;
-
- if (!object_type)
- {
- static const GTypeInfo object_info = {
- sizeof (DoubleClickDetectorClass),
- NULL,
- NULL,
- (GClassInitFunc) double_click_detector_class_init,
- NULL,
- NULL,
- sizeof (DoubleClickDetector),
- 0,
- (GInstanceInitFunc) double_click_detector_init
- };
-
- object_type =
- g_type_register_static (G_TYPE_OBJECT, "DoubleClickDetector", &object_info,
- 0);
- }
-
- return object_type;
-}
+G_DEFINE_TYPE (DoubleClickDetector, double_click_detector, G_TYPE_OBJECT);
static void
double_click_detector_class_init (DoubleClickDetectorClass * detector_class)
{
- GObjectClass *g_obj_class = (GObjectClass *) detector_class;
-
- g_obj_class->dispose = double_click_detector_dispose;
}
static void
@@ -83,11 +51,6 @@ double_click_detector_new ()
return g_object_new (DOUBLE_CLICK_DETECTOR_TYPE, NULL);
}
-static void
-double_click_detector_dispose (GObject * obj)
-{
-}
-
gboolean
double_click_detector_is_double_click (DoubleClickDetector *this, guint32 event_time,
gboolean auto_update)
diff --git a/libslab/libslab-utils.c b/libslab/libslab-utils.c
index 3fd0237..3a2d50b 100644
--- a/libslab/libslab-utils.c
+++ b/libslab/libslab-utils.c
@@ -12,6 +12,7 @@
#include <sys/resource.h>
#include <sys/time.h>
#include <gconf/gconf-value.h>
+#include <gtk/gtk.h>
#define DESKTOP_ITEM_TERMINAL_EMULATOR_FLAG "TerminalEmulator"
#define ALTERNATE_DOCPATH_KEY "DocPath"
@@ -179,6 +180,29 @@ libslab_gnome_desktop_item_get_docpath (GnomeDesktopItem *item)
return path;
}
+/* Ugh, here we don't have knowledge of the screen that is being used. So, do
+ * what we can to find it.
+ */
+GdkScreen *
+libslab_get_current_screen (void)
+{
+ GdkEvent *event;
+ GdkScreen *screen = NULL;
+
+ event = gtk_get_current_event ();
+ if (event) {
+ if (event->any.window)
+ screen = gdk_drawable_get_screen (GDK_DRAWABLE (event->any.window));
+
+ gdk_event_free (event);
+ }
+
+ if (!screen)
+ screen = gdk_screen_get_default ();
+
+ return screen;
+}
+
gboolean
libslab_gnome_desktop_item_open_help (GnomeDesktopItem *item)
{
@@ -198,9 +222,7 @@ libslab_gnome_desktop_item_open_help (GnomeDesktopItem *item)
if (doc_path) {
help_uri = g_strdup_printf ("ghelp:%s", doc_path);
- gtk_show_uri (NULL, help_uri, gtk_get_current_event_time (), &error);
-
- if (error) {
+ if (!gtk_show_uri (libslab_get_current_screen (), help_uri, gtk_get_current_event_time (), &error)) {
g_warning ("error opening %s [%s]\n", help_uri, error->message);
g_error_free (error);
diff --git a/libslab/libslab-utils.h b/libslab/libslab-utils.h
index 8d414cb..322a00a 100644
--- a/libslab/libslab-utils.h
+++ b/libslab/libslab-utils.h
@@ -29,6 +29,8 @@ gboolean libslab_desktop_item_is_lockscreen (const gchar *uri);
gchar *libslab_string_replace_once (const gchar *string, const gchar *key, const gchar *value);
void libslab_spawn_command (const gchar *cmd);
+GdkScreen *libslab_get_current_screen (void);
+
void libslab_thumbnail_factory_preinit (void);
GnomeDesktopThumbnailFactory *libslab_thumbnail_factory_get (void);
diff --git a/libslab/nameplate-tile.c b/libslab/nameplate-tile.c
index 3ea5f3e..f3f4516 100644
--- a/libslab/nameplate-tile.c
+++ b/libslab/nameplate-tile.c
@@ -122,7 +122,6 @@ static void
nameplate_tile_get_property (GObject * g_object, guint prop_id, GValue * value,
GParamSpec * param_spec)
{
- char *tooltip;
NameplateTile *np_tile = NAMEPLATE_TILE (g_object);
switch (prop_id)
diff --git a/libslab/nameplate-tile.h b/libslab/nameplate-tile.h
index c0b8c54..f6b338b 100644
--- a/libslab/nameplate-tile.h
+++ b/libslab/nameplate-tile.h
@@ -21,7 +21,7 @@
#ifndef __NAMEPLATE_TILE_H__
#define __NAMEPLATE_TILE_H__
-#include "tile.h"
+#include <libslab/tile.h>
#include <gtk/gtk.h>
diff --git a/libslab/search-bar.c b/libslab/search-bar.c
index a15ff21..8e3f465 100644
--- a/libslab/search-bar.c
+++ b/libslab/search-bar.c
@@ -19,12 +19,13 @@
*/
#include "search-bar.h"
+#include "config.h"
+
#include "search-entry.h"
#include "search-context-picker.h"
#include "nld-marshal.h"
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
+#include <glib/gi18n-lib.h>
typedef struct
{
diff --git a/libslab/shell-window.c b/libslab/shell-window.c
index d7fd6d1..5202229 100644
--- a/libslab/shell-window.c
+++ b/libslab/shell-window.c
@@ -24,8 +24,6 @@
#include "app-resizer.h"
-static GtkWindowClass *parent_class = NULL;
-
static void shell_window_class_init (ShellWindowClass *);
static void shell_window_init (ShellWindow *);
static void shell_window_destroy (GtkObject *);
@@ -36,38 +34,11 @@ gboolean shell_window_paint_window (GtkWidget * widget, GdkEventExpose * event,
#define SHELL_WINDOW_BORDER_WIDTH 6
-GType
-shell_window_get_type (void)
-{
- static GType object_type = 0;
-
- if (!object_type)
- {
- static const GTypeInfo object_info = {
- sizeof (ShellWindowClass),
- NULL,
- NULL,
- (GClassInitFunc) shell_window_class_init,
- NULL,
- NULL,
- sizeof (ShellWindow),
- 0,
- (GInstanceInitFunc) shell_window_init
- };
-
- object_type = g_type_register_static (
- GTK_TYPE_FRAME, "ShellWindow", &object_info, 0);
- }
-
- return object_type;
-}
+G_DEFINE_TYPE (ShellWindow, shell_window, GTK_TYPE_FRAME);
static void
shell_window_class_init (ShellWindowClass * klass)
{
- parent_class = g_type_class_peek_parent (klass);
-
- ((GtkObjectClass *) klass)->destroy = shell_window_destroy;
}
static void
@@ -98,11 +69,6 @@ shell_window_new (AppShellData * app_data)
return GTK_WIDGET (window);
}
-static void
-shell_window_destroy (GtkObject * obj)
-{
-}
-
void
shell_window_clear_resize_handler (ShellWindow * win)
{
diff --git a/libslab/shell-window.h b/libslab/shell-window.h
index 88c1b1a..54124c0 100644
--- a/libslab/shell-window.h
+++ b/libslab/shell-window.h
@@ -24,7 +24,8 @@
#include <glib.h>
#include <gtk/gtk.h>
#include <libgnome/gnome-desktop-item.h>
-#include "app-shell.h"
+
+#include <libslab/app-shell.h>
G_BEGIN_DECLS
diff --git a/libslab/slab-gnome-util.c b/libslab/slab-gnome-util.c
index cf58878..a22d514 100644
--- a/libslab/slab-gnome-util.c
+++ b/libslab/slab-gnome-util.c
@@ -19,6 +19,7 @@
*/
#include "slab-gnome-util.h"
+#include "libslab-utils.h"
#include <gconf/gconf-client.h>
#include <gio/gio.h>
@@ -275,10 +276,7 @@ open_desktop_item_help (GnomeDesktopItem * desktop_item)
help_uri = g_strdup_printf ("ghelp:%s", doc_path);
error = NULL;
-
- gtk_show_uri (NULL, help_uri, gtk_get_current_event_time (), &error);
-
- if (error)
+ if (!gtk_show_uri (libslab_get_current_screen (), help_uri, gtk_get_current_event_time (), &error))
{
g_warning ("error opening %s [%s]\n", help_uri, error->message);
diff --git a/libslab/slab-section.c b/libslab/slab-section.c
index bb5d25a..6fbf700 100644
--- a/libslab/slab-section.c
+++ b/libslab/slab-section.c
@@ -20,8 +20,6 @@
#include "slab-section.h"
-#include <gtk/gtk.h>
-
G_DEFINE_TYPE (SlabSection, slab_section, GTK_TYPE_VBOX)
static void slab_section_finalize (GObject *);
diff --git a/libslab/slab.h b/libslab/slab.h
new file mode 100644
index 0000000..b550fc7
--- /dev/null
+++ b/libslab/slab.h
@@ -0,0 +1,45 @@
+/*
+ * This file is part of libslab.
+ *
+ * Copyright (c) 2006 Novell, Inc.
+ *
+ * Libslab 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.
+ *
+ * Libslab 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 libslab; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+#ifndef __SLAB_H__
+#define __SLAB_H__
+
+#include <libslab/app-resizer.h>
+#include <libslab/app-shell.h>
+#include <libslab/application-tile.h>
+#include <libslab/bookmark-agent.h>
+#include <libslab/directory-tile.h>
+#include <libslab/document-tile.h>
+#include <libslab/double-click-detector.h>
+#include <libslab/gnome-utils.h>
+#include <libslab/libslab-utils.h>
+#include <libslab/nameplate-tile.h>
+#include <libslab/search-bar.h>
+#include <libslab/search-context-picker.h>
+#include <libslab/search-entry.h>
+#include <libslab/shell-window.h>
+#include <libslab/slab-gnome-util.h>
+#include <libslab/slab-section.h>
+#include <libslab/system-tile.h>
+#include <libslab/tile.h>
+
+#endif /* __SLAB_H__ */
+
diff --git a/libslab/system-tile.c b/libslab/system-tile.c
index 6ab5b22..f5915a0 100644
--- a/libslab/system-tile.c
+++ b/libslab/system-tile.c
@@ -19,10 +19,10 @@
*/
#include "system-tile.h"
+#include "config.h"
#include <string.h>
-#include <glib/gi18n.h>
-#include <glib.h>
+#include <glib/gi18n-lib.h>
#include <gconf/gconf-client.h>
#include "bookmark-agent.h"
diff --git a/libslab/system-tile.h b/libslab/system-tile.h
index 270a7a1..40ee87e 100644
--- a/libslab/system-tile.h
+++ b/libslab/system-tile.h
@@ -21,7 +21,7 @@
#ifndef __SYSTEM_TILE_H__
#define __SYSTEM_TILE_H__
-#include "nameplate-tile.h"
+#include <libslab/nameplate-tile.h>
#include <libgnome/gnome-desktop-item.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]