[gedit] Renamed message areas to info bars
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Renamed message areas to info bars
- Date: Sat, 12 Jun 2010 19:31:11 +0000 (UTC)
commit 91f805bfdbf9c67cb451740a7706d80fda645841
Author: Garrett Regier <alias301 gmail com>
Date: Sat Jun 12 12:30:56 2010 -0700
Renamed message areas to info bars
docs/reference/Makefile.am | 2 +-
gedit/Makefile.am | 8 +-
...or-message-area.c => gedit-io-error-info-bar.c} | 320 +++++++-------------
gedit/gedit-io-error-info-bar.h | 70 +++++
gedit/gedit-io-error-message-area.h | 70 -----
gedit/gedit-progress-info-bar.c | 244 +++++++++++++++
gedit/gedit-progress-info-bar.h | 102 ++++++
gedit/gedit-progress-message-area.c | 263 ----------------
gedit/gedit-progress-message-area.h | 114 -------
gedit/gedit-tab.c | 322 +++++++++-----------
10 files changed, 669 insertions(+), 846 deletions(-)
---
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 000a93e..f23162e 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -44,7 +44,7 @@ IGNORE_HFILES= \
gedit-document-loader.h \
gedit-document-saver.h \
gedit-documents-panel.h \
- gedit-io-error-message-area.h \
+ gedit-io-error-info-bar.h \
gedit-languages-manager.h \
gedit-message-area.h \
gedit-object-module.h \
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index a7be5d4..6bf6894 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -101,7 +101,7 @@ NOINST_H_FILES = \
gedit-document-saver.h \
gedit-documents-panel.h \
gedit-history-entry.h \
- gedit-io-error-message-area.h \
+ gedit-io-error-info-bar.h \
gedit-language-manager.h \
gedit-multi-notebook.h \
gedit-notebook.h \
@@ -135,7 +135,7 @@ INST_H_FILES = \
gedit-message.h \
gedit-panel.h \
gedit-plugin.h \
- gedit-progress-message-area.h \
+ gedit-progress-info-bar.h \
gedit-statusbar.h \
gedit-status-combo-box.h \
gedit-tab.h \
@@ -177,7 +177,7 @@ libgedit_la_SOURCES = \
gedit-encodings-combo-box.c \
gedit-file-chooser-dialog.c \
gedit-history-entry.c \
- gedit-io-error-message-area.c \
+ gedit-io-error-info-bar.c \
gedit-language-manager.c \
gedit-message-bus.c \
gedit-message-type.c \
@@ -193,7 +193,7 @@ libgedit_la_SOURCES = \
gedit-plugins-engine.c \
gedit-print-job.c \
gedit-print-preview.c \
- gedit-progress-message-area.c \
+ gedit-progress-info-bar.c \
gedit-session.c \
gedit-settings.c \
gedit-smart-charset-converter.c \
diff --git a/gedit/gedit-io-error-message-area.c b/gedit/gedit-io-error-info-bar.c
similarity index 81%
rename from gedit/gedit-io-error-message-area.c
rename to gedit/gedit-io-error-info-bar.c
index 65d6bef..0700a8b 100644
--- a/gedit/gedit-io-error-message-area.c
+++ b/gedit/gedit-io-error-info-bar.c
@@ -1,5 +1,5 @@
/*
- * gedit-io-error-message-area.c
+ * gedit-io-error-info-bar.c
* This file is part of gedit
*
* Copyright (C) 2005 - Paolo Maggi
@@ -45,15 +45,9 @@
#include "gedit-settings.h"
#include "gedit-utils.h"
#include "gedit-document.h"
-#include "gedit-io-error-message-area.h"
+#include "gedit-io-error-info-bar.h"
#include <gedit/gedit-encodings-combo-box.h>
-#include "gseal-gtk-compat.h"
-
-#if !GTK_CHECK_VERSION (2, 17, 1)
-#include "gedit-message-area.h"
-#endif
-
#define MAX_URI_IN_DIALOG_LENGTH 50
static gboolean
@@ -93,20 +87,14 @@ static void
set_contents (GtkWidget *area,
GtkWidget *contents)
{
-#if !GTK_CHECK_VERSION (2, 17, 1)
- gedit_message_area_set_contents (GEDIT_MESSAGE_AREA (area),
- contents);
-#else
GtkWidget *content_area;
content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (area));
gtk_container_add (GTK_CONTAINER (content_area), contents);
-#endif
}
-#if GTK_CHECK_VERSION (2, 17, 1)
static void
-info_bar_add_stock_button_with_text (GtkInfoBar *infobar,
+info_bar_add_stock_button_with_text (GtkInfoBar *info_bar,
const gchar *text,
const gchar *stock_id,
gint response_id)
@@ -114,17 +102,16 @@ info_bar_add_stock_button_with_text (GtkInfoBar *infobar,
GtkWidget *button;
GtkWidget *image;
- button = gtk_info_bar_add_button (infobar, text, response_id);
+ button = gtk_info_bar_add_button (info_bar, text, response_id);
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), image);
}
-#endif
static void
-set_message_area_text_and_icon (GtkWidget *message_area,
- const gchar *icon_stock_id,
- const gchar *primary_text,
- const gchar *secondary_text)
+set_info_bar_text_and_icon (GtkWidget *info_bar,
+ const gchar *icon_stock_id,
+ const gchar *primary_text,
+ const gchar *secondary_text)
{
GtkWidget *hbox_content;
GtkWidget *image;
@@ -168,49 +155,36 @@ set_message_area_text_and_icon (GtkWidget *message_area,
}
gtk_widget_show_all (hbox_content);
- set_contents (message_area, hbox_content);
+ set_contents (info_bar, hbox_content);
}
static GtkWidget *
-create_io_loading_error_message_area (const gchar *primary_text,
- const gchar *secondary_text,
- gboolean recoverable_error)
+create_io_loading_error_info_bar (const gchar *primary_text,
+ const gchar *secondary_text,
+ gboolean recoverable_error)
{
- GtkWidget *message_area;
+ GtkWidget *info_bar;
-#if !GTK_CHECK_VERSION (2, 17, 1)
- message_area = gedit_message_area_new_with_buttons (
+ info_bar = gtk_info_bar_new_with_buttons (
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
NULL);
-#else
- message_area = gtk_info_bar_new_with_buttons (
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- NULL);
- gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_ERROR);
-#endif
- set_message_area_text_and_icon (message_area,
+ set_info_bar_text_and_icon (info_bar,
"gtk-dialog-error",
primary_text,
secondary_text);
if (recoverable_error)
{
-#if !GTK_CHECK_VERSION (2, 17, 1)
- gedit_message_area_add_stock_button_with_text (GEDIT_MESSAGE_AREA (message_area),
- _("_Retry"),
- GTK_STOCK_REFRESH,
- GTK_RESPONSE_OK);
-#else
- info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area),
+ info_bar_add_stock_button_with_text (GTK_INFO_BAR (info_bar),
_("_Retry"),
GTK_STOCK_REFRESH,
GTK_RESPONSE_OK);
-#endif
}
- return message_area;
+ return info_bar;
}
static gboolean
@@ -410,7 +384,7 @@ parse_error (const GError *error,
}
GtkWidget *
-gedit_unrecoverable_reverting_error_message_area_new (GFile *location,
+gedit_unrecoverable_reverting_error_info_bar_new (GFile *location,
const GError *error)
{
gchar *error_message = NULL;
@@ -418,7 +392,7 @@ gedit_unrecoverable_reverting_error_message_area_new (GFile *location,
gchar *full_formatted_uri;
gchar *uri_for_display;
gchar *temp_uri_for_display;
- GtkWidget *message_area;
+ GtkWidget *info_bar;
g_return_val_if_fail (G_IS_FILE (location), NULL);
g_return_val_if_fail (error != NULL, NULL);
@@ -454,19 +428,19 @@ gedit_unrecoverable_reverting_error_message_area_new (GFile *location,
uri_for_display);
}
- message_area = create_io_loading_error_message_area (error_message,
- message_details,
- FALSE);
+ info_bar = create_io_loading_error_info_bar (error_message,
+ message_details,
+ FALSE);
g_free (uri_for_display);
g_free (error_message);
g_free (message_details);
- return message_area;
+ return info_bar;
}
static void
-create_combo_box (GtkWidget *message_area,
+create_combo_box (GtkWidget *info_bar,
GtkWidget *vbox)
{
GtkWidget *hbox;
@@ -482,8 +456,8 @@ create_combo_box (GtkWidget *message_area,
g_free (label_markup);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
menu = gedit_encodings_combo_box_new (TRUE);
- g_object_set_data (G_OBJECT (message_area),
- "gedit-message-area-encoding-menu",
+ g_object_set_data (G_OBJECT (info_bar),
+ "gedit-info-bar-encoding-menu",
menu);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), menu);
@@ -504,11 +478,11 @@ create_combo_box (GtkWidget *message_area,
}
static GtkWidget *
-create_conversion_error_message_area (const gchar *primary_text,
- const gchar *secondary_text,
- gboolean edit_anyway)
+create_conversion_error_info_bar (const gchar *primary_text,
+ const gchar *secondary_text,
+ gboolean edit_anyway)
{
- GtkWidget *message_area;
+ GtkWidget *info_bar;
GtkWidget *hbox_content;
GtkWidget *image;
GtkWidget *vbox;
@@ -517,61 +491,36 @@ create_conversion_error_message_area (const gchar *primary_text,
GtkWidget *primary_label;
GtkWidget *secondary_label;
-#if !GTK_CHECK_VERSION (2, 17, 1)
- message_area = gedit_message_area_new ();
-
- gedit_message_area_add_stock_button_with_text (GEDIT_MESSAGE_AREA (message_area),
- _("_Retry"),
- GTK_STOCK_REDO,
- GTK_RESPONSE_OK);
-
- if (edit_anyway)
- {
- gedit_message_area_add_button (GEDIT_MESSAGE_AREA (message_area),
- _("Edit Any_way"),
- GTK_RESPONSE_YES);
- gedit_message_area_add_button (GEDIT_MESSAGE_AREA (message_area),
- _("D_on't Edit"),
- GTK_RESPONSE_NO);
- }
- else
- {
- gedit_message_area_add_button (GEDIT_MESSAGE_AREA (message_area),
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL);
- }
-#else
- message_area = gtk_info_bar_new ();
+ info_bar = gtk_info_bar_new ();
- info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area),
+ info_bar_add_stock_button_with_text (GTK_INFO_BAR (info_bar),
_("_Retry"),
GTK_STOCK_REDO,
GTK_RESPONSE_OK);
if (edit_anyway)
{
- gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
+ gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
/* Translators: the access key chosen for this string should be
different from other main menu access keys (Open, Edit, View...) */
_("Edit Any_way"),
GTK_RESPONSE_YES);
- gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
+ gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
/* Translators: the access key chosen for this string should be
different from other main menu access keys (Open, Edit, View...) */
_("D_on't Edit"),
GTK_RESPONSE_NO);
- gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_WARNING);
}
else
{
- gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
+ gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
- gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_ERROR);
}
-#endif
hbox_content = gtk_hbox_new (FALSE, 8);
@@ -606,17 +555,17 @@ create_conversion_error_message_area (const gchar *primary_text,
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
}
- create_combo_box (message_area, vbox);
+ create_combo_box (info_bar, vbox);
gtk_widget_show_all (hbox_content);
- set_contents (message_area, hbox_content);
+ set_contents (info_bar, hbox_content);
- return message_area;
+ return info_bar;
}
GtkWidget *
-gedit_io_loading_error_message_area_new (GFile *location,
- const GeditEncoding *encoding,
- const GError *error)
+gedit_io_loading_error_info_bar_new (GFile *location,
+ const GeditEncoding *encoding,
+ const GError *error)
{
gchar *error_message = NULL;
gchar *message_details = NULL;
@@ -624,7 +573,7 @@ gedit_io_loading_error_message_area_new (GFile *location,
gchar *encoding_name;
gchar *uri_for_display;
gchar *temp_uri_for_display;
- GtkWidget *message_area;
+ GtkWidget *info_bar;
gboolean edit_anyway = FALSE;
gboolean convert_error = FALSE;
@@ -711,15 +660,15 @@ gedit_io_loading_error_message_area_new (GFile *location,
if (convert_error)
{
- message_area = create_conversion_error_message_area (error_message,
- message_details,
- edit_anyway);
+ info_bar = create_conversion_error_info_bar (error_message,
+ message_details,
+ edit_anyway);
}
else
{
- message_area = create_io_loading_error_message_area (error_message,
- message_details,
- is_recoverable_error (error));
+ info_bar = create_io_loading_error_info_bar (error_message,
+ message_details,
+ is_recoverable_error (error));
}
g_free (uri_for_display);
@@ -727,13 +676,13 @@ gedit_io_loading_error_message_area_new (GFile *location,
g_free (error_message);
g_free (message_details);
- return message_area;
+ return info_bar;
}
GtkWidget *
-gedit_conversion_error_while_saving_message_area_new (GFile *location,
- const GeditEncoding *encoding,
- const GError *error)
+gedit_conversion_error_while_saving_info_bar_new (GFile *location,
+ const GeditEncoding *encoding,
+ const GError *error)
{
gchar *error_message = NULL;
gchar *message_details = NULL;
@@ -741,7 +690,7 @@ gedit_conversion_error_while_saving_message_area_new (GFile *locat
gchar *encoding_name;
gchar *uri_for_display;
gchar *temp_uri_for_display;
- GtkWidget *message_area;
+ GtkWidget *info_bar;
g_return_val_if_fail (G_IS_FILE (location), NULL);
g_return_val_if_fail (error != NULL, NULL);
@@ -771,32 +720,27 @@ gedit_conversion_error_while_saving_message_area_new (GFile *locat
"using the specified character encoding."), "\n",
_("Select a different character encoding from the menu and try again."), NULL);
- message_area = create_conversion_error_message_area (
- error_message,
- message_details,
- FALSE);
+ info_bar = create_conversion_error_info_bar (error_message,
+ message_details,
+ FALSE);
g_free (uri_for_display);
g_free (encoding_name);
g_free (error_message);
g_free (message_details);
- return message_area;
+ return info_bar;
}
const GeditEncoding *
-gedit_conversion_error_message_area_get_encoding (GtkWidget *message_area)
+gedit_conversion_error_info_bar_get_encoding (GtkWidget *info_bar)
{
gpointer menu;
-#if !GTK_CHECK_VERSION (2, 17, 1)
- g_return_val_if_fail (GEDIT_IS_MESSAGE_AREA (message_area), NULL);
-#else
- g_return_val_if_fail (GTK_IS_INFO_BAR (message_area), NULL);
-#endif
+ g_return_val_if_fail (GTK_IS_INFO_BAR (info_bar), NULL);
- menu = g_object_get_data (G_OBJECT (message_area),
- "gedit-message-area-encoding-menu");
+ menu = g_object_get_data (G_OBJECT (info_bar),
+ "gedit-info-bar-encoding-menu");
g_return_val_if_fail (menu, NULL);
return gedit_encodings_combo_box_get_selected_encoding
@@ -804,9 +748,9 @@ gedit_conversion_error_message_area_get_encoding (GtkWidget *message_area)
}
GtkWidget *
-gedit_file_already_open_warning_message_area_new (GFile *location)
+gedit_file_already_open_warning_info_bar_new (GFile *location)
{
- GtkWidget *message_area;
+ GtkWidget *info_bar;
GtkWidget *hbox_content;
GtkWidget *image;
GtkWidget *vbox;
@@ -835,29 +779,19 @@ gedit_file_already_open_warning_message_area_new (GFile *location)
uri_for_display = g_markup_printf_escaped ("<i>%s</i>", temp_uri_for_display);
g_free (temp_uri_for_display);
-#if !GTK_CHECK_VERSION (2, 17, 1)
- message_area = gedit_message_area_new ();
- gedit_message_area_add_button (GEDIT_MESSAGE_AREA (message_area),
- _("Edit Any_way"),
- GTK_RESPONSE_YES);
- gedit_message_area_add_button (GEDIT_MESSAGE_AREA (message_area),
- _("D_on't Edit"),
- GTK_RESPONSE_CANCEL);
-#else
- message_area = gtk_info_bar_new ();
- gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
+ info_bar = gtk_info_bar_new ();
+ gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
/* Translators: the access key chosen for this string should be
different from other main menu access keys (Open, Edit, View...) */
_("Edit Any_way"),
GTK_RESPONSE_YES);
- gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
+ gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
/* Translators: the access key chosen for this string should be
different from other main menu access keys (Open, Edit, View...) */
_("D_on't Edit"),
GTK_RESPONSE_CANCEL);
- gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_WARNING);
-#endif
hbox_content = gtk_hbox_new (FALSE, 8);
@@ -896,16 +830,16 @@ gedit_file_already_open_warning_message_area_new (GFile *location)
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
gtk_widget_show_all (hbox_content);
- set_contents (message_area, hbox_content);
+ set_contents (info_bar, hbox_content);
- return message_area;
+ return info_bar;
}
GtkWidget *
-gedit_externally_modified_saving_error_message_area_new (GFile *location,
- const GError *error)
+gedit_externally_modified_saving_error_info_bar_new (GFile *location,
+ const GError *error)
{
- GtkWidget *message_area;
+ GtkWidget *info_bar;
GtkWidget *hbox_content;
GtkWidget *image;
GtkWidget *vbox;
@@ -937,28 +871,17 @@ gedit_externally_modified_saving_error_message_area_new (GFile *location,
uri_for_display = g_markup_printf_escaped ("<i>%s</i>", temp_uri_for_display);
g_free (temp_uri_for_display);
-#if !GTK_CHECK_VERSION (2, 17, 1)
- message_area = gedit_message_area_new ();
- gedit_message_area_add_stock_button_with_text (GEDIT_MESSAGE_AREA (message_area),
- _("S_ave Anyway"),
- GTK_STOCK_SAVE,
- GTK_RESPONSE_YES);
- gedit_message_area_add_button (GEDIT_MESSAGE_AREA (message_area),
- _("D_on't Save"),
- GTK_RESPONSE_CANCEL);
-#else
- message_area = gtk_info_bar_new ();
+ info_bar = gtk_info_bar_new ();
- info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area),
+ info_bar_add_stock_button_with_text (GTK_INFO_BAR (info_bar),
_("S_ave Anyway"),
GTK_STOCK_SAVE,
GTK_RESPONSE_YES);
- gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
+ gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
_("D_on't Save"),
GTK_RESPONSE_CANCEL);
- gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_WARNING);
-#endif
hbox_content = gtk_hbox_new (FALSE, 8);
@@ -969,9 +892,10 @@ gedit_externally_modified_saving_error_message_area_new (GFile *location,
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
- // FIXME: review this message, it's not clear since for the user the "modification"
- // could be interpreted as the changes he made in the document. beside "reading" is
- // not accurate (since last load/save)
+ /* FIXME: review this message, it's not clear since for the user the "modification"
+ * could be interpreted as the changes he made in the document. beside "reading" is
+ * not accurate (since last load/save)
+ */
primary_text = g_strdup_printf (_("The file %s has been modified since reading it."),
uri_for_display);
g_free (uri_for_display);
@@ -1000,16 +924,16 @@ gedit_externally_modified_saving_error_message_area_new (GFile *location,
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
gtk_widget_show_all (hbox_content);
- set_contents (message_area, hbox_content);
+ set_contents (info_bar, hbox_content);
- return message_area;
+ return info_bar;
}
GtkWidget *
-gedit_no_backup_saving_error_message_area_new (GFile *location,
- const GError *error)
+gedit_no_backup_saving_error_info_bar_new (GFile *location,
+ const GError *error)
{
- GtkWidget *message_area;
+ GtkWidget *info_bar;
GtkWidget *hbox_content;
GtkWidget *image;
GtkWidget *vbox;
@@ -1045,28 +969,17 @@ gedit_no_backup_saving_error_message_area_new (GFile *location,
uri_for_display = g_markup_printf_escaped ("<i>%s</i>", temp_uri_for_display);
g_free (temp_uri_for_display);
-#if !GTK_CHECK_VERSION (2, 17, 1)
- message_area = gedit_message_area_new ();
- gedit_message_area_add_stock_button_with_text (GEDIT_MESSAGE_AREA (message_area),
- _("S_ave Anyway"),
- GTK_STOCK_SAVE,
- GTK_RESPONSE_YES);
- gedit_message_area_add_button (GEDIT_MESSAGE_AREA (message_area),
- _("D_on't Save"),
- GTK_RESPONSE_CANCEL);
-#else
- message_area = gtk_info_bar_new ();
+ info_bar = gtk_info_bar_new ();
- info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area),
+ info_bar_add_stock_button_with_text (GTK_INFO_BAR (info_bar),
_("S_ave Anyway"),
GTK_STOCK_SAVE,
GTK_RESPONSE_YES);
- gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
+ gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
_("D_on't Save"),
GTK_RESPONSE_CANCEL);
- gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_WARNING);
-#endif
hbox_content = gtk_hbox_new (FALSE, 8);
@@ -1123,14 +1036,14 @@ gedit_no_backup_saving_error_message_area_new (GFile *location,
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
gtk_widget_show_all (hbox_content);
- set_contents (message_area, hbox_content);
+ set_contents (info_bar, hbox_content);
- return message_area;
+ return info_bar;
}
GtkWidget *
-gedit_unrecoverable_saving_error_message_area_new (GFile *location,
- const GError *error)
+gedit_unrecoverable_saving_error_info_bar_new (GFile *location,
+ const GError *error)
{
gchar *error_message = NULL;
gchar *message_details = NULL;
@@ -1139,7 +1052,7 @@ gedit_unrecoverable_saving_error_message_area_new (GFile *location,
gchar *scheme_markup;
gchar *uri_for_display;
gchar *temp_uri_for_display;
- GtkWidget *message_area;
+ GtkWidget *info_bar;
g_return_val_if_fail (G_IS_FILE (location), NULL);
g_return_val_if_fail (error != NULL, NULL);
@@ -1240,27 +1153,27 @@ gedit_unrecoverable_saving_error_message_area_new (GFile *location,
uri_for_display);
}
- message_area = create_io_loading_error_message_area (error_message,
- message_details,
- FALSE);
+ info_bar = create_io_loading_error_info_bar (error_message,
+ message_details,
+ FALSE);
g_free (uri_for_display);
g_free (error_message);
g_free (message_details);
- return message_area;
+ return info_bar;
}
GtkWidget *
-gedit_externally_modified_message_area_new (GFile *location,
- gboolean document_modified)
+gedit_externally_modified_info_bar_new (GFile *location,
+ gboolean document_modified)
{
gchar *full_formatted_uri;
gchar *uri_for_display;
gchar *temp_uri_for_display;
const gchar *primary_text;
const gchar *secondary_text;
- GtkWidget *message_area;
+ GtkWidget *info_bar;
g_return_val_if_fail (G_IS_FILE (location), NULL);
@@ -1290,37 +1203,24 @@ gedit_externally_modified_message_area_new (GFile *location,
else
secondary_text = _("Do you want to reload the file?");
-#if !GTK_CHECK_VERSION (2, 17, 1)
- message_area = gedit_message_area_new ();
+ info_bar = gtk_info_bar_new ();
- gedit_message_area_add_stock_button_with_text (GEDIT_MESSAGE_AREA (message_area),
- _("_Reload"),
- GTK_STOCK_REFRESH,
- GTK_RESPONSE_OK);
-
- gedit_message_area_add_button (GEDIT_MESSAGE_AREA (message_area),
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL);
-#else
- message_area = gtk_info_bar_new ();
-
- info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area),
+ info_bar_add_stock_button_with_text (GTK_INFO_BAR (info_bar),
_("_Reload"),
GTK_STOCK_REFRESH,
GTK_RESPONSE_OK);
- gtk_info_bar_add_button (GTK_INFO_BAR (message_area),
+ gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
- gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area),
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_WARNING);
-#endif
- set_message_area_text_and_icon (message_area,
+ set_info_bar_text_and_icon (info_bar,
"gtk-dialog-warning",
primary_text,
secondary_text);
- return message_area;
+ return info_bar;
}
/* ex:ts=8:noet: */
diff --git a/gedit/gedit-io-error-info-bar.h b/gedit/gedit-io-error-info-bar.h
new file mode 100644
index 0000000..b0a13b8
--- /dev/null
+++ b/gedit/gedit-io-error-info-bar.h
@@ -0,0 +1,70 @@
+/*
+ * gedit-io-error-info-bar.h
+ * This file is part of gedit
+ *
+ * Copyright (C) 2005 - Paolo Maggi
+ *
+ * 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 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the gedit Team, 2005. See the AUTHORS file for a
+ * list of people on the gedit Team.
+ * See the ChangeLog files for a list of changes.
+ *
+ * $Id$
+ */
+
+#ifndef __GEDIT_IO_ERROR_INFO_BAR_H__
+#define __GEDIT_IO_ERROR_INFO_BAR_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+GtkWidget *gedit_io_loading_error_info_bar_new (GFile *location,
+ const GeditEncoding *encoding,
+ const GError *error);
+
+GtkWidget *gedit_unrecoverable_reverting_error_info_bar_new (GFile *location,
+ const GError *error);
+
+GtkWidget *gedit_conversion_error_while_saving_info_bar_new (GFile *location,
+ const GeditEncoding *encoding,
+ const GError *error);
+
+const GeditEncoding
+ *gedit_conversion_error_info_bar_get_encoding (GtkWidget *info_bar);
+
+GtkWidget *gedit_file_already_open_warning_info_bar_new (GFile *location);
+
+GtkWidget *gedit_externally_modified_saving_error_info_bar_new (GFile *location,
+ const GError *error);
+
+GtkWidget *gedit_no_backup_saving_error_info_bar_new (GFile *location,
+ const GError *error);
+
+GtkWidget *gedit_unrecoverable_saving_error_info_bar_new (GFile *location,
+ const GError *error);
+
+GtkWidget *gedit_externally_modified_info_bar_new (GFile *location,
+ gboolean document_modified);
+
+G_END_DECLS
+
+#endif /* __GEDIT_IO_ERROR_INFO_BAR_H__ */
+
+/* ex:ts=8:noet: */
diff --git a/gedit/gedit-progress-info-bar.c b/gedit/gedit-progress-info-bar.c
new file mode 100644
index 0000000..b22f1a8
--- /dev/null
+++ b/gedit/gedit-progress-info-bar.c
@@ -0,0 +1,244 @@
+/*
+ * gedit-progress-info-bar.c
+ * This file is part of gedit
+ *
+ * Copyright (C) 2005 - Paolo Maggi
+ *
+ * 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 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the gedit Team, 2005. See the AUTHORS file for a
+ * list of people on the gedit Team.
+ * See the ChangeLog files for a list of changes.
+ *
+ * $Id$
+ */
+
+ /* TODO: add properties */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+
+#include "gedit-progress-info-bar.h"
+
+enum {
+ PROP_0,
+ PROP_HAS_CANCEL_BUTTON
+};
+
+
+#define GEDIT_PROGRESS_INFO_BAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GEDIT_TYPE_PROGRESS_INFO_BAR, GeditProgressInfoBarPrivate))
+
+struct _GeditProgressInfoBarPrivate
+{
+ GtkWidget *image;
+ GtkWidget *label;
+ GtkWidget *progress;
+};
+
+G_DEFINE_TYPE(GeditProgressInfoBar, gedit_progress_info_bar, GTK_TYPE_INFO_BAR)
+
+static void
+gedit_progress_info_bar_set_has_cancel_button (GeditProgressInfoBar *bar,
+ gboolean has_button)
+{
+ if (has_button)
+ gtk_info_bar_add_button (GTK_INFO_BAR (bar),
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL);
+
+ g_object_notify (G_OBJECT (bar), "has-cancel-button");
+}
+
+static void
+gedit_progress_info_bar_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GeditProgressInfoBar *bar;
+
+ bar = GEDIT_PROGRESS_INFO_BAR (object);
+
+ switch (prop_id)
+ {
+ case PROP_HAS_CANCEL_BUTTON:
+ gedit_progress_info_bar_set_has_cancel_button (bar,
+ g_value_get_boolean (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gedit_progress_info_bar_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GeditProgressInfoBar *bar;
+
+ bar = GEDIT_PROGRESS_INFO_BAR (object);
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gedit_progress_info_bar_class_init (GeditProgressInfoBarClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->set_property = gedit_progress_info_bar_set_property;
+ gobject_class->get_property = gedit_progress_info_bar_get_property;
+
+ g_object_class_install_property (gobject_class,
+ PROP_HAS_CANCEL_BUTTON,
+ g_param_spec_boolean ("has-cancel-button",
+ "Has Cancel Button",
+ "If the message bar has a cancel button",
+ TRUE,
+ G_PARAM_WRITABLE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
+
+ g_type_class_add_private (gobject_class, sizeof (GeditProgressInfoBarPrivate));
+}
+
+static void
+gedit_progress_info_bar_init (GeditProgressInfoBar *bar)
+{
+ GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *content;
+
+ bar->priv = GEDIT_PROGRESS_INFO_BAR_GET_PRIVATE (bar);
+
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_widget_show (vbox);
+
+ hbox = gtk_hbox_new (FALSE, 4);
+ gtk_widget_show (hbox);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+
+ bar->priv->image = gtk_image_new_from_icon_name (GTK_STOCK_MISSING_IMAGE,
+ GTK_ICON_SIZE_SMALL_TOOLBAR);
+ gtk_widget_show (bar->priv->image);
+ gtk_misc_set_alignment (GTK_MISC (bar->priv->image), 0.5, 0.5);
+ gtk_box_pack_start (GTK_BOX (hbox), bar->priv->image, FALSE, FALSE, 4);
+
+ bar->priv->label = gtk_label_new ("");
+ gtk_widget_show (bar->priv->label);
+ gtk_box_pack_start (GTK_BOX (hbox), bar->priv->label, TRUE, TRUE, 0);
+ gtk_label_set_use_markup (GTK_LABEL (bar->priv->label), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0, 0.5);
+ gtk_label_set_ellipsize (GTK_LABEL (bar->priv->label),
+ PANGO_ELLIPSIZE_END);
+
+ bar->priv->progress = gtk_progress_bar_new ();
+ gtk_widget_show (bar->priv->progress);
+ gtk_box_pack_start (GTK_BOX (vbox), bar->priv->progress, TRUE, FALSE, 0);
+ gtk_widget_set_size_request (bar->priv->progress, -1, 15);
+
+ content = gtk_info_bar_get_content_area (GTK_INFO_BAR (bar));
+ gtk_container_add (GTK_CONTAINER (content), vbox);
+}
+
+GtkWidget *
+gedit_progress_info_bar_new (const gchar *stock_id,
+ const gchar *markup,
+ gboolean has_cancel)
+{
+ GeditProgressInfoBar *bar;
+
+ g_return_val_if_fail (stock_id != NULL, NULL);
+ g_return_val_if_fail (markup != NULL, NULL);
+
+ bar = GEDIT_PROGRESS_INFO_BAR (g_object_new (GEDIT_TYPE_PROGRESS_INFO_BAR,
+ "has-cancel-button", has_cancel,
+ NULL));
+
+ gedit_progress_info_bar_set_stock_image (bar, stock_id);
+ gedit_progress_info_bar_set_markup (bar, markup);
+
+ return GTK_WIDGET (bar);
+}
+
+void
+gedit_progress_info_bar_set_stock_image (GeditProgressInfoBar *bar,
+ const gchar *stock_id)
+{
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (bar));
+ g_return_if_fail (stock_id != NULL);
+
+ gtk_image_set_from_stock (GTK_IMAGE (bar->priv->image),
+ stock_id,
+ GTK_ICON_SIZE_SMALL_TOOLBAR);
+}
+
+void
+gedit_progress_info_bar_set_markup (GeditProgressInfoBar *bar,
+ const gchar *markup)
+{
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (bar));
+ g_return_if_fail (markup != NULL);
+
+ gtk_label_set_markup (GTK_LABEL (bar->priv->label),
+ markup);
+}
+
+void
+gedit_progress_info_bar_set_text (GeditProgressInfoBar *bar,
+ const gchar *text)
+{
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (bar));
+ g_return_if_fail (text != NULL);
+
+ gtk_label_set_text (GTK_LABEL (bar->priv->label),
+ text);
+}
+
+void
+gedit_progress_info_bar_set_fraction (GeditProgressInfoBar *bar,
+ gdouble fraction)
+{
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (bar));
+
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar->priv->progress),
+ fraction);
+}
+
+void
+gedit_progress_info_bar_pulse (GeditProgressInfoBar *bar)
+{
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (bar));
+
+ gtk_progress_bar_pulse (GTK_PROGRESS_BAR (bar->priv->progress));
+}
+
+/* ex:ts=8:noet: */
diff --git a/gedit/gedit-progress-info-bar.h b/gedit/gedit-progress-info-bar.h
new file mode 100644
index 0000000..c0d4b8d
--- /dev/null
+++ b/gedit/gedit-progress-info-bar.h
@@ -0,0 +1,102 @@
+/*
+ * gedit-progress-info-bar.h
+ * This file is part of gedit
+ *
+ * Copyright (C) 2005 - Paolo Maggi
+ *
+ * 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 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the gedit Team, 2005. See the AUTHORS file for a
+ * list of people on the gedit Team.
+ * See the ChangeLog files for a list of changes.
+ *
+ * $Id$
+ */
+
+#ifndef __GEDIT_PROGRESS_INFO_BAR_H__
+#define __GEDIT_PROGRESS_INFO_BAR_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+/*
+ * Type checking and casting macros
+ */
+#define GEDIT_TYPE_PROGRESS_INFO_BAR (gedit_progress_info_bar_get_type())
+#define GEDIT_PROGRESS_INFO_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GEDIT_TYPE_PROGRESS_INFO_BAR, GeditProgressInfoBar))
+#define GEDIT_PROGRESS_INFO_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GEDIT_TYPE_PROGRESS_INFO_BAR, GeditProgressInfoBarClass))
+#define GEDIT_IS_PROGRESS_INFO_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GEDIT_TYPE_PROGRESS_INFO_BAR))
+#define GEDIT_IS_PROGRESS_INFO_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_PROGRESS_INFO_BAR))
+#define GEDIT_PROGRESS_INFO_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GEDIT_TYPE_PROGRESS_INFO_BAR, GeditProgressInfoBarClass))
+
+/* Private structure type */
+typedef struct _GeditProgressInfoBarPrivate GeditProgressInfoBarPrivate;
+
+/*
+ * Main object structure
+ */
+typedef struct _GeditProgressInfoBar GeditProgressInfoBar;
+
+struct _GeditProgressInfoBar
+{
+ GtkInfoBar parent;
+
+ /*< private > */
+ GeditProgressInfoBarPrivate *priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _GeditProgressInfoBarClass GeditProgressInfoBarClass;
+
+struct _GeditProgressInfoBarClass
+{
+ GtkInfoBarClass parent_class;
+};
+
+/*
+ * Public methods
+ */
+GType gedit_progress_info_bar_get_type (void) G_GNUC_CONST;
+
+GtkWidget *gedit_progress_info_bar_new (const gchar *stock_id,
+ const gchar *markup,
+ gboolean has_cancel);
+
+void gedit_progress_info_bar_set_stock_image (GeditProgressInfoBar *bar,
+ const gchar *stock_id);
+
+void gedit_progress_info_bar_set_markup (GeditProgressInfoBar *bar,
+ const gchar *markup);
+
+void gedit_progress_info_bar_set_text (GeditProgressInfoBar *bar,
+ const gchar *text);
+
+void gedit_progress_info_bar_set_fraction (GeditProgressInfoBar *bar,
+ gdouble fraction);
+
+void gedit_progress_info_bar_pulse (GeditProgressInfoBar *bar);
+
+
+G_END_DECLS
+
+#endif /* __GEDIT_PROGRESS_INFO_BAR_H__ */
+
+/* ex:ts=8:noet: */
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 3881da7..7e6c9dd 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -37,10 +37,10 @@
#include "gedit-notebook.h"
#include "gedit-tab.h"
#include "gedit-utils.h"
-#include "gedit-io-error-message-area.h"
+#include "gedit-io-error-info-bar.h"
#include "gedit-print-job.h"
#include "gedit-print-preview.h"
-#include "gedit-progress-message-area.h"
+#include "gedit-progress-info-bar.h"
#include "gedit-debug.h"
#include "gedit-enum-types.h"
#include "gedit-settings.h"
@@ -57,7 +57,7 @@ struct _GeditTabPrivate
GtkWidget *view;
GtkWidget *view_scrolled_window;
- GtkWidget *message_area;
+ GtkWidget *info_bar;
GtkWidget *print_preview;
GeditPrintJob *print_job;
@@ -263,9 +263,9 @@ gedit_tab_grab_focus (GtkWidget *widget)
GTK_WIDGET_CLASS (gedit_tab_parent_class)->grab_focus (widget);
- if (tab->priv->message_area != NULL)
+ if (tab->priv->info_bar != NULL)
{
- gtk_widget_grab_focus (tab->priv->message_area);
+ gtk_widget_grab_focus (tab->priv->info_bar);
}
else
{
@@ -482,28 +482,28 @@ document_modified_changed (GtkTextBuffer *document,
}
static void
-set_message_area (GeditTab *tab,
- GtkWidget *message_area)
+set_info_bar (GeditTab *tab,
+ GtkWidget *info_bar)
{
- if (tab->priv->message_area == message_area)
+ if (tab->priv->info_bar == info_bar)
return;
- if (tab->priv->message_area != NULL)
- gtk_widget_destroy (tab->priv->message_area);
+ if (tab->priv->info_bar != NULL)
+ gtk_widget_destroy (tab->priv->info_bar);
- tab->priv->message_area = message_area;
+ tab->priv->info_bar = info_bar;
- if (message_area == NULL)
+ if (info_bar == NULL)
return;
gtk_box_pack_start (GTK_BOX (tab),
- tab->priv->message_area,
+ tab->priv->info_bar,
FALSE,
FALSE,
0);
- g_object_add_weak_pointer (G_OBJECT (tab->priv->message_area),
- (gpointer *)&tab->priv->message_area);
+ g_object_add_weak_pointer (G_OBJECT (tab->priv->info_bar),
+ (gpointer *)&tab->priv->info_bar);
}
static void
@@ -517,9 +517,9 @@ remove_tab (GeditTab *tab)
}
static void
-io_loading_error_message_area_response (GtkWidget *message_area,
- gint response_id,
- GeditTab *tab)
+io_loading_error_info_bar_response (GtkWidget *info_bar,
+ gint response_id,
+ GeditTab *tab)
{
GeditDocument *doc;
GeditView *view;
@@ -539,15 +539,15 @@ io_loading_error_message_area_response (GtkWidget *message_area,
case GTK_RESPONSE_OK:
g_return_if_fail (location != NULL);
- encoding = gedit_conversion_error_message_area_get_encoding (
- GTK_WIDGET (message_area));
+ encoding = gedit_conversion_error_info_bar_get_encoding (
+ GTK_WIDGET (info_bar));
if (encoding != NULL)
{
tab->priv->tmp_encoding = encoding;
}
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
gedit_tab_set_state (tab, GEDIT_TAB_STATE_LOADING);
g_return_if_fail (tab->priv->auto_save_timeout <= 0);
@@ -561,12 +561,12 @@ io_loading_error_message_area_response (GtkWidget *message_area,
break;
case GTK_RESPONSE_YES:
/* This means that we want to edit the document anyway */
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
_gedit_document_set_readonly (doc, FALSE);
break;
case GTK_RESPONSE_NO:
/* We don't want to edit the document just show it */
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
break;
default:
if (location != NULL)
@@ -585,9 +585,9 @@ io_loading_error_message_area_response (GtkWidget *message_area,
}
static void
-file_already_open_warning_message_area_response (GtkWidget *message_area,
- gint response_id,
- GeditTab *tab)
+file_already_open_warning_info_bar_response (GtkWidget *info_bar,
+ gint response_id,
+ GeditTab *tab)
{
GeditView *view;
@@ -601,17 +601,17 @@ file_already_open_warning_message_area_response (GtkWidget *message_area,
TRUE);
}
- gtk_widget_destroy (message_area);
+ gtk_widget_destroy (info_bar);
gtk_widget_grab_focus (GTK_WIDGET (view));
}
static void
-load_cancelled (GtkWidget *area,
+load_cancelled (GtkWidget *bar,
gint response_id,
GeditTab *tab)
{
- g_return_if_fail (GEDIT_IS_PROGRESS_MESSAGE_AREA (tab->priv->message_area));
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (tab->priv->info_bar));
g_object_ref (tab);
gedit_document_load_cancel (gedit_tab_get_document (tab));
@@ -619,16 +619,16 @@ load_cancelled (GtkWidget *area,
}
static void
-unrecoverable_reverting_error_message_area_response (GtkWidget *message_area,
- gint response_id,
- GeditTab *tab)
+unrecoverable_reverting_error_info_bar_response (GtkWidget *info_bar,
+ gint response_id,
+ GeditTab *tab)
{
GeditView *view;
gedit_tab_set_state (tab,
GEDIT_TAB_STATE_NORMAL);
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
view = gedit_tab_get_view (tab);
@@ -640,9 +640,9 @@ unrecoverable_reverting_error_message_area_response (GtkWidget *message_a
#define MAX_MSG_LENGTH 100
static void
-show_loading_message_area (GeditTab *tab)
+show_loading_info_bar (GeditTab *tab)
{
- GtkWidget *area;
+ GtkWidget *bar;
GeditDocument *doc = NULL;
gchar *name;
gchar *dirname = NULL;
@@ -651,7 +651,7 @@ show_loading_message_area (GeditTab *tab)
gchar *dirname_markup;
gint len;
- if (tab->priv->message_area != NULL)
+ if (tab->priv->info_bar != NULL)
return;
gedit_debug (DEBUG_TAB);
@@ -718,9 +718,9 @@ show_loading_message_area (GeditTab *tab)
name_markup);
}
- area = gedit_progress_message_area_new (GTK_STOCK_REVERT_TO_SAVED,
- msg,
- TRUE);
+ bar = gedit_progress_info_bar_new (GTK_STOCK_REVERT_TO_SAVED,
+ msg,
+ TRUE);
}
else
{
@@ -741,19 +741,19 @@ show_loading_message_area (GeditTab *tab)
name_markup);
}
- area = gedit_progress_message_area_new (GTK_STOCK_OPEN,
- msg,
- TRUE);
+ bar = gedit_progress_info_bar_new (GTK_STOCK_OPEN,
+ msg,
+ TRUE);
}
- g_signal_connect (area,
+ g_signal_connect (bar,
"response",
G_CALLBACK (load_cancelled),
tab);
- gtk_widget_show (area);
+ gtk_widget_show (bar);
- set_message_area (tab, area);
+ set_info_bar (tab, bar);
g_free (msg);
g_free (name);
@@ -762,9 +762,9 @@ show_loading_message_area (GeditTab *tab)
}
static void
-show_saving_message_area (GeditTab *tab)
+show_saving_info_bar (GeditTab *tab)
{
- GtkWidget *area;
+ GtkWidget *bar;
GeditDocument *doc = NULL;
gchar *short_name;
gchar *from;
@@ -776,7 +776,7 @@ show_saving_message_area (GeditTab *tab)
g_return_if_fail (tab->priv->tmp_save_location != NULL);
- if (tab->priv->message_area != NULL)
+ if (tab->priv->info_bar != NULL)
return;
gedit_debug (DEBUG_TAB);
@@ -830,13 +830,13 @@ show_saving_message_area (GeditTab *tab)
msg = g_strdup_printf (_("Saving %s"), from_markup);
}
- area = gedit_progress_message_area_new (GTK_STOCK_SAVE,
- msg,
- FALSE);
+ bar = gedit_progress_info_bar_new (GTK_STOCK_SAVE,
+ msg,
+ FALSE);
- gtk_widget_show (area);
+ gtk_widget_show (bar);
- set_message_area (tab, area);
+ set_info_bar (tab, bar);
g_free (msg);
g_free (to);
@@ -845,25 +845,25 @@ show_saving_message_area (GeditTab *tab)
}
static void
-message_area_set_progress (GeditTab *tab,
+info_bar_set_progress (GeditTab *tab,
goffset size,
goffset total_size)
{
- if (tab->priv->message_area == NULL)
+ if (tab->priv->info_bar == NULL)
return;
gedit_debug_message (DEBUG_TAB, "%" G_GUINT64_FORMAT "/%" G_GUINT64_FORMAT, size, total_size);
- g_return_if_fail (GEDIT_IS_PROGRESS_MESSAGE_AREA (tab->priv->message_area));
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (tab->priv->info_bar));
if (total_size == 0)
{
if (size != 0)
- gedit_progress_message_area_pulse (
- GEDIT_PROGRESS_MESSAGE_AREA (tab->priv->message_area));
+ gedit_progress_info_bar_pulse (
+ GEDIT_PROGRESS_INFO_BAR (tab->priv->info_bar));
else
- gedit_progress_message_area_set_fraction (
- GEDIT_PROGRESS_MESSAGE_AREA (tab->priv->message_area),
+ gedit_progress_info_bar_set_fraction (
+ GEDIT_PROGRESS_INFO_BAR (tab->priv->info_bar),
0);
}
else
@@ -872,8 +872,8 @@ message_area_set_progress (GeditTab *tab,
frac = (gdouble)size / (gdouble)total_size;
- gedit_progress_message_area_set_fraction (
- GEDIT_PROGRESS_MESSAGE_AREA (tab->priv->message_area),
+ gedit_progress_info_bar_set_fraction (
+ GEDIT_PROGRESS_INFO_BAR (tab->priv->info_bar),
frac);
}
}
@@ -905,10 +905,10 @@ document_loading (GeditDocument *document,
if ((total_time - et) > 3.0)
{
- show_loading_message_area (tab);
+ show_loading_info_bar (tab);
}
- message_area_set_progress (tab, size, total_size);
+ info_bar_set_progress (tab, size, total_size);
}
static gboolean
@@ -939,7 +939,7 @@ document_loaded (GeditDocument *document,
}
tab->priv->times_called = 0;
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
location = gedit_document_get_location (document);
@@ -974,28 +974,28 @@ document_loaded (GeditDocument *document,
if (tab->priv->state == GEDIT_TAB_STATE_LOADING_ERROR)
{
- emsg = gedit_io_loading_error_message_area_new (location,
+ emsg = gedit_io_loading_error_info_bar_new (location,
tab->priv->tmp_encoding,
error);
g_signal_connect (emsg,
"response",
- G_CALLBACK (io_loading_error_message_area_response),
+ G_CALLBACK (io_loading_error_info_bar_response),
tab);
}
else
{
g_return_if_fail (tab->priv->state == GEDIT_TAB_STATE_REVERTING_ERROR);
- emsg = gedit_unrecoverable_reverting_error_message_area_new (location,
+ emsg = gedit_unrecoverable_reverting_error_info_bar_new (location,
error);
g_signal_connect (emsg,
"response",
- G_CALLBACK (unrecoverable_reverting_error_message_area_response),
+ G_CALLBACK (unrecoverable_reverting_error_info_bar_response),
tab);
}
- set_message_area (tab, emsg);
+ set_info_bar (tab, emsg);
}
gtk_info_bar_set_default_response (GTK_INFO_BAR (emsg),
@@ -1034,15 +1034,15 @@ document_loaded (GeditDocument *document,
_gedit_document_set_readonly (document, TRUE);
- emsg = gedit_io_loading_error_message_area_new (location,
+ emsg = gedit_io_loading_error_info_bar_new (location,
tab->priv->tmp_encoding,
error);
- set_message_area (tab, emsg);
+ set_info_bar (tab, emsg);
g_signal_connect (emsg,
"response",
- G_CALLBACK (io_loading_error_message_area_response),
+ G_CALLBACK (io_loading_error_info_bar_response),
tab);
gtk_info_bar_set_default_response (GTK_INFO_BAR (emsg),
@@ -1073,9 +1073,9 @@ document_loaded (GeditDocument *document,
tab->priv->not_editable = TRUE;
- w = gedit_file_already_open_warning_message_area_new (location);
+ w = gedit_file_already_open_warning_info_bar_new (location);
- set_message_area (tab, w);
+ set_info_bar (tab, w);
gtk_info_bar_set_default_response (GTK_INFO_BAR (w),
GTK_RESPONSE_CANCEL);
@@ -1084,7 +1084,7 @@ document_loaded (GeditDocument *document,
g_signal_connect (w,
"response",
- G_CALLBACK (file_already_open_warning_message_area_response),
+ G_CALLBACK (file_already_open_warning_info_bar_response),
tab);
g_object_unref (loc);
@@ -1149,10 +1149,10 @@ document_saving (GeditDocument *document,
if ((total_time - et) > 3.0)
{
- show_saving_message_area (tab);
+ show_saving_info_bar (tab);
}
- message_area_set_progress (tab, size, total_size);
+ info_bar_set_progress (tab, size, total_size);
tab->priv->times_called++;
}
@@ -1172,7 +1172,7 @@ end_saving (GeditTab *tab)
}
static void
-unrecoverable_saving_error_message_area_response (GtkWidget *message_area,
+unrecoverable_saving_error_info_bar_response (GtkWidget *info_bar,
gint response_id,
GeditTab *tab)
{
@@ -1185,7 +1185,7 @@ unrecoverable_saving_error_message_area_response (GtkWidget *message_area
end_saving (tab);
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
view = gedit_tab_get_view (tab);
@@ -1193,7 +1193,7 @@ unrecoverable_saving_error_message_area_response (GtkWidget *message_area
}
static void
-no_backup_error_message_area_response (GtkWidget *message_area,
+no_backup_error_info_bar_response (GtkWidget *info_bar,
gint response_id,
GeditTab *tab)
{
@@ -1204,7 +1204,7 @@ no_backup_error_message_area_response (GtkWidget *message_area,
doc = gedit_tab_get_document (tab);
g_return_if_fail (GEDIT_IS_DOCUMENT (doc));
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
g_return_if_fail (tab->priv->tmp_save_location != NULL);
g_return_if_fail (tab->priv->tmp_encoding != NULL);
@@ -1221,14 +1221,14 @@ no_backup_error_message_area_response (GtkWidget *message_area,
}
else
{
- unrecoverable_saving_error_message_area_response (message_area,
+ unrecoverable_saving_error_info_bar_response (info_bar,
response_id,
tab);
}
}
static void
-externally_modified_error_message_area_response (GtkWidget *message_area,
+externally_modified_error_info_bar_response (GtkWidget *info_bar,
gint response_id,
GeditTab *tab)
{
@@ -1239,7 +1239,7 @@ externally_modified_error_message_area_response (GtkWidget *message_area,
doc = gedit_tab_get_document (tab);
g_return_if_fail (GEDIT_IS_DOCUMENT (doc));
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
g_return_if_fail (tab->priv->tmp_save_location != NULL);
g_return_if_fail (tab->priv->tmp_encoding != NULL);
@@ -1255,14 +1255,14 @@ externally_modified_error_message_area_response (GtkWidget *message_area,
}
else
{
- unrecoverable_saving_error_message_area_response (message_area,
+ unrecoverable_saving_error_info_bar_response (info_bar,
response_id,
tab);
}
}
static void
-recoverable_saving_error_message_area_response (GtkWidget *message_area,
+recoverable_saving_error_info_bar_response (GtkWidget *info_bar,
gint response_id,
GeditTab *tab)
{
@@ -1276,12 +1276,12 @@ recoverable_saving_error_message_area_response (GtkWidget *message_area,
const GeditEncoding *encoding;
gchar *tmp_uri;
- encoding = gedit_conversion_error_message_area_get_encoding (
- GTK_WIDGET (message_area));
+ encoding = gedit_conversion_error_info_bar_get_encoding (
+ GTK_WIDGET (info_bar));
g_return_if_fail (encoding != NULL);
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
g_return_if_fail (tab->priv->tmp_save_location != NULL);
@@ -1304,7 +1304,7 @@ recoverable_saving_error_message_area_response (GtkWidget *message_area,
}
else
{
- unrecoverable_saving_error_message_area_response (message_area,
+ unrecoverable_saving_error_info_bar_response (info_bar,
response_id,
tab);
}
@@ -1327,7 +1327,7 @@ document_saved (GeditDocument *document,
tab->priv->timer = NULL;
tab->priv->times_called = 0;
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
if (error != NULL)
{
@@ -1337,16 +1337,16 @@ document_saved (GeditDocument *document,
error->code == GEDIT_DOCUMENT_ERROR_EXTERNALLY_MODIFIED)
{
/* This error is recoverable */
- emsg = gedit_externally_modified_saving_error_message_area_new (
+ emsg = gedit_externally_modified_saving_error_info_bar_new (
tab->priv->tmp_save_location,
error);
g_return_if_fail (emsg != NULL);
- set_message_area (tab, emsg);
+ set_info_bar (tab, emsg);
g_signal_connect (emsg,
"response",
- G_CALLBACK (externally_modified_error_message_area_response),
+ G_CALLBACK (externally_modified_error_info_bar_response),
tab);
}
else if ((error->domain == GEDIT_DOCUMENT_ERROR &&
@@ -1355,16 +1355,16 @@ document_saved (GeditDocument *document,
error->code == G_IO_ERROR_CANT_CREATE_BACKUP))
{
/* This error is recoverable */
- emsg = gedit_no_backup_saving_error_message_area_new (
+ emsg = gedit_no_backup_saving_error_info_bar_new (
tab->priv->tmp_save_location,
error);
g_return_if_fail (emsg != NULL);
- set_message_area (tab, emsg);
+ set_info_bar (tab, emsg);
g_signal_connect (emsg,
"response",
- G_CALLBACK (no_backup_error_message_area_response),
+ G_CALLBACK (no_backup_error_info_bar_response),
tab);
}
else if (error->domain == GEDIT_DOCUMENT_ERROR ||
@@ -1376,15 +1376,15 @@ document_saved (GeditDocument *document,
_gedit_recent_remove (GEDIT_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tab))),
tab->priv->tmp_save_location);
- emsg = gedit_unrecoverable_saving_error_message_area_new (tab->priv->tmp_save_location,
+ emsg = gedit_unrecoverable_saving_error_info_bar_new (tab->priv->tmp_save_location,
error);
g_return_if_fail (emsg != NULL);
- set_message_area (tab, emsg);
+ set_info_bar (tab, emsg);
g_signal_connect (emsg,
"response",
- G_CALLBACK (unrecoverable_saving_error_message_area_response),
+ G_CALLBACK (unrecoverable_saving_error_info_bar_response),
tab);
}
else
@@ -1393,16 +1393,16 @@ document_saved (GeditDocument *document,
g_return_if_fail (error->domain == G_CONVERT_ERROR ||
error->domain == G_IO_ERROR);
- emsg = gedit_conversion_error_while_saving_message_area_new (
+ emsg = gedit_conversion_error_while_saving_info_bar_new (
tab->priv->tmp_save_location,
tab->priv->tmp_encoding,
error);
- set_message_area (tab, emsg);
+ set_info_bar (tab, emsg);
g_signal_connect (emsg,
"response",
- G_CALLBACK (recoverable_saving_error_message_area_response),
+ G_CALLBACK (recoverable_saving_error_info_bar_response),
tab);
}
@@ -1432,13 +1432,13 @@ document_saved (GeditDocument *document,
}
static void
-externally_modified_notification_message_area_response (GtkWidget *message_area,
+externally_modified_notification_info_bar_response (GtkWidget *info_bar,
gint response_id,
GeditTab *tab)
{
GeditView *view;
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
view = gedit_tab_get_view (tab);
if (response_id == GTK_RESPONSE_OK)
@@ -1459,7 +1459,7 @@ externally_modified_notification_message_area_response (GtkWidget *message_area,
static void
display_externally_modified_notification (GeditTab *tab)
{
- GtkWidget *message_area;
+ GtkWidget *info_bar;
GeditDocument *doc;
GFile *location;
gboolean document_modified;
@@ -1472,16 +1472,16 @@ display_externally_modified_notification (GeditTab *tab)
g_return_if_fail (location != NULL);
document_modified = gtk_text_buffer_get_modified (GTK_TEXT_BUFFER(doc));
- message_area = gedit_externally_modified_message_area_new (location, document_modified);
+ info_bar = gedit_externally_modified_info_bar_new (location, document_modified);
g_object_unref (location);
- tab->priv->message_area = NULL;
- set_message_area (tab, message_area);
- gtk_widget_show (message_area);
+ tab->priv->info_bar = NULL;
+ set_info_bar (tab, info_bar);
+ gtk_widget_show (info_bar);
- g_signal_connect (message_area,
+ g_signal_connect (info_bar,
"response",
- G_CALLBACK (externally_modified_notification_message_area_response),
+ G_CALLBACK (externally_modified_notification_info_bar_response),
tab);
}
@@ -2137,7 +2137,7 @@ _gedit_tab_revert (GeditTab *tab)
if (tab->priv->state == GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION)
{
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
}
doc = gedit_tab_get_document (tab);
@@ -2184,11 +2184,11 @@ _gedit_tab_save (GeditTab *tab)
if (tab->priv->state == GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION)
{
/* We already told the user about the external
- * modification: hide the message area and set
+ * modification: hide the message bar and set
* the save flag.
*/
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
save_flags = tab->priv->save_flags | GEDIT_DOCUMENT_SAVE_IGNORE_MTIME;
}
else
@@ -2303,11 +2303,11 @@ _gedit_tab_save_as (GeditTab *tab,
if (tab->priv->state == GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION)
{
/* We already told the user about the external
- * modification: hide the message area and set
+ * modification: hide the message bar and set
* the save flag.
*/
- set_message_area (tab, NULL);
+ set_info_bar (tab, NULL);
save_flags = tab->priv->save_flags | GEDIT_DOCUMENT_SAVE_IGNORE_MTIME;
}
else
@@ -2378,20 +2378,20 @@ get_print_settings (GeditTab *tab)
}
}
-/* FIXME: show the message area only if the operation will be "long" */
+/* FIXME: show the info bar only if the operation will be "long" */
static void
printing_cb (GeditPrintJob *job,
GeditPrintJobStatus status,
GeditTab *tab)
{
- g_return_if_fail (GEDIT_IS_PROGRESS_MESSAGE_AREA (tab->priv->message_area));
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (tab->priv->info_bar));
- gtk_widget_show (tab->priv->message_area);
+ gtk_widget_show (tab->priv->info_bar);
- gedit_progress_message_area_set_text (GEDIT_PROGRESS_MESSAGE_AREA (tab->priv->message_area),
+ gedit_progress_info_bar_set_text (GEDIT_PROGRESS_INFO_BAR (tab->priv->info_bar),
gedit_print_job_get_status_string (job));
- gedit_progress_message_area_set_fraction (GEDIT_PROGRESS_MESSAGE_AREA (tab->priv->message_area),
+ gedit_progress_info_bar_set_fraction (GEDIT_PROGRESS_INFO_BAR (tab->priv->info_bar),
gedit_print_job_get_progress (job));
}
@@ -2454,9 +2454,9 @@ done_printing_cb (GeditPrintJob *job,
}
else
{
- g_return_if_fail (GEDIT_IS_PROGRESS_MESSAGE_AREA (tab->priv->message_area));
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (tab->priv->info_bar));
- set_message_area (tab, NULL); /* destroy the message area */
+ set_info_bar (tab, NULL); /* destroy the info bar */
}
/* TODO: check status and error */
@@ -2521,7 +2521,7 @@ show_preview_cb (GeditPrintJob *job,
/* g_return_if_fail (tab->priv->state == GEDIT_TAB_STATE_PRINT_PREVIEWING); */
g_return_if_fail (tab->priv->print_preview == NULL);
- set_message_area (tab, NULL); /* destroy the message area */
+ set_info_bar (tab, NULL); /* destroy the info bar */
tab->priv->print_preview = GTK_WIDGET (preview);
gtk_box_pack_end (GTK_BOX (tab),
@@ -2575,8 +2575,8 @@ preview_finished_cb (GtkSourcePrintJob *pjob, GeditTab *tab)
GnomePrintJob *gjob;
GtkWidget *preview = NULL;
- g_return_if_fail (GEDIT_IS_PROGRESS_MESSAGE_AREA (tab->priv->message_area));
- set_message_area (tab, NULL); /* destroy the message area */
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (tab->priv->info_bar));
+ set_info_bar (tab, NULL); /* destroy the info bar */
gjob = gtk_source_print_job_get_print_job (pjob);
@@ -2595,11 +2595,11 @@ preview_finished_cb (GtkSourcePrintJob *pjob, GeditTab *tab)
#endif
static void
-print_cancelled (GtkWidget *area,
+print_cancelled (GtkWidget *bar,
gint response_id,
GeditTab *tab)
{
- g_return_if_fail (GEDIT_IS_PROGRESS_MESSAGE_AREA (tab->priv->message_area));
+ g_return_if_fail (GEDIT_IS_PROGRESS_INFO_BAR (tab->priv->info_bar));
gedit_print_job_cancel (tab->priv->print_job);
@@ -2607,77 +2607,31 @@ print_cancelled (GtkWidget *area,
}
static void
-show_printing_message_area (GeditTab *tab, gboolean preview)
+show_printing_info_bar (GeditTab *tab, gboolean preview)
{
- GtkWidget *area;
+ GtkWidget *bar;
if (preview)
{
- area = gedit_progress_message_area_new (GTK_STOCK_PRINT_PREVIEW,
+ bar = gedit_progress_info_bar_new (GTK_STOCK_PRINT_PREVIEW,
"",
TRUE);
}
else
{
- area = gedit_progress_message_area_new (GTK_STOCK_PRINT,
+ bar = gedit_progress_info_bar_new (GTK_STOCK_PRINT,
"",
TRUE);
}
- g_signal_connect (area,
+ g_signal_connect (bar,
"response",
G_CALLBACK (print_cancelled),
tab);
- set_message_area (tab, area);
+ set_info_bar (tab, bar);
}
-#if !GTK_CHECK_VERSION (2, 17, 4)
-
-static void
-page_setup_done_cb (GtkPageSetup *setup,
- GeditTab *tab)
-{
- if (setup != NULL)
- {
- GeditDocument *doc;
-
- doc = gedit_tab_get_document (tab);
-
- /* remember it for this document */
- g_object_set_data_full (G_OBJECT (doc),
- GEDIT_PAGE_SETUP_KEY,
- g_object_ref (setup),
- (GDestroyNotify)g_object_unref);
-
- /* make it the default */
- _gedit_app_set_default_page_setup (gedit_app_get_default(),
- setup);
- }
-}
-
-void
-_gedit_tab_page_setup (GeditTab *tab)
-{
- GtkPageSetup *setup;
- GtkPrintSettings *settings;
-
- g_return_if_fail (GEDIT_IS_TAB (tab));
-
- setup = get_page_setup (tab);
- settings = get_print_settings (tab);
-
- gtk_print_run_page_setup_dialog_async (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tab))),
- setup,
- settings,
- (GtkPageSetupDoneFunc) page_setup_done_cb,
- tab);
-
- /* CHECK: should we unref setup and settings? */
-}
-
-#endif
-
static void
gedit_tab_print_or_print_preview (GeditTab *tab,
GtkPrintOperationAction print_action)
@@ -2700,7 +2654,7 @@ gedit_tab_print_or_print_preview (GeditTab *tab,
g_object_add_weak_pointer (G_OBJECT (tab->priv->print_job),
(gpointer *) &tab->priv->print_job);
- show_printing_message_area (tab, is_preview);
+ show_printing_info_bar (tab, is_preview);
g_signal_connect (tab->priv->print_job,
"printing",
@@ -2958,7 +2912,7 @@ gedit_tab_set_info_bar (GeditTab *tab,
g_return_if_fail (info_bar == NULL || GTK_IS_WIDGET (info_bar));
/* FIXME: this can cause problems with the tab state machine */
- set_message_area (tab, info_bar);
+ set_info_bar (tab, info_bar);
}
/* ex:ts=8:noet: */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]