docs: Start cleaning up the docs

The code has chaged quite a bit. Start updating the docs to match and to quiet
some warnings during build.
This commit is contained in:
JosephMcc
2017-02-11 18:28:38 -08:00
parent 98c983f144
commit c8c3f4696f
12 changed files with 112 additions and 150 deletions

View File

@@ -80,7 +80,7 @@ INST_H_FILES = \
xed-window-activatable.h
if !ENABLE_GVFS_METADATA
INST_H_FILES += xed-metadata-manager.h
NOINST_H_FILES += xed-metadata-manager.h
endif
headerdir = $(prefix)/include/xed

View File

@@ -289,14 +289,15 @@ xed_commands_load_location (XedWindow *window,
/**
* xed_commands_load_locations:
* @window:
* @locations: (element-type GLib.File) (transfer none):
* @encoding: (allow-none):
* @line_pos:
* @window: a #XedWindow
* @locations: (element-type Gio.File): the locations to load
* @encoding: (allow-none): the #GtkSourceEncoding
* @line_pos: the line position to place the cursor
*
* Ignore non-existing locations
* Loads @locataions. Ignore non-existing locations
*
* Returns:
* Returns: (element-type Xed.Document) (transfer container): the locations
* that were loaded.
*/
GSList *
xed_commands_load_locations (XedWindow *window,

View File

@@ -832,7 +832,7 @@ xed_document_set_location (XedDocument *doc,
/**
* xed_document_get_uri_for_display:
* @doc:
* @doc: a #XedDocument
*
* Note: this never returns %NULL.
**/
@@ -857,7 +857,7 @@ xed_document_get_uri_for_display (XedDocument *doc)
/**
* xed_document_get_short_name_for_display:
* @doc:
* @doc: a #XedDocument
*
* Note: this never returns %NULL.
**/
@@ -911,7 +911,7 @@ xed_document_get_content_type (XedDocument *doc)
/**
* xed_document_get_mime_type:
* @doc:
* @doc: a #XedDocument
*
* Note: this never returns %NULL.
**/
@@ -1461,7 +1461,7 @@ xed_document_set_metadata (XedDocument *doc,
*
* Gets the metadata assigned to @key.
*
* Returns: the value assigned to @key.
* Returns: the value assigned to @key. Free with g_free().
*/
gchar *
xed_document_get_metadata (XedDocument *doc,

View File

@@ -33,16 +33,14 @@
#include <config.h>
#endif
#include <glib/gi18n.h>
#include <gtksourceview/gtksource.h>
#include "xed-encodings-combo-box.h"
#include <glib/gi18n.h>
#include "xed/xed-encodings-combo-box.h"
#include <xed/xed-encodings-dialog.h>
#include "xed-settings.h"
#include "xed-utils.h"
#define ENCODING_KEY "Enconding"
#define XED_ENCODINGS_COMBO_BOX_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
XED_TYPE_ENCODINGS_COMBO_BOX, \
XedEncodingsComboBoxPrivate))
@@ -386,6 +384,17 @@ xed_encodings_combo_box_init (XedEncodingsComboBox *menu)
update_menu (menu);
}
/**
* xed_encodings_combo_box_new:
* @save_mode: whether the combo box is used for saving a content.
*
* Creates a new encodings combo box object. If @save_mode is %FALSE, it means
* that the combo box is used for loading a content (e.g. a file), so the row
* "Automatically Detected" is added. For saving a content, the encoding must be
* provided.
*
* Returns: a new #XedEncodingsComboBox object.
*/
GtkWidget *
xed_encodings_combo_box_new (gboolean save_mode)
{
@@ -394,6 +403,13 @@ xed_encodings_combo_box_new (gboolean save_mode)
NULL);
}
/**
* xed_encodings_combo_box_get_selected_encoding:
* @menu: a #XedEncodingsComboBox.
*
* Returns: the selected #GtkSourceEncoding, or %NULL if the encoding should be
* auto-detected (only for loading mode, not for saving).
*/
const GtkSourceEncoding *
xed_encodings_combo_box_get_selected_encoding (XedEncodingsComboBox *menu)
{
@@ -418,8 +434,10 @@ xed_encodings_combo_box_get_selected_encoding (XedEncodingsComboBox *menu)
/**
* xed_encodings_combo_box_set_selected_encoding:
* @menu:
* @encoding: (allow-none):
* @menu: a #XedEncodingsComboBox
* @encoding: the #GtkSourceEncoding
*
* Sets the selected encoding.
**/
void
xed_encodings_combo_box_set_selected_encoding (XedEncodingsComboBox *menu,
@@ -428,6 +446,7 @@ xed_encodings_combo_box_set_selected_encoding (XedEncodingsComboBox *menu,
GtkTreeIter iter;
GtkTreeModel *model;
gboolean b;
g_return_if_fail (XED_IS_ENCODINGS_COMBO_BOX (menu));
g_return_if_fail (GTK_IS_COMBO_BOX (menu));

View File

@@ -32,7 +32,7 @@
#ifndef __XED_ENCODINGS_COMBO_BOX_H__
#define __XED_ENCODINGS_COMBO_BOX_H__
#include <gtk/gtk.h>
#include <gtksourceview/gtksource.h>
G_BEGIN_DECLS

View File

@@ -179,15 +179,15 @@ xed_progress_info_bar_new (const gchar *icon_name,
"has-cancel-button", has_cancel,
NULL));
xed_progress_info_bar_set_image (bar, icon_name);
xed_progress_info_bar_set_icon_name (bar, icon_name);
xed_progress_info_bar_set_markup (bar, markup);
return GTK_WIDGET (bar);
}
void
xed_progress_info_bar_set_image (XedProgressInfoBar *bar,
const gchar *icon_name)
xed_progress_info_bar_set_icon_name (XedProgressInfoBar *bar,
const gchar *icon_name)
{
g_return_if_fail (XED_IS_PROGRESS_INFO_BAR (bar));
g_return_if_fail (icon_name != NULL);

View File

@@ -65,8 +65,8 @@ GtkWidget *xed_progress_info_bar_new (const gchar *icon_name,
const gchar *markup,
gboolean has_cancel);
void xed_progress_info_bar_set_image (XedProgressInfoBar *area,
const gchar *icon_name);
void xed_progress_info_bar_set_icon_name (XedProgressInfoBar *area,
const gchar *icon_name);
void xed_progress_info_bar_set_markup (XedProgressInfoBar *area,
const gchar *markup);

View File

@@ -62,8 +62,6 @@ GType xed_statusbar_get_type (void) G_GNUC_CONST;
GtkWidget *xed_statusbar_new (void);
/* FIXME: status is not defined in any .h */
#define XedStatus gint
void xed_statusbar_set_window_state (XedStatusbar *statusbar,
XedWindowState state,
gint num_of_errors);