1. Daniel Poelzleithner
  2. moo-poelzi

Commits

Yevgen Muntyan  committed 9d61f71

Export moo_splitlines

  • Participants
  • Parent commits 5a07a1b
  • Branches default
  • Tags ggap-0.8.0

Comments (0)

Files changed (7)

File moo/moo.h

View file
  • Ignore whitespace
 #include <mooutils/mooutils-misc.h>
 #include <mooutils/moowindow.h>
 
-#ifdef __OBJC__
-#include <mooscript/mooscript-context.h>
-#include <mooscript/mooscript-func.h>
-#include <mooscript/mooscript-node.h>
-#include <mooscript/mooscript-parser.h>
-#include <mooscript/mooscript-value.h>
-#include <mooscript/mooscript-zenity.h>
-#endif
-
 #include <moofileview/moofileview.h>
 
 #include <mooapp/mooapp.h>

File moo/mooedit/mookeyfile.c

View file
  • Ignore whitespace
                 const char *indent)
 {
     char **p;
-    char **lines = _moo_splitlines (content);
+    char **lines = moo_splitlines (content);
 
     for (p = lines; p && *p; ++p)
         g_string_append_printf (string, "%s%s\n", indent, *p);

File moo/mooutils/mooglade.c

View file
  • Ignore whitespace
     }
     else if (param_spec->value_type == G_TYPE_STRV)
     {
-        char **strv = _moo_splitlines (value);
+        char **strv = moo_splitlines (value);
         g_value_take_boxed (&param->value, strv);
     }
     else

File moo/mooutils/moomarkup.c

View file
  • Ignore whitespace
     g_string_append_len (str, fill, indent);
     g_string_append_printf (str, "<%s", elm->name);
     for (i = 0; i < elm->n_attrs; ++i)
+    {
+        char *attr = g_markup_escape_text (elm->attr_vals[i], -1);
         g_string_append_printf (str, " %s=\"%s\"",
                                 elm->attr_names[i],
-                                elm->attr_vals[i]);
+                                attr);
+        g_free (attr);
+    }
 
     if (empty)
     {

File moo/mooutils/moospawn.c

View file
  • Ignore whitespace
     {
         char **lines, **p;
 
-        lines = _moo_splitlines (text);
+        lines = moo_splitlines (text);
 
         if (lines)
         {

File moo/mooutils/mooutils-misc.c

View file
  • Ignore whitespace
 
 
 char **
-_moo_splitlines (const char *string)
+moo_splitlines (const char *string)
 {
     GPtrArray *array;
     const char *line, *p;

File moo/mooutils/mooutils-misc.h

View file
  • Ignore whitespace
 
 /* ~/.appname */
 gboolean    moo_make_user_data_dir          (const char     *path);
-void        _moo_set_user_data_dir          (const char     *path);
+void       _moo_set_user_data_dir           (const char     *path);
 char       *moo_get_user_data_dir           (void);
 char       *moo_get_user_data_file          (const char     *basename);
 gboolean    moo_save_user_data_file         (const char     *basename,
 const char *const *_moo_get_shared_data_dirs (void);
 
 
-void        _moo_selection_data_set_pointer (GtkSelectionData *data,
+void       _moo_selection_data_set_pointer  (GtkSelectionData *data,
                                              GdkAtom         type,
                                              gpointer        ptr);
-gpointer    _moo_selection_data_get_pointer (GtkSelectionData *data,
+gpointer   _moo_selection_data_get_pointer  (GtkSelectionData *data,
                                              GdkAtom         type);
 
 GdkModifierType _moo_get_modifiers          (GtkWidget      *widget);
 
-void        _moo_menu_item_set_accel_label  (GtkWidget      *menu_item,
+void       _moo_menu_item_set_accel_label   (GtkWidget      *menu_item,
                                              const char     *label);
-void        _moo_menu_item_set_label        (GtkWidget      *menu_item,
+void       _moo_menu_item_set_label         (GtkWidget      *menu_item,
                                              const char     *label,
                                              gboolean        mnemonic);
 
-void        _moo_widget_set_tooltip         (GtkWidget      *widget,
+void       _moo_widget_set_tooltip          (GtkWidget      *widget,
                                              const char     *tip);
 
 char      **moo_strnsplit_lines             (const char     *string,
                                              gssize          len,
                                              guint          *n_tokens);
-char      **_moo_splitlines                 (const char     *string);
-char      **_moo_ascii_strnsplit            (const char     *string,
+char      **moo_splitlines                  (const char     *string);
+char     **_moo_ascii_strnsplit             (const char     *string,
                                              gssize          len,
                                              guint           n_tokens);
-char      **_moo_strv_reverse               (char          **str_array);
+char     **_moo_strv_reverse                (char          **str_array);
 
 static inline gboolean
 _moo_str_equal_inline (const char *s1,