projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Converted syntax-editor definition from libglade to gtkbuilder
[pspp-builds.git]
/
src
/
ui
/
gui
/
psppire-syntax-window.c
diff --git
a/src/ui/gui/psppire-syntax-window.c
b/src/ui/gui/psppire-syntax-window.c
index 31f4966ef33948495e7d65898059776c7314bf79..2b4c5b5e4ae871384bd6beb625e336b8c3411c8a 100644
(file)
--- a/
src/ui/gui/psppire-syntax-window.c
+++ b/
src/ui/gui/psppire-syntax-window.c
@@
-18,7
+18,6
@@
#include <gtk/gtksignal.h>
#include <gtk/gtkbox.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkbox.h>
-#include <glade/glade.h>
#include "helper.h"
#include <libpspp/message.h>
#include "helper.h"
#include <libpspp/message.h>
@@
-485,9
+484,9
@@
extern struct source_stream *the_source_stream ;
static void
psppire_syntax_window_init (PsppireSyntaxWindow *window)
{
static void
psppire_syntax_window_init (PsppireSyntaxWindow *window)
{
- G
ladeXML *xml = XML_NEW ("syntax-editor.glade
");
+ G
tkBuilder *xml = builder_new ("syntax-editor.ui
");
GtkWidget *box = gtk_vbox_new (FALSE, 0);
GtkWidget *box = gtk_vbox_new (FALSE, 0);
-
+
GtkWidget *menubar = get_widget_assert (xml, "menubar2");
GtkWidget *sw = get_widget_assert (xml, "scrolledwindow8");
GtkWidget *menubar = get_widget_assert (xml, "menubar2");
GtkWidget *sw = get_widget_assert (xml, "scrolledwindow8");
@@
-501,7
+500,7
@@
psppire_syntax_window_init (PsppireSyntaxWindow *window)
g_signal_connect (window->buffer, "changed", G_CALLBACK (on_text_changed), window);
g_signal_connect (window->buffer, "changed", G_CALLBACK (on_text_changed), window);
- connect_help (xml);
+
//
connect_help (xml);
gtk_container_add (GTK_CONTAINER (window), box);
gtk_container_add (GTK_CONTAINER (window), box);
@@
-518,74
+517,78
@@
psppire_syntax_window_init (PsppireSyntaxWindow *window)
gtk_widget_show_all (box);
gtk_widget_show_all (box);
- g_signal_connect (get_
widge
t_assert (xml,"file_new_syntax"),
+ g_signal_connect (get_
objec
t_assert (xml,"file_new_syntax"),
"activate",
G_CALLBACK (create_syntax_window),
NULL);
"activate",
G_CALLBACK (create_syntax_window),
NULL);
- g_signal_connect (get_
widge
t_assert (xml,"file_open_syntax"),
+ g_signal_connect (get_
objec
t_assert (xml,"file_open_syntax"),
"activate",
G_CALLBACK (open_syntax_window),
window);
#if 0
"activate",
G_CALLBACK (open_syntax_window),
window);
#if 0
- g_signal_connect (get_
widge
t_assert (xml,"file_new_data"),
+ g_signal_connect (get_
objec
t_assert (xml,"file_new_data"),
"activate",
G_CALLBACK (create_data_window),
window);
#endif
"activate",
G_CALLBACK (create_data_window),
window);
#endif
- g_signal_connect (get_
widge
t_assert (xml,"help_about"),
+ g_signal_connect (get_
objec
t_assert (xml,"help_about"),
"activate",
G_CALLBACK (about_new),
window);
"activate",
G_CALLBACK (about_new),
window);
- g_signal_connect (get_
widge
t_assert (xml,"help_reference"),
+ g_signal_connect (get_
objec
t_assert (xml,"help_reference"),
"activate",
G_CALLBACK (reference_manual),
NULL);
"activate",
G_CALLBACK (reference_manual),
NULL);
- g_signal_connect (get_
widge
t_assert (xml, "file_save"),
+ g_signal_connect (get_
objec
t_assert (xml, "file_save"),
"activate",
G_CALLBACK (on_syntax_save),
window);
"activate",
G_CALLBACK (on_syntax_save),
window);
- g_signal_connect (get_
widge
t_assert (xml, "file_save_as"),
+ g_signal_connect (get_
objec
t_assert (xml, "file_save_as"),
"activate",
G_CALLBACK (on_syntax_save_as),
window);
"activate",
G_CALLBACK (on_syntax_save_as),
window);
- g_signal_connect (get_
widge
t_assert (xml,"file_quit"),
+ g_signal_connect (get_
objec
t_assert (xml,"file_quit"),
"activate",
G_CALLBACK (on_quit),
window);
"activate",
G_CALLBACK (on_quit),
window);
- g_signal_connect (get_
widge
t_assert (xml,"run_all"),
+ g_signal_connect (get_
objec
t_assert (xml,"run_all"),
"activate",
G_CALLBACK (on_run_all),
window);
"activate",
G_CALLBACK (on_run_all),
window);
- g_signal_connect (get_
widge
t_assert (xml,"run_selection"),
+ g_signal_connect (get_
objec
t_assert (xml,"run_selection"),
"activate",
G_CALLBACK (on_run_selection),
window);
"activate",
G_CALLBACK (on_run_selection),
window);
- g_signal_connect (get_
widge
t_assert (xml,"run_current_line"),
+ g_signal_connect (get_
objec
t_assert (xml,"run_current_line"),
"activate",
G_CALLBACK (on_run_current_line),
window);
"activate",
G_CALLBACK (on_run_current_line),
window);
- g_signal_connect (get_
widge
t_assert (xml,"run_to_end"),
+ g_signal_connect (get_
objec
t_assert (xml,"run_to_end"),
"activate",
G_CALLBACK (on_run_to_end),
window);
"activate",
G_CALLBACK (on_run_to_end),
window);
- g_signal_connect (get_
widge
t_assert (xml,"windows_minimise_all"),
+ g_signal_connect (get_
objec
t_assert (xml,"windows_minimise_all"),
"activate",
G_CALLBACK (psppire_window_minimise_all), NULL);
"activate",
G_CALLBACK (psppire_window_minimise_all), NULL);
- PSPPIRE_WINDOW (window)->menu = GTK_MENU_SHELL (get_widget_assert (xml,"windows_menu"));
+ GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (xml, "uimanager1"));
+
+ PSPPIRE_WINDOW (window)->menu =
+ GTK_MENU_SHELL (GTK_WIDGET (gtk_ui_manager_get_widget (uim,"/ui/menubar2/windows/windows_minimise_all"))->parent);
+
g_object_unref (xml);
g_object_unref (xml);