[gedit/wip/gcode] Use gcode-utils in gedit



commit c301035a2a0c5cd067ffd29bc4256c264aabd5b4
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun May 3 12:31:25 2015 +0200

    Use gcode-utils in gedit

 gedit/gedit-app.c                     |   12 ++++++------
 gedit/gedit-commands-file.c           |   10 +++++-----
 gedit/gedit-commands-search.c         |    4 ++--
 gedit/gedit-document.c                |    6 +++---
 gedit/gedit-documents-panel.c         |    4 ++--
 gedit/gedit-file-chooser-dialog-gtk.c |    8 ++++----
 gedit/gedit-file-chooser-dialog-osx.c |    4 ++--
 gedit/gedit-io-error-info-bar.c       |   28 ++++++++++++++--------------
 gedit/gedit-preferences-dialog.c      |    6 +++---
 gedit/gedit-print-job.c               |    4 ++--
 gedit/gedit-tab.c                     |   16 ++++++++--------
 gedit/gedit-view-frame.c              |    6 +++---
 gedit/gedit-view.c                    |    6 +++---
 gedit/gedit-window.c                  |   14 +++++++-------
 14 files changed, 64 insertions(+), 64 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index c95a507..e999cde 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -37,10 +37,10 @@
 #include <girepository.h>
 #endif
 
+#include "gcode/gcode.h"
 #include "gedit-commands-private.h"
 #include "gedit-notebook.h"
 #include "gedit-debug.h"
-#include "gedit-utils.h"
 #include "gedit-enum-types.h"
 #include "gedit-dirs.h"
 #include "gedit-settings.h"
@@ -338,8 +338,8 @@ is_in_viewport (GtkWindow    *window,
        }
 
        /* Check for workspace match */
-       ws = gedit_utils_get_window_workspace (window);
-       if (ws != workspace && ws != GEDIT_ALL_WORKSPACES)
+       ws = gcode_utils_get_window_workspace (window);
+       if (ws != workspace && ws != GCODE_ALL_WORKSPACES)
        {
                return FALSE;
        }
