Commit defc3bc7 authored by Sebastien Granjoux's avatar Sebastien Granjoux

Fix #584013 – libanjuta-1.0.pc.in still requires libglade-2.0

Remove some old files and remaining glade references
parent a8b1567d
......@@ -9,6 +9,6 @@ idldir=@datadir@/idl/libanjuta-1.0
Name: libanjuta
Description: Libraries for developing Anjuta plugins.
Version: @VERSION@
Requires: libgnomeui-2.0 libglade-2.0
Requires: libgnomeui-2.0
Libs: -L${libdir} -lanjuta
Cflags: -I${includedir}
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@/libanjuta-1.0
idldir=@datadir@/idl/libanjuta-1.0
Name: libanjuta
Description: Libraries for developing Anjuta plugins.
Version: @VERSION@
Requires: libbonoboui-2.0 libgnome-2.0 libgnomeui-2.0 gtk+-2.0 libxml-2.0 libglade-2.0 gdl-1.0
Libs: -L${libdir} -lanjuta
Cflags: -I${includedir}
......@@ -23,7 +23,6 @@
#include "plugin.h"
#include <glade/glade.h>
#include <stdio.h>
#include <libanjuta/anjuta-plugin.h>
#include <libanjuta/interfaces/ianjuta-editor.h>
......
......@@ -59,7 +59,6 @@ libanjuta_language_cpp_java_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
# Plugin dependencies
libanjuta_language_cpp_java_la_LIBADD = \
$(GLADE_LIBS) \
$(LIBANJUTA_LIBS)
prefs_ui_files = anjuta-language-cpp-java.ui
......
......@@ -37,7 +37,6 @@ libanjuta_project_wizard_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
libanjuta_project_wizard_la_LIBADD = \
$(GNOME_UI_LIBS) \
$(GLADE_LIBS) \
$(LIBANJUTA_LIBS)
libanjuta_project_wizard_la_SOURCES= \
......
......@@ -38,7 +38,6 @@
#include <sys/stat.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <libanjuta/anjuta-utils.h>
#include <libanjuta/anjuta-shell.h>
......
......@@ -77,7 +77,6 @@ libanjuta_sourceview_la_LIBADD = \
$(GNOME_PRINT_UI_LIBS) \
$(GIO_LIBS) \
$(PLUGIN_SOURCEVIEW_LIBS) \
$(GLADE_LIBS) \
$(LIBANJUTA_LIBS)
prefs_ui_files = anjuta-editor-sourceview.ui
......
......@@ -4,10 +4,8 @@ anjuta_data_DATA = anjuta_project.template
EXTRA_DIST = $(anjuta_data_DATA)
# Distribute but don't install glade2schema.pl
# Distribute but don't install builder2schema.pl
dist-hook:
cp $(srcdir)/glade2schema.pl $(distdir)
chmod +x $(distdir)/glade2schema.pl
cp $(srcdir)/builder2schema.pl $(distdir)
chmod +x $(distdir)/builder2schema.pl
-include $(top_srcdir)/git.mk
# Targets for handing glade-to-GConf schema conversion for prefs keys
prefs_glade_schemasdir = @GCONF_SCHEMA_FILE_DIR@
prefs_glade_schemas = $(prefs_glade_files:.glade=.schemas)
prefs_glade_schemas_DATA = $(prefs_glade_schemas)
%.schemas: %.glade
$(top_srcdir)/scripts/glade2schema.pl $< > $@
# Targets for handing ui-to-GConf schema conversion for prefs keys
prefs_ui_schemasdir = @GCONF_SCHEMA_FILE_DIR@
prefs_ui_schemas = $(prefs_ui_files:.ui=.schemas)
......@@ -15,19 +8,13 @@ prefs_ui_schemas_DATA = $(prefs_ui_schemas)
$(top_srcdir)/scripts/builder2schema.pl $< > $@
if GCONF_SCHEMAS_INSTALL
install-data-local: $(prefs_glade_schemas) $(prefs_ui_schemas)
for p in $(prefs_glade_schemas) ; do \
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p ; \
done
install-data-local: $(prefs_ui_schemas)
for p in $(prefs_ui_schemas) ; do \
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p ; \
done
@killall -1 gconfd-2 || true
uninstall-local: $(prefs_glade_schemas) $(prefs_ui_schemas)
for p in $(prefs_glade_schemas) ; do \
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $$p ; \
done
uninstall-local: $(prefs_ui_schemas)
for p in $(prefs_ui_schemas) ; do \
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $$p ; \
done
......@@ -39,4 +26,4 @@ install-data-local:
uninstall-local:
endif
CLEANFILES = $(prefs_glade_schemas) $(prefs_ui_schemas)
CLEANFILES = $(prefs_ui_schemas)
#!/usr/bin/perl
use XML::Parser;
%datatypes = (
"bool" => "bool",
"int" => "int",
"string" => "string",
"text" => "string",
"float" => "float",
"color" => "string",
"font" => "string",
"folder" => "string",
"file" => "string"
);
%boolean = (
0 => "FALSE",
1 => "TRUE"
);
$schema_path = "/schemas/apps/anjuta/preferences/";
$key_path ="/apps/anjuta/preferences/";
my $parser = new XML::Parser(Style => "Stream");
print "<gconfschemafile>\n";
print "\t<schemalist>\n";
$parser->parsefile($ARGV[0]);
print "\t</schemalist>\n";
print "</gconfschemafile>\n";
sub StartTag {
my $parser = shift;
my $key = shift;
if ($key =~ /widget/) {
my $k = $_{"id"};
if ($k =~ /(preferences_color|entry|font|spin|text|toggle|menu|folder|file):(.*):(.*):(\d):(.*)/) {
my $type = $2;
my $default = $3;
my $flags = $4;
my $propkey = $5;
if ($type =~ /bool/) {
$default = $boolean{$default};
}
print "\t\t<schema>\n";
print "\t\t\t<key>$schema_path$propkey</key>\n";
print "\t\t\t<applyto>$key_path$propkey</applyto>\n";
print "\t\t\t<owner>anjuta</owner>\n";
print "\t\t\t<type>$datatypes{$type}</type>\n";
print "\t\t\t<default>$default</default>\n";
# Hack to keep gconftool happy
print "\t\t\t<locale name=\"C\" />\n";
print "\t\t</schema>\n\n";
}
}
}
sub EndTag {}
sub Text {}
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* start-with.c
* Copyright (C) 2003 Naba Kumar <naba@gnome.org>
*
* 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., 59
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <gtk/gtk.h>
#include <glade/glade.h>
#include "anjuta.h"
#include "start-with.h"
#define GLADE_FILE PACKAGE_DATA_DIR"/glade/anjuta.glade"
static void
on_application_wizard_clicked (GtkButton *button, gpointer data)
{
GtkWidget *dialog = GTK_WIDGET (data);
g_signal_emit_by_name (G_OBJECT (app->menubar.file.new_project),
"activate", NULL);
gtk_widget_destroy (dialog);
}
static void
on_import_wizard_clicked (GtkButton *button, gpointer data)
{
GtkWidget *dialog = GTK_WIDGET (data);
g_signal_emit_by_name (G_OBJECT (app->menubar.file.import_project),
"activate", NULL);
gtk_widget_destroy (dialog);
}
static void
on_open_project_clicked (GtkButton *button, gpointer data)
{
GtkWidget *dialog = GTK_WIDGET (data);
g_signal_emit_by_name (G_OBJECT (app->menubar.file.open_project),
"activate", NULL);
gtk_widget_destroy (dialog);
}
static void
on_open_last_project_clicked (GtkButton *button, gpointer data)
{
GtkWidget *dialog;
/* Do not allow a second click */
gchar *prj_filename;
dialog = GTK_WIDGET (data);
gtk_widget_set_sensitive (GTK_WIDGET (button), FALSE);
prj_filename = anjuta_preferences_get (app->preferences,
"anjuta.last.open.project");
project_dbase_load_project (app->project_dbase, prj_filename, TRUE);
g_free (prj_filename);
gtk_widget_destroy (dialog);
}
static void
on_open_file_clicked (GtkButton *button, gpointer data)
{
GtkWidget *dialog = GTK_WIDGET (data);
g_signal_emit_by_name (G_OBJECT (app->menubar.file.open_file),
"activate", NULL);
gtk_widget_destroy (dialog);
}
static void
on_new_file_clicked (GtkButton *button, gpointer data)
{
GtkWidget *dialog = GTK_WIDGET (data);
g_signal_emit_by_name (G_OBJECT (app->menubar.file.new_file),
"activate", NULL);
gtk_widget_destroy (dialog);
}
static void
on_do_not_show_again_toggled (GtkToggleButton *button, AnjutaPreferences *p)
{
gboolean state;
state = gtk_toggle_button_get_active (button);
anjuta_preferences_set_int (p, "donotshow.start.with.dialog", state);
}
static void
on_dialog_response (GtkWidget *dialog, gint response, gpointer data)
{
gtk_widget_destroy (dialog);
}
void
start_with_dialog_show (GtkWindow *parent, AnjutaPreferences *pref,
gboolean force)
{
GladeXML *gxml;
GtkWidget *dialog;
GtkWidget *button;
gboolean do_not_show;
gboolean reload_last_project;
gchar *last_project;
do_not_show = anjuta_preferences_get_int (pref, "donotshow.start.with.dialog");
reload_last_project = anjuta_preferences_get_int (pref, "reload.last.project");
last_project = anjuta_preferences_get (pref, "anjuta.last.open.project");
/* Return if the dialog is not to be shown */
if (!force && do_not_show) {
g_free (last_project)
return;
}
/* Return if preference for loading last project is set */
if (!force && reload_last_project &&
last_project && file_is_readable (last_project)) {
g_free (last_project);
return;
}
gxml = glade_xml_new (GLADE_FILE, "start_with_dialog", NULL);
g_return_if_fail (gxml != NULL);
dialog = glade_xml_get_widget (gxml, "start_with_dialog");
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
g_signal_connect (G_OBJECT (dialog), "response",
G_CALLBACK (on_dialog_response), pref);
button = glade_xml_get_widget (gxml, "application_wizard_button");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_application_wizard_clicked), dialog);
button = glade_xml_get_widget (gxml, "import_wizard_button");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_import_wizard_clicked), dialog);
button = glade_xml_get_widget (gxml, "open_project_button");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_open_project_clicked), dialog);
button = glade_xml_get_widget (gxml, "open_last_project_button");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_open_last_project_clicked), dialog);
if (last_project && file_is_readable (last_project))
gtk_widget_set_sensitive (button, TRUE);
else
gtk_widget_set_sensitive (button, FALSE);
button = glade_xml_get_widget (gxml, "open_file_button");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_open_file_clicked), dialog);
button = glade_xml_get_widget (gxml, "new_file_button");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_new_file_clicked), dialog);
button = glade_xml_get_widget (gxml, "do_not_show_button");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), do_not_show);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (on_do_not_show_again_toggled), pref);
g_object_unref (gxml);
g_free (last_project);
gtk_widget_show (dialog);
}
void
start_with_dialog_save_yourself (AnjutaPreferences *pref, FILE *fp)
{
gint state = anjuta_preferences_get_int (pref, "donotshow.start.with.dialog");
fprintf (fp, "donotshow.start.with.dialog=%d\n", state);
}
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* start-with.h
* Copyright (C) 2003 Naba Kumar <naba@gnome.org>
*
* 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., 59
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _START_WITH_H_
#define _START_WITH_H_
void start_with_dialog_show (GtkWindow *parent, AnjutaPreferences *pref,
gboolean force);
void start_with_dialog_save_yourself (AnjutaPreferences *pref, FILE *stream);
#endif
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