mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
Fixed couple of compilator warning and removed unused macros.
This commit is contained in:
@@ -67,9 +67,6 @@ static unsigned char Cursor_bits[] = {
|
|||||||
0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x70
|
0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x70
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Cursor shape-mask */
|
|
||||||
#define Cursor_shape_width 32
|
|
||||||
#define Cursor_shape_height 32
|
|
||||||
static unsigned char Cursor_shape_bits[] = {
|
static unsigned char Cursor_shape_bits[] = {
|
||||||
0x00, 0x7e, 0x00, 0x00, 0xc0, 0x81, 0x03, 0x00, 0x20, 0x00, 0x04, 0x00, 0x10, 0x00, 0x08,
|
0x00, 0x7e, 0x00, 0x00, 0xc0, 0x81, 0x03, 0x00, 0x20, 0x00, 0x04, 0x00, 0x10, 0x00, 0x08,
|
||||||
0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x20, 0x00, 0x02, 0x00, 0x40, 0x00, 0x02, 0x00,
|
0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x20, 0x00, 0x02, 0x00, 0x40, 0x00, 0x02, 0x00,
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ static void typefaceClick(WMWidget * w, void *data)
|
|||||||
|
|
||||||
WM_ITERATE_ARRAY(face->sizes, size, i) {
|
WM_ITERATE_ARRAY(face->sizes, size, i) {
|
||||||
if (size != NULL) {
|
if (size != NULL) {
|
||||||
int size_int = (int) size;
|
int size_int = (intptr_t) size;
|
||||||
|
|
||||||
sprintf(buffer, "%i", size_int);
|
sprintf(buffer, "%i", size_int);
|
||||||
|
|
||||||
@@ -802,7 +802,7 @@ static void setFontPanelFontName(FontPanel * panel, const char *family, const ch
|
|||||||
char buffer[32];
|
char buffer[32];
|
||||||
|
|
||||||
if (vsize != NULL) {
|
if (vsize != NULL) {
|
||||||
int size_int = (int) vsize;
|
int size_int = (intptr_t) vsize;
|
||||||
|
|
||||||
sprintf(buffer, "%i", size_int);
|
sprintf(buffer, "%i", size_int);
|
||||||
|
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ typedef struct W_SplitView {
|
|||||||
/* TODO: rewrite --Dan */
|
/* TODO: rewrite --Dan */
|
||||||
#define _GetSubviewsCount() WMGetArrayItemCount(sPtr->subviews)
|
#define _GetSubviewsCount() WMGetArrayItemCount(sPtr->subviews)
|
||||||
|
|
||||||
#define _AddPSubviewStruct(P) \
|
|
||||||
(WMAddToArray(sPtr->subviews,((void*)P)))
|
|
||||||
|
|
||||||
#define _GetPSubviewStructAt(i) \
|
#define _GetPSubviewStructAt(i) \
|
||||||
((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))
|
((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))
|
||||||
|
|
||||||
|
|||||||
@@ -180,14 +180,13 @@ static WDECallbackUpdate setCursor;
|
|||||||
#define REFRESH_WINDOW_FONT (1<<8)
|
#define REFRESH_WINDOW_FONT (1<<8)
|
||||||
#define REFRESH_ICON_TILE (1<<9)
|
#define REFRESH_ICON_TILE (1<<9)
|
||||||
#define REFRESH_ICON_FONT (1<<10)
|
#define REFRESH_ICON_FONT (1<<10)
|
||||||
#define REFRESH_WORKSPACE_BACK (1<<11)
|
|
||||||
|
|
||||||
#define REFRESH_BUTTON_IMAGES (1<<12)
|
#define REFRESH_BUTTON_IMAGES (1<<11)
|
||||||
|
|
||||||
#define REFRESH_ICON_TITLE_COLOR (1<<13)
|
#define REFRESH_ICON_TITLE_COLOR (1<<12)
|
||||||
#define REFRESH_ICON_TITLE_BACK (1<<14)
|
#define REFRESH_ICON_TITLE_BACK (1<<13)
|
||||||
|
|
||||||
#define REFRESH_WORKSPACE_MENU (1<<15)
|
#define REFRESH_WORKSPACE_MENU (1<<14)
|
||||||
|
|
||||||
#define REFRESH_FRAME_BORDER REFRESH_MENU_FONT|REFRESH_WINDOW_FONT
|
#define REFRESH_FRAME_BORDER REFRESH_MENU_FONT|REFRESH_WINDOW_FONT
|
||||||
|
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ static atomitem_t atomNames[] = {
|
|||||||
{"UTF8_STRING", &utf8_string},
|
{"UTF8_STRING", &utf8_string},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define _NET_WM_STATE_REMOVE 0
|
|
||||||
#define _NET_WM_STATE_ADD 1
|
#define _NET_WM_STATE_ADD 1
|
||||||
#define _NET_WM_STATE_TOGGLE 2
|
#define _NET_WM_STATE_TOGGLE 2
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,6 @@
|
|||||||
#include "wsmap.h"
|
#include "wsmap.h"
|
||||||
#include "dialog.h"
|
#include "dialog.h"
|
||||||
|
|
||||||
#define MC_NEW 0
|
|
||||||
#define MC_DESTROY_LAST 1
|
#define MC_DESTROY_LAST 1
|
||||||
#define MC_LAST_USED 2
|
#define MC_LAST_USED 2
|
||||||
/* index of the first workspace menu entry */
|
/* index of the first workspace menu entry */
|
||||||
|
|||||||
11
util/wmiv.c
11
util/wmiv.c
@@ -35,6 +35,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
#include <math.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef HAVE_EXIF
|
#ifdef HAVE_EXIF
|
||||||
@@ -218,7 +219,7 @@ int rescale_image(void)
|
|||||||
long final_height = img->height;
|
long final_height = img->height;
|
||||||
|
|
||||||
/* check if there is already a zoom factor applied */
|
/* check if there is already a zoom factor applied */
|
||||||
if (zoom_factor != 0) {
|
if (fabsf(zoom_factor) <= 0.0f) {
|
||||||
final_width = img->width + (int)(img->width * zoom_factor);
|
final_width = img->width + (int)(img->width * zoom_factor);
|
||||||
final_height = img->height + (int)(img->height * zoom_factor);
|
final_height = img->height + (int)(img->height * zoom_factor);
|
||||||
}
|
}
|
||||||
@@ -430,7 +431,7 @@ int zoom_in_out(int z)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
if (z) {
|
if (z) {
|
||||||
zoom_factor += 0.2;
|
zoom_factor += 0.2f;
|
||||||
img = RScaleImage(tmp, tmp->width + (int)(tmp->width * zoom_factor),
|
img = RScaleImage(tmp, tmp->width + (int)(tmp->width * zoom_factor),
|
||||||
tmp->height + (int)(tmp->height * zoom_factor));
|
tmp->height + (int)(tmp->height * zoom_factor));
|
||||||
if (!img) {
|
if (!img) {
|
||||||
@@ -438,11 +439,11 @@ int zoom_in_out(int z)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
zoom_factor -= 0.2;
|
zoom_factor -= 0.2f;
|
||||||
int new_width = tmp->width + (int) (tmp->width * zoom_factor);
|
int new_width = tmp->width + (int) (tmp->width * zoom_factor);
|
||||||
int new_height = tmp->height + (int)(tmp->height * zoom_factor);
|
int new_height = tmp->height + (int)(tmp->height * zoom_factor);
|
||||||
if ((new_width <= 0) || (new_height <= 0)) {
|
if ((new_width <= 0) || (new_height <= 0)) {
|
||||||
zoom_factor += 0.2;
|
zoom_factor += 0.2f;
|
||||||
RReleaseImage(tmp);
|
RReleaseImage(tmp);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
@@ -966,7 +967,7 @@ int main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case XK_Escape:
|
case XK_Escape:
|
||||||
if (!fullscreen_flag) {
|
if (!fullscreen_flag) {
|
||||||
zoom_factor = -0.2;
|
zoom_factor = -0.2f;
|
||||||
/* zoom_in will increase the zoom factor by 0.2 */
|
/* zoom_in will increase the zoom factor by 0.2 */
|
||||||
zoom_in();
|
zoom_in();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user