[gtk+] gtk-demo: Remove demo_find_file() function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk-demo: Remove demo_find_file() function
- Date: Fri, 1 Feb 2013 16:48:19 +0000 (UTC)
commit ad69528bde0402f2df3952b652f94e0a94307709
Author: Benjamin Otte <otte redhat com>
Date: Fri Feb 1 17:38:08 2013 +0100
gtk-demo: Remove demo_find_file() function
It's not used anymore. With it, the demo-common.h header is not needed
anymore and is removed, too (and all the needless includes).
demos/gtk-demo/Makefile.am | 1 -
demos/gtk-demo/appwindow.c | 1 -
demos/gtk-demo/assistant.c | 1 -
demos/gtk-demo/builder.c | 1 -
demos/gtk-demo/changedisplay.c | 1 -
demos/gtk-demo/demo-common.h | 11 ------
demos/gtk-demo/iconview.c | 1 -
demos/gtk-demo/iconview_edit.c | 1 -
demos/gtk-demo/images.c | 1 -
demos/gtk-demo/main.c | 59 --------------------------------
demos/gtk-demo/pixbufs.c | 2 -
demos/gtk-demo/printing.c | 1 -
demos/gtk-demo/textscroll.c | 1 -
demos/gtk-demo/textview.c | 2 -
demos/gtk-demo/theming_custom_css.c | 1 -
demos/gtk-demo/theming_style_classes.c | 1 -
demos/gtk-demo/toolpalette.c | 1 -
17 files changed, 0 insertions(+), 87 deletions(-)
---
diff --git a/demos/gtk-demo/Makefile.am b/demos/gtk-demo/Makefile.am
index 165fdbc..109a4de 100644
--- a/demos/gtk-demo/Makefile.am
+++ b/demos/gtk-demo/Makefile.am
@@ -93,7 +93,6 @@ demos.h: @REBUILD@ $(demos) geninclude.pl
gtk3_demo_SOURCES = \
$(demos) \
- demo-common.h \
demo_resources.c \
main.c \
demos.h
diff --git a/demos/gtk-demo/appwindow.c b/demos/gtk-demo/appwindow.c
index ffd1721..e076075 100644
--- a/demos/gtk-demo/appwindow.c
+++ b/demos/gtk-demo/appwindow.c
@@ -7,7 +7,6 @@
#include <gtk/gtk.h>
#include "config.h"
-#include "demo-common.h"
static GtkWidget *window = NULL;
static GtkWidget *infobar = NULL;
diff --git a/demos/gtk-demo/assistant.c b/demos/gtk-demo/assistant.c
index 7d7fbcd..b461171 100644
--- a/demos/gtk-demo/assistant.c
+++ b/demos/gtk-demo/assistant.c
@@ -6,7 +6,6 @@
*/
#include <gtk/gtk.h>
-#include "demo-common.h"
static GtkWidget *assistant = NULL;
static GtkWidget *progress_bar = NULL;
diff --git a/demos/gtk-demo/builder.c b/demos/gtk-demo/builder.c
index 663fffd..7aeff37 100644
--- a/demos/gtk-demo/builder.c
+++ b/demos/gtk-demo/builder.c
@@ -4,7 +4,6 @@
*/
#include <gtk/gtk.h>
-#include "demo-common.h"
static GtkBuilder *builder;
diff --git a/demos/gtk-demo/changedisplay.c b/demos/gtk-demo/changedisplay.c
index f38819d..16d49fe 100644
--- a/demos/gtk-demo/changedisplay.c
+++ b/demos/gtk-demo/changedisplay.c
@@ -31,7 +31,6 @@
#undef GDK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
-#include "demo-common.h"
/* The ChangeDisplayInfo structure corresponds to a toplevel window and
* holds pointers to widgets inside the toplevel window along with other
diff --git a/demos/gtk-demo/iconview.c b/demos/gtk-demo/iconview.c
index 179c832..d54527b 100644
--- a/demos/gtk-demo/iconview.c
+++ b/demos/gtk-demo/iconview.c
@@ -7,7 +7,6 @@
#include <gtk/gtk.h>
#include <string.h>
-#include "demo-common.h"
static GtkWidget *window = NULL;
diff --git a/demos/gtk-demo/iconview_edit.c b/demos/gtk-demo/iconview_edit.c
index 2e7d4a0..0487e52 100644
--- a/demos/gtk-demo/iconview_edit.c
+++ b/demos/gtk-demo/iconview_edit.c
@@ -7,7 +7,6 @@
#include <gtk/gtk.h>
#include <string.h>
-#include "demo-common.h"
static GtkWidget *window = NULL;
diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c
index ef63f37..d29ea97 100644
--- a/demos/gtk-demo/images.c
+++ b/demos/gtk-demo/images.c
@@ -16,7 +16,6 @@
#include <glib/gstdio.h>
#include <stdio.h>
#include <errno.h>
-#include "demo-common.h"
static GtkWidget *window = NULL;
static GdkPixbufLoader *pixbuf_loader = NULL;
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index d9e090e..e428a39 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -32,65 +32,6 @@ struct _CallbackData
GtkTreePath *path;
};
-#ifdef G_OS_WIN32
-
-#undef DEMOCODEDIR
-
-static char *
-get_democodedir (void)
-{
- static char *result = NULL;
-
- if (result == NULL)
- {
- result = g_win32_get_package_installation_directory_of_module (NULL);
- if (result == NULL)
- result = "unknown-location";
-
- result = g_strconcat (result, "\\share\\gtk-3.0\\demo", NULL);
- }
-
- return result;
-}
-
-#define DEMOCODEDIR get_democodedir ()
-
-#endif
-
-/**
- * demo_find_file:
- * @base: base filename
- * @err: location to store error, or %NULL.
- *
- * Looks for @base first in the current directory, then in the
- * location GTK+ where it will be installed on make install,
- * returns the first file found.
- *
- * Return value: the filename, if found or %NULL
- */
-gchar *
-demo_find_file (const char *base,
- GError **err)
-{
- g_return_val_if_fail (err == NULL || *err == NULL, NULL);
-
- if (g_file_test ("gtk-logo-rgb.gif", G_FILE_TEST_EXISTS) &&
- g_file_test (base, G_FILE_TEST_EXISTS))
- return g_strdup (base);
- else
- {
- char *filename = g_build_filename (DEMOCODEDIR, base, NULL);
- if (!g_file_test (filename, G_FILE_TEST_EXISTS))
- {
- g_set_error (err, G_FILE_ERROR, G_FILE_ERROR_NOENT,
- "Cannot find demo data file \"%s\"", base);
- g_free (filename);
- return NULL;
- }
- return filename;
- }
-}
-
static void
window_closed_cb (GtkWidget *window, gpointer data)
{
diff --git a/demos/gtk-demo/pixbufs.c b/demos/gtk-demo/pixbufs.c
index 3f4f896..e46abc2 100644
--- a/demos/gtk-demo/pixbufs.c
+++ b/demos/gtk-demo/pixbufs.c
@@ -16,8 +16,6 @@
#include <gtk/gtk.h>
#include <math.h>
-#include "demo-common.h"
-
#define FRAME_DELAY 50
#define BACKGROUND_NAME "/pixbufs/background.jpg"
diff --git a/demos/gtk-demo/printing.c b/demos/gtk-demo/printing.c
index 3650ea5..cc6473f 100644
--- a/demos/gtk-demo/printing.c
+++ b/demos/gtk-demo/printing.c
@@ -7,7 +7,6 @@
#include <math.h>
#include <gtk/gtk.h>
-#include "demo-common.h"
/* In points */
#define HEADER_HEIGHT (10*72/25.4)
diff --git a/demos/gtk-demo/textscroll.c b/demos/gtk-demo/textscroll.c
index dae9b43..277609b 100644
--- a/demos/gtk-demo/textscroll.c
+++ b/demos/gtk-demo/textscroll.c
@@ -6,7 +6,6 @@
*/
#include <gtk/gtk.h>
-#include "demo-common.h"
/* Scroll to the end of the buffer.
*/
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
index 31aeea6..c401790 100644
--- a/demos/gtk-demo/textview.c
+++ b/demos/gtk-demo/textview.c
@@ -10,8 +10,6 @@
#include <gtk/gtk.h>
#include <stdlib.h> /* for exit() */
-#include "demo-common.h"
-
static void easter_egg_callback (GtkWidget *button, gpointer data);
static void
diff --git a/demos/gtk-demo/theming_custom_css.c b/demos/gtk-demo/theming_custom_css.c
index 20fb4e1..fb557eb 100644
--- a/demos/gtk-demo/theming_custom_css.c
+++ b/demos/gtk-demo/theming_custom_css.c
@@ -10,7 +10,6 @@
*/
#include <gtk/gtk.h>
-#include "demo-common.h"
static GtkWidget *window = NULL;
diff --git a/demos/gtk-demo/theming_style_classes.c b/demos/gtk-demo/theming_style_classes.c
index a70d73f..0dc2dda 100644
--- a/demos/gtk-demo/theming_style_classes.c
+++ b/demos/gtk-demo/theming_style_classes.c
@@ -9,7 +9,6 @@
*/
#include <gtk/gtk.h>
-#include "demo-common.h"
static GtkWidget *window = NULL;
diff --git a/demos/gtk-demo/toolpalette.c b/demos/gtk-demo/toolpalette.c
index 95ece8d..25d05ee 100644
--- a/demos/gtk-demo/toolpalette.c
+++ b/demos/gtk-demo/toolpalette.c
@@ -7,7 +7,6 @@
#include <string.h>
#include <gtk/gtk.h>
#include "config.h"
-#include "demo-common.h"
static GtkWidget *window = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]