@@ -349,7 +349,7 @@ is_in_viewport (GtkWindow    *window,
        gdk_window_get_position (gdkwindow, &x, &y);
        width = gdk_window_get_width (gdkwindow);
        height = gdk_window_get_height (gdkwindow);
-       gedit_utils_get_current_viewport (screen, &vp_x, &vp_y);
+       gcode_utils_get_current_viewport (screen, &vp_x, &vp_y);
        x += vp_x;
        y += vp_y;
 
@@ -372,8 +372,8 @@ get_active_window (GtkApplication *app)
 
        screen = gdk_screen_get_default ();
 
-       workspace = gedit_utils_get_current_workspace (screen);
-       gedit_utils_get_current_viewport (screen, &viewport_x, &viewport_y);
+       workspace = gcode_utils_get_current_workspace (screen);
+       gcode_utils_get_current_viewport (screen, &viewport_x, &viewport_y);
 
        /* Gtk documentation says the window list is always in MRU order */
        windows = gtk_application_get_windows (app);
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index 51477f6..5b57232 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -32,6 +32,7 @@
 #include <gio/gio.h>
 #include <gtk/gtk.h>
 
+#include "gcode/gcode.h"
 #include "gedit-debug.h"
 #include "gedit-document.h"
 #include "gedit-document-private.h"
@@ -41,7 +42,6 @@
 #include "gedit-window-private.h"
 #include "gedit-notebook.h"
 #include "gedit-statusbar.h"
-#include "gedit-utils.h"
 #include "gedit-file-chooser-dialog.h"
 #include "gedit-close-confirmation-dialog.h"
 
@@ -301,7 +301,7 @@ gedit_commands_load_location (GeditWindow             *window,
 
        g_return_if_fail (GEDIT_IS_WINDOW (window));
        g_return_if_fail (G_IS_FILE (location));
-       g_return_if_fail (gedit_utils_is_valid_location (location));
+       g_return_if_fail (gcode_utils_is_valid_location (location));
 
        uri = g_file_get_uri (location);
        gedit_debug_message (DEBUG_COMMANDS, "Loading URI '%s'", uri);
@@ -577,7 +577,7 @@ replace_read_only_file (GtkWindow *parent,
         * though the dialog uses wrapped text, if the name doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       name_for_display = gedit_utils_str_middle_truncate (parse_name, 50);
+       name_for_display = gcode_utils_str_middle_truncate (parse_name, 50);
        g_free (parse_name);
 
        dialog = gtk_message_dialog_new (parent,
@@ -629,7 +629,7 @@ change_compression (GtkWindow *parent,
         * though the dialog uses wrapped text, if the name doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       name_for_display = gedit_utils_str_middle_truncate (parse_name, 50);
+       name_for_display = gcode_utils_str_middle_truncate (parse_name, 50);
        g_free (parse_name);
 
        if (compressed)
@@ -695,7 +695,7 @@ get_compression_type_from_file (GFile *file)
        name = g_file_get_basename (file);
        content_type = g_content_type_guess (name, NULL, 0, NULL);
 
-       type = gedit_utils_get_compression_type_from_content_type (content_type);
+       type = gcode_utils_get_compression_type_from_content_type (content_type);
 
        g_free (name);
        g_free (content_type);
diff --git a/gedit/gedit-commands-search.c b/gedit/gedit-commands-search.c
index 3d21329..d4f9b3c 100644
--- a/gedit/gedit-commands-search.c
+++ b/gedit/gedit-commands-search.c
@@ -32,6 +32,7 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 
+#include "gcode/gcode.h"
 #include "gedit-debug.h"
 #include "gedit-statusbar.h"
 #include "gedit-tab.h"
@@ -39,7 +40,6 @@
 #include "gedit-view-frame.h"
 #include "gedit-window.h"
 #include "gedit-window-private.h"
-#include "gedit-utils.h"
 #include "gedit-replace-dialog.h"
 
 #define GEDIT_REPLACE_DIALOG_KEY       "gedit-replace-dialog-key"
@@ -133,7 +133,7 @@ text_not_found (GeditWindow        *window,
        gchar *truncated_text;
 
        search_text = gedit_replace_dialog_get_search_text (replace_dialog);
-       truncated_text = gedit_utils_str_end_truncate (search_text, MAX_MSG_LENGTH);
+       truncated_text = gcode_utils_str_end_truncate (search_text, MAX_MSG_LENGTH);
 
        gedit_statusbar_flash_message (GEDIT_STATUSBAR (window->priv->statusbar),
                                       window->priv->generic_message_cid,
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 54629f2..3648705 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -31,9 +31,9 @@
 #include <string.h>
 #include <glib/gi18n.h>
 
+#include "gcode/gcode.h"
 #include "gedit-settings.h"
 #include "gedit-debug.h"
-#include "gedit-utils.h"
 #include "gedit-metadata-manager.h"
 
 #define METADATA_QUERY "metadata::*"
@@ -918,7 +918,7 @@ set_content_type_no_guess (GeditDocument *doc,
        g_free (priv->content_type);
 
        /* For compression types, we try to just guess from the content */
-       if (gedit_utils_get_compression_type_from_content_type (content_type) !=
+       if (gcode_utils_get_compression_type_from_content_type (content_type) !=
            GTK_SOURCE_COMPRESSION_TYPE_NONE)
        {
                dupped_content_type = get_content_type_from_content (doc);
@@ -1090,7 +1090,7 @@ gedit_document_get_short_name_for_display (GeditDocument *doc)
        }
        else
        {
-               return gedit_utils_basename_for_display (location);
+               return gcode_utils_basename_for_display (location);
        }
 }
 
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index 847c99c..38ec251 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -26,6 +26,7 @@
 
 #include <glib/gi18n.h>
 
+#include "gcode/gcode.h"
 #include "gedit-debug.h"
 #include "gedit-document.h"
 #include "gedit-multi-notebook.h"
@@ -34,7 +35,6 @@
 #include "gedit-small-button.h"
 #include "gedit-tab.h"
 #include "gedit-tab-private.h"
-#include "gedit-utils.h"
 #include "gedit-commands-private.h"
 
 typedef struct _GeditDocumentsGenericRow GeditDocumentsGenericRow;
@@ -481,7 +481,7 @@ doc_get_name (GeditDocument *doc)
        name = gedit_document_get_short_name_for_display (doc);
 
        /* Truncate the name so it doesn't get insanely wide. */
-       docname = gedit_utils_str_middle_truncate (name, MAX_DOC_NAME_LENGTH);
+       docname = gcode_utils_str_middle_truncate (name, MAX_DOC_NAME_LENGTH);
 
        g_free (name);
 
diff --git a/gedit/gedit-file-chooser-dialog-gtk.c b/gedit/gedit-file-chooser-dialog-gtk.c
index 040b61b..b07c613 100644
--- a/gedit/gedit-file-chooser-dialog-gtk.c
+++ b/gedit/gedit-file-chooser-dialog-gtk.c
@@ -32,11 +32,11 @@
 
 #include <glib/gi18n.h>
 
+#include "gcode/gcode.h"
 #include "gedit-encodings-combo-box.h"
 #include "gedit-debug.h"
 #include "gedit-enum-types.h"
 #include "gedit-settings.h"
-#include "gedit-utils.h"
 
 #define ALL_FILES              _("All Files")
 #define ALL_TEXT_FILES         _("All Text Files")
@@ -382,19 +382,19 @@ create_newline_combo (GeditFileChooserDialogGtk *dialog)
        newline_combo_append (GTK_COMBO_BOX (combo),
                              store,
                              &iter,
-                             gedit_utils_newline_type_to_string (GTK_SOURCE_NEWLINE_TYPE_LF),
+                             gcode_utils_newline_type_to_string (GTK_SOURCE_NEWLINE_TYPE_LF),
                              GTK_SOURCE_NEWLINE_TYPE_LF);
 
        newline_combo_append (GTK_COMBO_BOX (combo),
                              store,
                              &iter,
-                             gedit_utils_newline_type_to_string (GTK_SOURCE_NEWLINE_TYPE_CR),
+                             gcode_utils_newline_type_to_string (GTK_SOURCE_NEWLINE_TYPE_CR),
                              GTK_SOURCE_NEWLINE_TYPE_CR);
 
        newline_combo_append (GTK_COMBO_BOX (combo),
                              store,
                              &iter,
-                             gedit_utils_newline_type_to_string (GTK_SOURCE_NEWLINE_TYPE_CR_LF),
+                             gcode_utils_newline_type_to_string (GTK_SOURCE_NEWLINE_TYPE_CR_LF),
                              GTK_SOURCE_NEWLINE_TYPE_CR_LF);
 
        gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
diff --git a/gedit/gedit-file-chooser-dialog-osx.c b/gedit/gedit-file-chooser-dialog-osx.c
index d59f5ad..1f567c3 100644
--- a/gedit/gedit-file-chooser-dialog-osx.c
+++ b/gedit/gedit-file-chooser-dialog-osx.c
@@ -28,9 +28,9 @@
 #include <gdk/gdkquartz.h>
 #include <glib/gi18n.h>
 
+#include "gcode/gcode.h"
 #include "gedit-encoding-items.h"
 #include "gedit-encodings-dialog.h"
-#include "gedit-utils.h"
 
 struct _GeditFileChooserDialogOSX
 {
@@ -77,7 +77,7 @@ G_DEFINE_TYPE_EXTENDED (GeditFileChooserDialogOSX,
 {
        NSString *title;
 
-       title = [NSString stringWithUTF8String:gedit_utils_newline_type_to_string (type)];
+       title = [NSString stringWithUTF8String:gcode_utils_newline_type_to_string (type)];
 
        self = [super initWithTitle:title action:nil keyEquivalent:@""];
 
diff --git a/gedit/gedit-io-error-info-bar.c b/gedit/gedit-io-error-info-bar.c
index 557cc7d..76af3c6 100644
--- a/gedit/gedit-io-error-info-bar.c
+++ b/gedit/gedit-io-error-info-bar.c
@@ -34,9 +34,9 @@
 #include <glib/gi18n.h>
 #include <gio/gio.h>
 
-#include <gedit/gedit-encodings-combo-box.h>
+#include "gcode/gcode.h"
+#include "gedit-encodings-combo-box.h"
 #include "gedit-settings.h"
-#include "gedit-utils.h"
 #include "gedit-document.h"
 
 #define MAX_URI_IN_DIALOG_LENGTH 50
@@ -233,14 +233,14 @@ parse_gio_error (gint          code,
                                        uri = g_file_get_uri (location);
                                }
 
-                               if (uri && gedit_utils_decode_uri (uri, NULL, NULL, &hn, NULL, NULL))
+                               if (uri && gcode_utils_decode_uri (uri, NULL, NULL, &hn, NULL, NULL))
                                {
                                        if (hn != NULL)
                                        {
                                                gchar *host_markup;
                                                gchar *host_name;
 
-                                               host_name = gedit_utils_make_valid_utf8 (hn);
+                                               host_name = gcode_utils_make_valid_utf8 (hn);
                                                g_free (hn);
 
                                                host_markup = g_markup_escape_text (host_name, -1);
@@ -336,7 +336,7 @@ gedit_unrecoverable_reverting_error_info_bar_new (GFile        *location,
         * though the dialog uses wrapped text, if the URI doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
 
@@ -428,7 +428,7 @@ gedit_network_unavailable_info_bar_new (GFile *location)
 
        full_formatted_uri = g_file_get_parse_name (location);
 
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
        uri_for_display = g_markup_printf_escaped ("<i>%s</i>", temp_uri_for_display);
@@ -584,7 +584,7 @@ gedit_io_loading_error_info_bar_new (GFile                   *location,
         * though the dialog uses wrapped text, if the URI doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
 
@@ -690,7 +690,7 @@ gedit_conversion_error_while_saving_info_bar_new (GFile                   *locat
         * though the dialog uses wrapped text, if the URI doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
 
@@ -759,7 +759,7 @@ gedit_file_already_open_warning_info_bar_new (GFile *location)
         * though the dialog uses wrapped text, if the URI doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
 
@@ -845,7 +845,7 @@ gedit_externally_modified_saving_error_info_bar_new (GFile        *location,
         * though the dialog uses wrapped text, if the URI doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
 
@@ -935,7 +935,7 @@ gedit_no_backup_saving_error_info_bar_new (GFile        *location,
         * though the dialog uses wrapped text, if the URI doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
 
@@ -1033,7 +1033,7 @@ gedit_unrecoverable_saving_error_info_bar_new (GFile        *location,
         * though the dialog uses wrapped text, if the URI doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
 
@@ -1156,7 +1156,7 @@ gedit_externally_modified_info_bar_new (GFile    *location,
         * though the dialog uses wrapped text, if the URI doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
 
@@ -1227,7 +1227,7 @@ gedit_invalid_character_info_bar_new (GFile *location)
         * though the dialog uses wrapped text, if the URI doesn't contain
         * white space then the text-wrapping code is too stupid to wrap it.
         */
-       temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+       temp_uri_for_display = gcode_utils_str_middle_truncate (full_formatted_uri,
                                                                MAX_URI_IN_DIALOG_LENGTH);
        g_free (full_formatted_uri);
 
diff --git a/gedit/gedit-preferences-dialog.c b/gedit/gedit-preferences-dialog.c
index 837971c..47ea340 100644
--- a/gedit/gedit-preferences-dialog.c
+++ b/gedit/gedit-preferences-dialog.c
@@ -34,12 +34,12 @@
 #include <gtksourceview/gtksource.h>
 #include <libpeas-gtk/peas-gtk.h>
 
+#include "gcode/gcode.h"
 #include "gedit-utils.h"
 #include "gedit-debug.h"
 #include "gedit-document.h"
 #include "gedit-dirs.h"
 #include "gedit-settings.h"
-#include "gedit-utils.h"
 #include "gedit-file-chooser-dialog.h"
 
 /*
@@ -445,10 +445,10 @@ setup_font_colors_page_font_section (GeditPreferencesDialog *dlg)
        gtk_widget_set_tooltip_text (dlg->font_button,
                         _("Click on this button to select the font to be used by the editor"));
 
-       gedit_utils_set_atk_relation (dlg->font_button,
+       gcode_utils_set_atk_relation (dlg->font_button,
                                      dlg->default_font_checkbutton,
                                      ATK_RELATION_CONTROLLED_BY);
-       gedit_utils_set_atk_relation (dlg->default_font_checkbutton,
+       gcode_utils_set_atk_relation (dlg->default_font_checkbutton,
                                      dlg->font_button,
                                      ATK_RELATION_CONTROLLER_FOR);
 
diff --git a/gedit/gedit-print-job.c b/gedit/gedit-print-job.c
index e1069ff..36c0eeb 100644
--- a/gedit/gedit-print-job.c
+++ b/gedit/gedit-print-job.c
@@ -29,10 +29,10 @@
 #include <glib/gi18n.h>
 #include <gtksourceview/gtksource.h>
 
+#include "gcode/gcode.h"
 #include "gedit-debug.h"
 #include "gedit-print-preview.h"
 #include "gedit-marshal.h"
-#include "gedit-utils.h"
 #include "gedit-dirs.h"
 #include "gedit-settings.h"
 
@@ -541,7 +541,7 @@ create_compositor (GeditPrintJob *job)
                gchar *left;
 
                doc_name = gedit_document_get_uri_for_display (GEDIT_DOCUMENT (buf));
-               name_to_display = gedit_utils_str_middle_truncate (doc_name, 60);
+               name_to_display = gcode_utils_str_middle_truncate (doc_name, 60);
 
                left = g_strdup_printf (_("File: %s"), name_to_display);
 
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 2a9c451..468f4e1 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -29,9 +29,9 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
+#include "gcode/gcode.h"
 #include "gedit-app.h"
 #include "gedit-recent.h"
-#include "gedit-utils.h"
 #include "gedit-io-error-info-bar.h"
 #include "gedit-print-job.h"
 #include "gedit-print-preview.h"
@@ -757,7 +757,7 @@ show_loading_info_bar (GeditTab *tab)
        {
                gchar *str;
 
-               str = gedit_utils_str_middle_truncate (name, MAX_MSG_LENGTH);
+               str = gcode_utils_str_middle_truncate (name, MAX_MSG_LENGTH);
                g_free (name);
                name = str;
        }
@@ -768,7 +768,7 @@ show_loading_info_bar (GeditTab *tab)
 
                if (location != NULL)
                {
-                       gchar *str = gedit_utils_location_get_dirname_for_display (location);
+                       gchar *str = gcode_utils_location_get_dirname_for_display (location);
 
                        /* use the remaining space for the dir, but use a min of 20 chars
                         * so that we do not end up with a dirname like "(a...b)".
@@ -776,7 +776,7 @@ show_loading_info_bar (GeditTab *tab)
                         * we have a title long 99 + 20, but I think it's a rare enough
                         * case to be acceptable. It's justa darn title afterall :)
                         */
-                       dirname = gedit_utils_str_middle_truncate (str,
+                       dirname = gcode_utils_str_middle_truncate (str,
                                                                   MAX (20, MAX_MSG_LENGTH - len));
                        g_free (str);
                }
@@ -871,7 +871,7 @@ show_saving_info_bar (GeditTab *tab)
         */
        if (len > MAX_MSG_LENGTH)
        {
-               from = gedit_utils_str_middle_truncate (short_name, MAX_MSG_LENGTH);
+               from = gcode_utils_str_middle_truncate (short_name, MAX_MSG_LENGTH);
                g_free (short_name);
        }
        else
@@ -885,7 +885,7 @@ show_saving_info_bar (GeditTab *tab)
 
                from = short_name;
                to = g_file_get_parse_name (location);
-               str = gedit_utils_str_middle_truncate (to, MAX (20, MAX_MSG_LENGTH - len));
+               str = gcode_utils_str_middle_truncate (to, MAX (20, MAX_MSG_LENGTH - len));
                g_free (to);
 
                to = str;
@@ -1504,7 +1504,7 @@ _gedit_tab_get_name (GeditTab *tab)
        name = gedit_document_get_short_name_for_display (doc);
 
        /* Truncate the name so it doesn't get insanely wide. */
-       docname = gedit_utils_str_middle_truncate (name, MAX_DOC_NAME_LENGTH);
+       docname = gcode_utils_str_middle_truncate (name, MAX_DOC_NAME_LENGTH);
 
        if (gtk_text_buffer_get_modified (GTK_TEXT_BUFFER (doc)))
        {
@@ -1548,7 +1548,7 @@ _gedit_tab_get_tooltip (GeditTab *tab)
        uri = gedit_document_get_uri_for_display (doc);
        g_return_val_if_fail (uri != NULL, NULL);
 
-       ruri =  gedit_utils_replace_home_dir_with_tilde (uri);
+       ruri =  gcode_utils_replace_home_dir_with_tilde (uri);
        g_free (uri);
 
        ruri_markup = g_markup_printf_escaped ("<i>%s</i>", ruri);
diff --git a/gedit/gedit-view-frame.c b/gedit/gedit-view-frame.c
index 9d99e9a..bea8a93 100644
--- a/gedit/gedit-view-frame.c
+++ b/gedit/gedit-view-frame.c
@@ -32,11 +32,11 @@
 #include <glib/gi18n.h>
 #include <stdlib.h>
 
+#include "gcode/gcode.h"
+#include "libgd/gd.h"
 #include "gedit-window.h"
 #include "gedit-view-holder.h"
 #include "gedit-debug.h"
-#include "gedit-utils.h"
-#include "libgd/gd.h"
 
 #define FLUSH_TIMEOUT_DURATION 30 /* in seconds */
 
@@ -946,7 +946,7 @@ search_entry_icon_release (GtkEntry             *entry,
 
        gtk_menu_popup (GTK_MENU (menu),
                        NULL, NULL,
-                       gedit_utils_menu_position_under_widget, entry,
+                       gcode_utils_menu_position_under_widget, entry,
                        event->button, event->time);
 }
 
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index 82e7d9c..122b436 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -32,11 +32,11 @@
 #include <libpeas/peas-extension-set.h>
 #include <glib/gi18n.h>
 
+#include "gcode/gcode.h"
 #include "gedit-view-activatable.h"
 #include "gedit-plugins-engine.h"
 #include "gedit-debug.h"
 #include "gedit-marshal.h"
-#include "gedit-utils.h"
 #include "gedit-settings.h"
 #include "gedit-app.h"
 #include "gedit-notebook.h"
@@ -364,7 +364,7 @@ gedit_view_drag_data_received (GtkWidget        *widget,
                {
                        gchar **uri_list;
 
-                       uri_list = gedit_utils_drop_get_uris (selection_data);
+                       uri_list = gcode_utils_drop_get_uris (selection_data);
 
                        if (uri_list != NULL)
                        {
@@ -481,7 +481,7 @@ gedit_view_drag_drop (GtkWidget      *widget,
                if (info == TARGET_XDNDDIRECTSAVE)
                {
                        gchar *uri;
-                       uri = gedit_utils_set_direct_save_filename (context);
+                       uri = gcode_utils_set_direct_save_filename (context);
 
                        if (uri != NULL)
                        {
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 2cd782a..2231d23 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -31,6 +31,7 @@
 #include <glib/gi18n.h>
 #include <libpeas/peas-extension-set.h>
 
+#include "gcode/gcode.h"
 #include "gedit-window-private.h"
 #include "gedit-app.h"
 #include "gedit-recent.h"
@@ -40,7 +41,6 @@
 #include "gedit-statusbar.h"
 #include "gedit-tab.h"
 #include "gedit-tab-private.h"
-#include "gedit-utils.h"
 #include "gedit-commands.h"
 #include "gedit-commands-private.h"
 #include "gedit-debug.h"
@@ -1095,7 +1095,7 @@ set_title (GeditWindow *window)
        {
                gchar *tmp;
 
-               tmp = gedit_utils_str_middle_truncate (name,
+               tmp = gcode_utils_str_middle_truncate (name,
                                                       MAX_TITLE_LENGTH);
                g_free (name);
                name = tmp;
@@ -1107,7 +1107,7 @@ set_title (GeditWindow *window)
 
                if (location != NULL)
                {
-                       gchar *str = gedit_utils_location_get_dirname_for_display (location);
+                       gchar *str = gcode_utils_location_get_dirname_for_display (location);
 
                        /* use the remaining space for the dir, but use a min of 20 chars
                         * so that we do not end up with a dirname like "(a...b)".
@@ -1115,7 +1115,7 @@ set_title (GeditWindow *window)
                         * we have a title long 99 + 20, but I think it's a rare enough
                         * case to be acceptable. It's justa darn title afterall :)
                         */
-                       dirname = gedit_utils_str_middle_truncate (str,
+                       dirname = gcode_utils_str_middle_truncate (str,
                                                                   MAX (20, MAX_TITLE_LENGTH - len));
                        g_free (str);
                }
@@ -1673,7 +1673,7 @@ drag_data_received_cb (GtkWidget        *widget,
        switch (info)
        {
                case TARGET_URI_LIST:
-                       uri_list = gedit_utils_drop_get_uris(selection_data);
+                       uri_list = gcode_utils_drop_get_uris(selection_data);
                        load_uris_from_drop (window, uri_list);
                        g_strfreev (uri_list);
 
@@ -1744,7 +1744,7 @@ drag_drop_cb (GtkWidget      *widget,
                if (info == TARGET_XDNDDIRECTSAVE)
                {
                        gchar *uri;
-                       uri = gedit_utils_set_direct_save_filename (context);
+                       uri = gcode_utils_set_direct_save_filename (context);
 
                        if (uri != NULL)
                        {
@@ -2419,7 +2419,7 @@ setup_side_panel (GeditWindow *window)
        gtk_button_set_relief (GTK_BUTTON (priv->side_stack_switcher), GTK_RELIEF_NONE);
        g_object_ref_sink (priv->side_stack_switcher);
 
-       gedit_utils_set_atk_name_description (priv->side_stack_switcher, _("Change side panel page"),  NULL);
+       gcode_utils_set_atk_name_description (priv->side_stack_switcher, _("Change side panel page"),  NULL);
 
        gedit_menu_stack_switcher_set_stack (GEDIT_MENU_STACK_SWITCHER (priv->side_stack_switcher),
                                             GTK_STACK (priv->side_panel));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]