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.
This commit is contained in:
parent
0ba2624f7d
commit
1068fe4d1b
4 changed files with 39 additions and 34 deletions
|
@ -1,5 +1,20 @@
|
|||
2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
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.
|
||||
|
||||
|
|
|
@ -28,6 +28,27 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#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_width (GtkWidget *widget,
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -27,33 +27,7 @@ G_BEGIN_DECLS
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -1090,7 +1090,9 @@ xg_create_frame_widgets (FRAME_PTR f)
|
|||
GtkWidget *wtop;
|
||||
GtkWidget *wvbox, *whbox;
|
||||
GtkWidget *wfixed;
|
||||
#ifndef HAVE_GTK3
|
||||
GtkRcStyle *style;
|
||||
#endif
|
||||
char *title = 0;
|
||||
|
||||
BLOCK_INPUT;
|
||||
|
|
Loading…
Add table
Reference in a new issue