xed-utils.h: Clean up code styling

This commit is contained in:
JosephMcc 2017-01-01 13:53:19 -08:00
parent 4ef02d4837
commit ea1f2055e7
1 changed files with 75 additions and 76 deletions

View File

@ -18,14 +18,14 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, * Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
/* /*
* Modified by the xed Team, 1998-2005. See the AUTHORS file for a * Modified by the xed Team, 1998-2005. See the AUTHORS file for a
* list of people on the xed Team. * list of people on the xed Team.
* See the ChangeLog files for a list of changes. * See the ChangeLog files for a list of changes.
* *
* $Id$ * $Id$
*/ */
@ -48,108 +48,107 @@ G_BEGIN_DECLS
enum { XED_ALL_WORKSPACES = 0xffffffff }; enum { XED_ALL_WORKSPACES = 0xffffffff };
gboolean xed_utils_uri_has_writable_scheme (const gchar *uri); gboolean xed_utils_uri_has_writable_scheme (const gchar *uri);
gboolean xed_utils_uri_has_file_scheme (const gchar *uri); gboolean xed_utils_uri_has_file_scheme (const gchar *uri);
void xed_utils_menu_position_under_widget (GtkMenu *menu, void xed_utils_menu_position_under_widget (GtkMenu *menu,
gint *x, gint *x,
gint *y, gint *y,
gboolean *push_in, gboolean *push_in,
gpointer user_data); gpointer user_data);
void xed_utils_menu_position_under_tree_view void xed_utils_menu_position_under_tree_view (GtkMenu *menu,
(GtkMenu *menu, gint *x,
gint *x, gint *y,
gint *y, gboolean *push_in,
gboolean *push_in, gpointer user_data);
gpointer user_data);
gchar *xed_gdk_color_to_string (GdkColor color); gchar *xed_gdk_color_to_string (GdkColor color);
GtkWidget *xed_gtk_button_new_with_stock_icon (const gchar *label, GtkWidget *xed_gtk_button_new_with_stock_icon (const gchar *label,
const gchar *stock_id); const gchar *stock_id);
GtkWidget *xed_dialog_add_button (GtkDialog *dialog, GtkWidget *xed_dialog_add_button (GtkDialog *dialog,
const gchar *text, const gchar *text,
const gchar *stock_id, const gchar *stock_id,
gint response_id); gint response_id);
gchar *xed_utils_escape_underscores (const gchar *text, gchar *xed_utils_escape_underscores (const gchar *text,
gssize length); gssize length);
gchar *xed_utils_str_middle_truncate (const gchar *string, gchar *xed_utils_str_middle_truncate (const gchar *string,
guint truncate_length); guint truncate_length);
gchar *xed_utils_str_end_truncate (const gchar *string, gchar *xed_utils_str_end_truncate (const gchar *string,
guint truncate_length); guint truncate_length);
gboolean g_utf8_caselessnmatch (const char *s1, gboolean g_utf8_caselessnmatch (const char *s1,
const char *s2, const char *s2,
gssize n1, gssize n1,
gssize n2); gssize n2);
void xed_utils_set_atk_name_description (GtkWidget *widget, void xed_utils_set_atk_name_description (GtkWidget *widget,
const gchar *name, const gchar *name,
const gchar *description); const gchar *description);
void xed_utils_set_atk_relation (GtkWidget *obj1, void xed_utils_set_atk_relation (GtkWidget *obj1,
GtkWidget *obj2, GtkWidget *obj2,
AtkRelationType rel_type); AtkRelationType rel_type);
gboolean xed_utils_uri_exists (const gchar* text_uri); gboolean xed_utils_uri_exists (const gchar* text_uri);
gchar *xed_utils_escape_search_text (const gchar *text); gchar *xed_utils_escape_search_text (const gchar *text);
gchar *xed_utils_unescape_search_text (const gchar *text); gchar *xed_utils_unescape_search_text (const gchar *text);
void xed_warning (GtkWindow *parent, void xed_warning (GtkWindow *parent,
const gchar *format, const gchar *format,
...) G_GNUC_PRINTF(2, 3); ...) G_GNUC_PRINTF(2, 3);
gchar *xed_utils_make_valid_utf8 (const char *name); gchar *xed_utils_make_valid_utf8 (const char *name);
/* Note that this function replace home dir with ~ */ /* Note that this function replace home dir with ~ */
gchar *xed_utils_uri_get_dirname (const char *uri); gchar *xed_utils_uri_get_dirname (const char *uri);
gchar *xed_utils_location_get_dirname_for_display gchar *xed_utils_location_get_dirname_for_display (GFile *location);
(GFile *location);
gchar *xed_utils_replace_home_dir_with_tilde (const gchar *uri); gchar *xed_utils_replace_home_dir_with_tilde (const gchar *uri);
guint xed_utils_get_current_workspace (GdkScreen *screen); guint xed_utils_get_current_workspace (GdkScreen *screen);
guint xed_utils_get_window_workspace (GtkWindow *gtkwindow); guint xed_utils_get_window_workspace (GtkWindow *gtkwindow);
void xed_utils_get_current_viewport (GdkScreen *screen, void xed_utils_get_current_viewport (GdkScreen *screen,
gint *x, gint *x,
gint *y); gint *y);
gboolean xed_utils_is_valid_uri (const gchar *uri); gboolean xed_utils_is_valid_uri (const gchar *uri);
gboolean xed_utils_get_ui_objects (const gchar *filename, gboolean xed_utils_get_ui_objects (const gchar *filename,
gchar **root_objects, gchar **root_objects,
GtkWidget **error_widget, GtkWidget **error_widget,
const gchar *object_name, const gchar *object_name,
...) G_GNUC_NULL_TERMINATED; ...) G_GNUC_NULL_TERMINATED;
gboolean xed_utils_file_has_parent (GFile *gfile); gboolean xed_utils_file_has_parent (GFile *gfile);
/* Return NULL if str is not a valid URI and/or filename */ /* Return NULL if str is not a valid URI and/or filename */
gchar *xed_utils_make_canonical_uri_from_shell_arg gchar *xed_utils_make_canonical_uri_from_shell_arg (const gchar *str);
(const gchar *str);
gchar *xed_utils_uri_for_display (const gchar *uri);
gchar *xed_utils_uri_for_display (const gchar *uri);
gchar *xed_utils_basename_for_display (const gchar *uri); gchar *xed_utils_basename_for_display (const gchar *uri);
gboolean xed_utils_decode_uri (const gchar *uri,
gchar **scheme, gboolean xed_utils_decode_uri (const gchar *uri,
gchar **user, gchar **scheme,
gchar **port, gchar **user,
gchar **host, gchar **port,
gchar **path); gchar **host,
gchar **path);
/* Turns data from a drop into a list of well formatted uris */ /* Turns data from a drop into a list of well formatted uris */
gchar **xed_utils_drop_get_uris (GtkSelectionData *selection_data); gchar **xed_utils_drop_get_uris (GtkSelectionData *selection_data);
G_END_DECLS G_END_DECLS