[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108003: Fix minor GTK3 problems f
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108003: Fix minor GTK3 problems found by static checking. |
Date: |
Fri, 02 Nov 2012 01:57:50 -0000 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108003
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2012-04-23 00:34:29 -0700
message:
Fix minor GTK3 problems found by static checking.
* emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
(EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
(struct _EmacsFixedClass, emacs_fixed_get_type):
Move decls here from emacsgtkfixed.h, since they needn't be public.
(emacs_fixed_get_type): Now static.
(emacs_fixed_class_init): Omit unused local.
(emacs_fixed_child_type): Remove; unused.
* emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
(EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
(struct _EmacsFixedClass): Move to emacsgtkfixed.c.
(EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
(EMACS_FIXED_GET_CLASS): Remove; unused.
* gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
modified:
src/ChangeLog
src/emacsgtkfixed.c
src/emacsgtkfixed.h
src/gtkutil.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-04-23 04:08:51 +0000
+++ b/src/ChangeLog 2012-04-23 07:34:29 +0000
@@ -1,5 +1,20 @@
2012-04-23 Paul Eggert <address@hidden>
+ Fix minor GTK3 problems found by static checking.
+ * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
+ (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
+ (struct _EmacsFixedClass, emacs_fixed_get_type):
+ Move decls here from emacsgtkfixed.h, since they needn't be public.
+ (emacs_fixed_get_type): Now static.
+ (emacs_fixed_class_init): Omit unused local.
+ (emacs_fixed_child_type): Remove; unused.
+ * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
+ (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
+ (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
+ (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
+ (EMACS_FIXED_GET_CLASS): Remove; unused.
+ * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
+
* keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
Problem reported by Juanma Barranquero for Windows -Wunused-function.
=== modified file 'src/emacsgtkfixed.c'
--- a/src/emacsgtkfixed.c 2012-01-05 09:46:05 +0000
+++ b/src/emacsgtkfixed.c 2012-04-23 07:34:29 +0000
@@ -28,6 +28,27 @@
#include "frame.h"
#include "xterm.h"
+#define EMACS_TYPE_FIXED emacs_fixed_get_type ()
+#define EMACS_FIXED(obj) \
+ G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed)
+
+typedef struct _EmacsFixed EmacsFixed;
+typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
+typedef struct _EmacsFixedClass EmacsFixedClass;
+
+struct _EmacsFixed
+{
+ GtkFixed container;
+
+ /*< private >*/
+ EmacsFixedPrivate *priv;
+};
+
+struct _EmacsFixedClass
+{
+ GtkFixedClass parent_class;
+};
+
struct _EmacsFixedPrivate
{
struct frame *f;
@@ -40,28 +61,21 @@
static void emacs_fixed_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural);
+static GType emacs_fixed_get_type (void);
G_DEFINE_TYPE (EmacsFixed, emacs_fixed, GTK_TYPE_FIXED)
static void
emacs_fixed_class_init (EmacsFixedClass *klass)
{
GtkWidgetClass *widget_class;
- GtkFixedClass *fixed_class;
widget_class = (GtkWidgetClass*) klass;
- fixed_class = (GtkFixedClass*) klass;
widget_class->get_preferred_width = emacs_fixed_get_preferred_width;
widget_class->get_preferred_height = emacs_fixed_get_preferred_height;
g_type_class_add_private (klass, sizeof (EmacsFixedPrivate));
}
-static GType
-emacs_fixed_child_type (GtkFixed *container)
-{
- return GTK_TYPE_WIDGET;
-}
-
static void
emacs_fixed_init (EmacsFixed *fixed)
{
=== modified file 'src/emacsgtkfixed.h'
--- a/src/emacsgtkfixed.h 2012-01-05 09:46:05 +0000
+++ b/src/emacsgtkfixed.h 2012-04-23 07:34:29 +0000
@@ -27,33 +27,7 @@
struct frame;
-#define EMACS_TYPE_FIXED (emacs_fixed_get_type ())
-#define EMACS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
EMACS_TYPE_FIXED, EmacsFixed))
-#define EMACS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
EMACS_TYPE_FIXED, EmacsFixedClass))
-#define EMACS_IS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
EMACS_TYPE_FIXED))
-#define EMACS_IS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
EMACS_TYPE_FIXED))
-#define EMACS_FIXED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
EMACS_TYPE_FIXED, EmacsFixedClass))
-
-typedef struct _EmacsFixed EmacsFixed;
-typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
-typedef struct _EmacsFixedClass EmacsFixedClass;
-
-struct _EmacsFixed
-{
- GtkFixed container;
-
- /*< private >*/
- EmacsFixedPrivate *priv;
-};
-
-
-struct _EmacsFixedClass
-{
- GtkFixedClass parent_class;
-};
-
extern GtkWidget *emacs_fixed_new (struct frame *f);
-extern GType emacs_fixed_get_type (void);
G_END_DECLS
=== modified file 'src/gtkutil.c'
--- a/src/gtkutil.c 2012-03-08 18:49:13 +0000
+++ b/src/gtkutil.c 2012-04-23 07:34:29 +0000
@@ -1090,7 +1090,9 @@
GtkWidget *wtop;
GtkWidget *wvbox, *whbox;
GtkWidget *wfixed;
+#ifndef HAVE_GTK3
GtkRcStyle *style;
+#endif
char *title = 0;
BLOCK_INPUT;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108003: Fix minor GTK3 problems found by static checking.,
Paul Eggert <=