/soc/2013/ankitkv/gobjectification: 28f07abea752: Merge gtkdoc-c...

Ankit Vani a at nevitus.org
Thu Feb 6 12:36:01 EST 2014


Changeset: 28f07abea752e0212c5403d40ca750734ce0bdf8
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-02-06 23:00 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/28f07abea752

Description:

Merge gtkdoc-conversion

diffstat:

 finch/libgnt/gnt-skel.h |   2 +-
 finch/libgnt/gntkeys.h  |   6 +++---
 finch/libgnt/gntstyle.c |  12 +++++++++++-
 finch/libgnt/gnttree.h  |  17 ++++++++++-------
 finch/libgnt/gntwm.h    |   1 +
 5 files changed, 26 insertions(+), 12 deletions(-)

diffs (120 lines):

diff --git a/finch/libgnt/gnt-skel.h b/finch/libgnt/gnt-skel.h
--- a/finch/libgnt/gnt-skel.h
+++ b/finch/libgnt/gnt-skel.h
@@ -19,7 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
-/**
+/*
  * SECTION:gnt-skel
  * @section_id: libgnt-gnt-skel
  * @short_description: <filename>gnt-skel.h</filename>
diff --git a/finch/libgnt/gntkeys.h b/finch/libgnt/gntkeys.h
--- a/finch/libgnt/gntkeys.h
+++ b/finch/libgnt/gntkeys.h
@@ -42,7 +42,7 @@ extern char *gnt_key_cdown;
 extern char *gnt_key_cleft;
 extern char *gnt_key_cright;
 
-#define SAFE(x)   ((x) ? (x) : "")
+#define SAFE(x)   ((cur_term && (x)) ? (x) : "")
 
 #define GNT_KEY_POPUP   SAFE(key_f16)   /* Apparently */
 
@@ -62,12 +62,12 @@ extern char *gnt_key_cright;
 #define GNT_KEY_HOME   SAFE(key_home)
 #define GNT_KEY_END    SAFE(key_end)
 
-#define GNT_KEY_ENTER  carriage_return
+#define GNT_KEY_ENTER  SAFE(carriage_return)
 
 #define GNT_KEY_BACKSPACE SAFE(key_backspace)
 #define GNT_KEY_DEL    SAFE(key_dc)
 #define GNT_KEY_INS    SAFE(key_ic)
-#define GNT_KEY_BACK_TAB (back_tab ? back_tab : SAFE(key_btab))
+#define GNT_KEY_BACK_TAB ((cur_term && back_tab) ? back_tab : SAFE(key_btab))
 
 #define GNT_KEY_CTRL_A     "\001"
 #define GNT_KEY_CTRL_B     "\002"
diff --git a/finch/libgnt/gntstyle.c b/finch/libgnt/gntstyle.c
--- a/finch/libgnt/gntstyle.c
+++ b/finch/libgnt/gntstyle.c
@@ -48,7 +48,13 @@ const char *gnt_style_get(GntStyle style
 
 char *gnt_style_get_from_name(const char *group, const char *key)
 {
-	const char *prg = g_get_prgname();
+	const char *prg;
+
+	/* gkfile is NULL when run by gtkdoc-scanobj or g-ir-scanner */
+	if (!gkfile)
+		return NULL;
+
+	prg = g_get_prgname();
 	if ((group == NULL || *group == '\0') && prg &&
 			g_key_file_has_group(gkfile, prg))
 		group = prg;
@@ -202,6 +208,10 @@ void gnt_style_read_actions(GType type, 
 	char *name;
 	GError *error = NULL;
 
+	/* gkfile is NULL when run by gtkdoc-scanobj or g-ir-scanner */
+	if (!gkfile)
+		return;
+
 	name = g_strdup_printf("%s::binding", g_type_name(type));
 
 	if (g_key_file_has_group(gkfile, name))
diff --git a/finch/libgnt/gnttree.h b/finch/libgnt/gnttree.h
--- a/finch/libgnt/gnttree.h
+++ b/finch/libgnt/gnttree.h
@@ -48,6 +48,7 @@ typedef struct _GntTreeClass		GntTreeCla
 
 typedef struct _GntTreeRow		GntTreeRow;
 typedef struct _GntTreeCol		GntTreeCol;
+typedef struct _GntTreeColInfo		GntTreeColInfo;
 
 typedef enum {
 	GNT_TREE_COLUMN_INVISIBLE    = 1 << 0,
@@ -56,6 +57,14 @@ typedef enum {
 	GNT_TREE_COLUMN_RIGHT_ALIGNED = 1 << 3,
 } GntTreeColumnFlag;
 
+struct _GntTreeColInfo
+{
+	int width;
+	char *title;
+	int width_ratio;
+	GntTreeColumnFlag flags;
+};
+
 struct _GntTree
 {
 	GntWidget parent;
@@ -75,13 +84,7 @@ struct _GntTree
 	GDestroyNotify value_destroy;
 
 	int ncol;               /* No. of columns */
-	struct _GntTreeColInfo
-	{
-		int width;
-		char *title;
-		int width_ratio;
-		GntTreeColumnFlag flags;
-	} *columns;             /* Would a GList be better? */
+	GntTreeColInfo *columns; /* Would a GList be better? */
 	gboolean show_title;
 	gboolean show_separator; /* Whether to show column separators */
 
diff --git a/finch/libgnt/gntwm.h b/finch/libgnt/gntwm.h
--- a/finch/libgnt/gntwm.h
+++ b/finch/libgnt/gntwm.h
@@ -102,6 +102,7 @@ struct _GntWM
 {
 	GntBindable inherit;
 
+	/*< public >*/
 	GMainLoop *loop;
 
 	GList *workspaces;



More information about the Commits mailing list