projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid deprecation warnings by use of gtk2 -> gtk3 wrapper macros.
[pspp]
/
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 0c05fdc58e167436ac0419faaf118ca894f3f200..2402b341c117d0c831c47755aef8f97a0c6ebb47 100644
(file)
--- a/
src/ui/gui/psppire-syntax-window.c
+++ b/
src/ui/gui/psppire-syntax-window.c
@@
-296,7
+296,7
@@
clipboard_get_cb (GtkClipboard *clipboard,
PsppireSyntaxWindow *sw = data;
g_assert (info == SELECT_FMT_TEXT);
PsppireSyntaxWindow *sw = data;
g_assert (info == SELECT_FMT_TEXT);
- gtk_selection_data_set (selection_data,
selection_data->target
,
+ gtk_selection_data_set (selection_data,
gtk_selection_data_get_target (selection_data)
,
8,
(const guchar *) sw->cliptext, strlen (sw->cliptext));
8,
(const guchar *) sw->cliptext, strlen (sw->cliptext));
@@
-378,15
+378,15
@@
contents_received_callback (GtkClipboard *clipboard,
{
PsppireSyntaxWindow *syntax_window = data;
{
PsppireSyntaxWindow *syntax_window = data;
- if (
sd->length
< 0 )
+ if (
gtk_selection_data_get_length (sd)
< 0 )
return;
return;
- if (
sd->type
!= gdk_atom_intern ("UTF8_STRING", FALSE))
+ if (
gtk_selection_data_get_data_type (sd)
!= gdk_atom_intern ("UTF8_STRING", FALSE))
return;
gtk_text_buffer_insert_at_cursor (GTK_TEXT_BUFFER (syntax_window->buffer),
return;
gtk_text_buffer_insert_at_cursor (GTK_TEXT_BUFFER (syntax_window->buffer),
- (gchar *)
sd->data
,
-
sd->length
);
+ (gchar *)
gtk_selection_data_get_data (sd)
,
+
gtk_selection_data_get_length (sd)
);
}
}
@@
-669,7
+669,7
@@
load_and_show_syntax_window (GtkWidget *se, const gchar *filename)
gboolean ok;
gtk_source_buffer_begin_not_undoable_action (PSPPIRE_SYNTAX_WINDOW (se)->buffer);
gboolean ok;
gtk_source_buffer_begin_not_undoable_action (PSPPIRE_SYNTAX_WINDOW (se)->buffer);
- ok = psppire_window_load (PSPPIRE_WINDOW (se), filename);
+ ok = psppire_window_load (PSPPIRE_WINDOW (se), filename
, NULL
);
gtk_source_buffer_end_not_undoable_action (PSPPIRE_SYNTAX_WINDOW (se)->buffer);
if (ok )
gtk_source_buffer_end_not_undoable_action (PSPPIRE_SYNTAX_WINDOW (se)->buffer);
if (ok )
@@
-892,11
+892,11
@@
psppire_syntax_window_init (PsppireSyntaxWindow *window)
{
GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (xml, "uimanager1", GTK_TYPE_UI_MANAGER));
{
GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (xml, "uimanager1", GTK_TYPE_UI_MANAGER));
+ GtkWidget *w = gtk_ui_manager_get_widget (uim,"/ui/menubar/windows/windows_minimise_all");
merge_help_menu (uim);
merge_help_menu (uim);
- PSPPIRE_WINDOW (window)->menu =
- GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar/windows/windows_minimise_all")->parent);
+ PSPPIRE_WINDOW (window)->menu = GTK_MENU_SHELL (gtk_widget_get_parent (w));
}
g_object_unref (xml);
}
g_object_unref (xml);
@@
-944,7
+944,7
@@
error_dialog (GtkWindow *w, const gchar *filename, GError *err)
Loads the buffer from the file called FILENAME
*/
gboolean
Loads the buffer from the file called FILENAME
*/
gboolean
-syntax_load (PsppireWindow *window, const gchar *filename)
+syntax_load (PsppireWindow *window, const gchar *filename
, gpointer not_used
)
{
GError *err = NULL;
gchar *text_locale = NULL;
{
GError *err = NULL;
gchar *text_locale = NULL;