[file-roller] Compile with -DGSEAL_ENABLE. Fixes bug 612470.
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] Compile with -DGSEAL_ENABLE. Fixes bug 612470.
- Date: Mon, 3 May 2010 11:01:06 +0000 (UTC)
commit e40c8078703c30c27877cf0d9ab63d8b48858998
Author: Andre Klapper <a9016009 gmx de>
Date: Fri Apr 23 19:06:15 2010 +0200
Compile with -DGSEAL_ENABLE. Fixes bug 612470.
src/fr-window.c | 24 ++++++++++++------------
src/gtk-utils.c | 38 +++++++++++++++++++++++++-------------
2 files changed, 37 insertions(+), 25 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 767a4f4..971a639 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -3961,7 +3961,7 @@ fr_window_drag_data_received (GtkWidget *widget,
return;
}
- if (! ((data->length >= 0) && (data->format == 8))) {
+ if (! ((gtk_selection_data_get_length (data) >= 0) && (gtk_selection_data_get_format (data) == 8))) {
gtk_drag_finish (context, FALSE, FALSE, time);
return;
}
@@ -3973,17 +3973,17 @@ fr_window_drag_data_received (GtkWidget *widget,
gtk_drag_finish (context, TRUE, FALSE, time);
- if (data->target == XFR_ATOM) {
+ if (gtk_selection_data_get_target (data) == XFR_ATOM) {
FrClipboardData *dnd_data;
- dnd_data = get_clipboard_data_from_selection_data (window, (char*) data->data);
+ dnd_data = get_clipboard_data_from_selection_data (window, (char*) gtk_selection_data_get_data (data));
dnd_data->current_dir = g_strdup (fr_window_get_current_location (window));
fr_window_paste_from_clipboard_data (window, dnd_data);
return;
}
- list = get_uri_list_from_selection_data ((char*)data->data);
+ list = get_uri_list_from_selection_data ((char*) gtk_selection_data_get_data (data));
if (list == NULL) {
GtkWidget *d;
@@ -4274,7 +4274,7 @@ fr_window_folder_tree_drag_data_get (GtkWidget *widget,
if (file_list == NULL)
return FALSE;
- if (selection_data->target == XFR_ATOM) {
+ if (gtk_selection_data_get_target (selection_data) == XFR_ATOM) {
FrClipboardData *tmp;
char *data;
@@ -4327,7 +4327,7 @@ fr_window_folder_tree_drag_data_get (GtkWidget *widget,
/* sends back the response */
- gtk_selection_data_set (selection_data, selection_data->target, 8, (guchar *) ((window->priv->drag_error == NULL) ? "S" : "E"), 1);
+ gtk_selection_data_set (selection_data, gtk_selection_data_get_target (selection_data), 8, (guchar *) ((window->priv->drag_error == NULL) ? "S" : "E"), 1);
debug (DEBUG_INFO, "::DragDataGet <--\n");
@@ -4354,7 +4354,7 @@ fr_window_file_list_drag_data_get (FrWindow *window,
if (window->priv->activity_ref > 0)
return FALSE;
- if (selection_data->target == XFR_ATOM) {
+ if (gtk_selection_data_get_target (selection_data) == XFR_ATOM) {
FrClipboardData *tmp;
char *data;
@@ -4407,7 +4407,7 @@ fr_window_file_list_drag_data_get (FrWindow *window,
/* sends back the response */
- gtk_selection_data_set (selection_data, selection_data->target, 8, (guchar *) ((window->priv->drag_error == NULL) ? "S" : "E"), 1);
+ gtk_selection_data_set (selection_data, gtk_selection_data_get_target (selection_data), 8, (guchar *) ((window->priv->drag_error == NULL) ? "S" : "E"), 1);
debug (DEBUG_INFO, "::DragDataGet <--\n");
@@ -5904,7 +5904,7 @@ fr_window_construct (FrWindow *window)
statusbar_box = gtk_statusbar_get_message_area (statusbar);
gtk_box_set_homogeneous (GTK_BOX (statusbar_box), FALSE);
gtk_box_set_spacing (GTK_BOX (statusbar_box), 4);
- gtk_box_set_child_packing (GTK_BOX (statusbar_box), statusbar->label, TRUE, TRUE, 0, GTK_PACK_START );
+ gtk_box_set_child_packing (GTK_BOX (statusbar_box), gtk_statusbar_get_message_area (statusbar), TRUE, TRUE, 0, GTK_PACK_START );
#else
statusbar_box = gtk_hbox_new (FALSE, 4);
g_object_ref (statusbar->label);
@@ -7556,12 +7556,12 @@ fr_clipboard_get (GtkClipboard *clipboard,
FrWindow *window = user_data_or_owner;
char *data;
- if (selection_data->target != FR_SPECIAL_URI_LIST)
+ if (gtk_selection_data_get_target (selection_data) != FR_SPECIAL_URI_LIST)
return;
data = get_selection_data_from_clipboard_data (window, window->priv->copy_data);
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8,
(guchar *) data,
strlen (data));
@@ -7891,7 +7891,7 @@ fr_window_paste_selection_to (FrWindow *window,
if (selection_data == NULL)
return;
- paste_data = get_clipboard_data_from_selection_data (window, (char*) selection_data->data);
+ paste_data = get_clipboard_data_from_selection_data (window, (char*) gtk_selection_data_get_data (selection_data));
paste_data->current_dir = g_strdup (current_dir);
fr_window_paste_from_clipboard_data (window, paste_data);
diff --git a/src/gtk-utils.c b/src/gtk-utils.c
index 47abc77..aaeb002 100644
--- a/src/gtk-utils.c
+++ b/src/gtk-utils.c
@@ -63,6 +63,7 @@ _gtk_message_dialog_new (GtkWindow *parent,
GtkWidget *label;
GtkWidget *image;
GtkWidget *hbox;
+ GtkWidget *content_area;
va_list args;
const gchar *text;
int response_id;
@@ -75,10 +76,12 @@ _gtk_message_dialog_new (GtkWindow *parent,
dialog = gtk_dialog_new_with_buttons ("", parent, flags, NULL);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 6);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 8);
+ gtk_container_set_border_width (GTK_CONTAINER (content_area), 6);
+ gtk_box_set_spacing (GTK_BOX (content_area), 8);
/* Add label and image */
@@ -120,7 +123,7 @@ _gtk_message_dialog_new (GtkWindow *parent,
gtk_box_pack_start (GTK_BOX (hbox), label,
TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (content_area),
hbox,
FALSE, FALSE, 0);
@@ -179,7 +182,7 @@ create_button (const char *stock_id,
button = gtk_button_new_with_mnemonic (label_text);
gtk_button_set_image (GTK_BUTTON (button), image);
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
@@ -204,6 +207,7 @@ _gtk_request_dialog_run (GtkWindow *parent,
GtkWidget *vbox;
GtkWidget *entry;
GtkWidget *button;
+ GtkWidget *content_area;
char *stock_id;
char *result;
@@ -211,10 +215,12 @@ _gtk_request_dialog_run (GtkWindow *parent,
dialog = gtk_dialog_new_with_buttons (title, parent, flags, NULL);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 6);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 8);
+ gtk_container_set_border_width (GTK_CONTAINER (content_area), 6);
+ gtk_box_set_spacing (GTK_BOX (content_area), 8);
/* Add label and image */
@@ -248,7 +254,7 @@ _gtk_request_dialog_run (GtkWindow *parent,
gtk_box_pack_start (GTK_BOX (vbox), entry,
FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (content_area),
hbox,
FALSE, FALSE, 0);
@@ -295,15 +301,18 @@ _gtk_yesno_dialog_new (GtkWindow *parent,
GtkWidget *image;
GtkWidget *hbox;
GtkWidget *button;
+ GtkWidget *content_area;
char *stock_id = GTK_STOCK_DIALOG_WARNING;
d = gtk_dialog_new_with_buttons ("", parent, flags, NULL);
gtk_window_set_resizable (GTK_WINDOW (d), FALSE);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (d));
+
gtk_dialog_set_has_separator (GTK_DIALOG (d), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (d), 6);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (d)->vbox), 6);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (d)->vbox), 8);
+ gtk_container_set_border_width (GTK_CONTAINER (content_area), 6);
+ gtk_box_set_spacing (GTK_BOX (content_area), 8);
/* Add label and image */
@@ -323,7 +332,7 @@ _gtk_yesno_dialog_new (GtkWindow *parent,
gtk_box_pack_start (GTK_BOX (hbox), label,
TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (d)->vbox),
+ gtk_box_pack_start (GTK_BOX (content_area),
hbox,
FALSE, FALSE, 0);
@@ -367,6 +376,7 @@ _gtk_error_dialog_new (GtkWindow *parent,
GtkWidget *text_view;
GtkWidget *scrolled = NULL;
GtkWidget *expander;
+ GtkWidget *content_area;
GtkTextBuffer *text_buf;
GtkTextIter iter;
char *stock_id;
@@ -385,10 +395,12 @@ _gtk_error_dialog_new (GtkWindow *parent,
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 6);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 8);
+ gtk_container_set_border_width (GTK_CONTAINER (content_area), 6);
+ gtk_box_set_spacing (GTK_BOX (content_area), 8);
gtk_widget_set_size_request (dialog, 500, -1);
@@ -479,7 +491,7 @@ _gtk_error_dialog_new (GtkWindow *parent,
gtk_box_pack_start (GTK_BOX (vbox), expander, TRUE, TRUE, 0);
}
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (content_area),
vbox,
FALSE, FALSE, 0);
gtk_widget_show_all (vbox);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]