buttonmaker: Remove Anjuta and backup files from git.
This commit is contained in:
parent
049da591a0
commit
3281a28c2f
|
@ -1,3 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<anjuta>
|
|
||||||
</anjuta>
|
|
|
@ -1,28 +0,0 @@
|
||||||
|
|
||||||
[Anjuta]
|
|
||||||
Geometry=1374x802+0+0
|
|
||||||
|
|
||||||
[File Loader]
|
|
||||||
Files=file:///home/hellupline/Desktop/ButtonMaker/src/main.c#133
|
|
||||||
|
|
||||||
[Document Manager]
|
|
||||||
bookmarks=<?xml version="1.0" encoding="UTF-8"?>\n<bookmarks/>\n
|
|
||||||
|
|
||||||
[Execution]
|
|
||||||
Run in terminal=2
|
|
||||||
Working directories=file:///home/hellupline/Desktop/ButtonMaker
|
|
||||||
|
|
||||||
[Project Manager]
|
|
||||||
Shortcut=ButtonMaker//ButtonMaker//src//buttonmaker
|
|
||||||
Expand=ButtonMaker%%%ButtonMaker//ButtonMaker%%%ButtonMaker//ButtonMaker//src%%%ButtonMaker//ButtonMaker//src//buttonmaker%%%ButtonMaker//BUTTONMAKER
|
|
||||||
|
|
||||||
[Build]
|
|
||||||
Configuration list=1:Default:%%%1:Debug:Debug%%%1:Profiling:Profiling%%%1:Optimized:Optimized
|
|
||||||
Selected Configuration=Debug
|
|
||||||
BuildArgs/Default=--enable-maintainer-mode
|
|
||||||
BuildArgs/Debug=--enable-maintainer-mode 'CFLAGS=-g -O0' 'CXXFLAGS=-g -O0' 'JFLAGS=-g -O0' 'FFLAGS=-g -O0'
|
|
||||||
BuildArgs/Profiling=--enable-maintainer-mode 'CFLAGS=-g -pg' 'CXXFLAGS=-g -pg' 'JFLAGS=-g -pg' 'FFLAGS=-g -pg'
|
|
||||||
BuildArgs/Optimized=--enable-maintainer-mode 'CFLAGS=-O2' 'CXXFLAGS=-O2' 'JFLAGS=-O2' 'FFLAGS=-O2'
|
|
||||||
|
|
||||||
[Debugger]
|
|
||||||
Stop at beginning=2
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<dock-layout>
|
|
||||||
|
|
||||||
<layout name="__default__"><dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0"><paned orientation="vertical" locked="no" position="525"><paned orientation="horizontal" locked="no" position="224"><notebook orientation="vertical" locked="no" page="1"><item name="AnjutaFileManager" orientation="vertical" locked="no"/><item name="AnjutaProjectManager" orientation="vertical" locked="no"/><item name="AnjutaSymbolDB" orientation="vertical" locked="no"/></notebook><item name="AnjutaDocumentManager" orientation="vertical" locked="no"/></paned><notebook orientation="vertical" locked="no" page="0"><item name="AnjutaDebuggerWatch" orientation="vertical" locked="no"/><item name="AnjutaDebuggerBreakpoints" orientation="vertical" locked="no"/></notebook></paned></dock></layout></dock-layout>
|
|
Binary file not shown.
|
@ -1,51 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<anjuta>
|
|
||||||
<plugin name="GBF Project Manager"
|
|
||||||
url="http://anjuta.org/plugins/"
|
|
||||||
mandatory="yes">
|
|
||||||
<require group="Anjuta Plugin"
|
|
||||||
attribute="Interfaces"
|
|
||||||
value="IAnjutaProjectManager"/>
|
|
||||||
</plugin>
|
|
||||||
<plugin name="AutoTools Project Backend"
|
|
||||||
url="http://anjuta.org/plugins/"
|
|
||||||
mandatory="yes">
|
|
||||||
<require group="Anjuta Plugin"
|
|
||||||
attribute="Interfaces"
|
|
||||||
value="IAnjutaProjectBackend"/>
|
|
||||||
<require group="Project"
|
|
||||||
attribute="Supported-Project-Types"
|
|
||||||
value="automake"/>
|
|
||||||
</plugin>
|
|
||||||
<plugin name="Symbol Browser"
|
|
||||||
url="http://anjuta.org/plugins/"
|
|
||||||
mandatory="yes">
|
|
||||||
<require group="Anjuta Plugin"
|
|
||||||
attribute="Interfaces"
|
|
||||||
value="IAnjutaSymbolManager"/>
|
|
||||||
</plugin>
|
|
||||||
<plugin name="Make Build System"
|
|
||||||
url="http://anjuta.org/plugins/"
|
|
||||||
mandatory="yes">
|
|
||||||
<require group="Anjuta Plugin"
|
|
||||||
attribute="Interfaces"
|
|
||||||
value="IAnjutaBuildable"/>
|
|
||||||
<require group="Build"
|
|
||||||
attribute="Supported-Build-Types"
|
|
||||||
value="make"/>
|
|
||||||
</plugin>
|
|
||||||
<plugin name="Task Manager"
|
|
||||||
url="http://anjuta.org/plugins/"
|
|
||||||
mandatory="no">
|
|
||||||
<require group="Anjuta Plugin"
|
|
||||||
attribute="Interfaces"
|
|
||||||
value="IAnjutaTodo"/>
|
|
||||||
</plugin>
|
|
||||||
<plugin name="Debug Manager"
|
|
||||||
url="http://anjuta.org/plugins/"
|
|
||||||
mandatory="no">
|
|
||||||
<require group="Anjuta Plugin"
|
|
||||||
attribute="Interfaces"
|
|
||||||
value="IAnjutaDebugManager"/>
|
|
||||||
</plugin>
|
|
||||||
</anjuta>
|
|
|
@ -1,159 +0,0 @@
|
||||||
/*
|
|
||||||
* main.c
|
|
||||||
* Copyright (C) Renan Vedovato Traba 2012 <rvt10@inf.ufpr.br>
|
|
||||||
*
|
|
||||||
ButtonMaker is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ButtonMaker is distributed in the hope that it will be useful, but
|
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
|
||||||
with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/timeb.h>
|
|
||||||
#include <X11/X.h>
|
|
||||||
#include <X11/xpm.h>
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <Imlib2.h>
|
|
||||||
|
|
||||||
#include "wmgeneral.h"
|
|
||||||
#include "pixmaps.h"
|
|
||||||
|
|
||||||
char *cmd, *fname;
|
|
||||||
int isize=50;
|
|
||||||
|
|
||||||
/* Prototypes */
|
|
||||||
static void print_usage(char *);
|
|
||||||
static void ParseCMDLine(int argc, char *argv[]);
|
|
||||||
|
|
||||||
static void print_usage(char * pname)
|
|
||||||
{
|
|
||||||
printf("%s version: %s\n", pname, VERSION);
|
|
||||||
printf("By Renan Vedovato Traba <rvt10@inf.ufpr.br>\n\n");
|
|
||||||
printf("\t-c, --command [CMD]\t which command will be called \n");
|
|
||||||
printf("\t-i, --icon [ICON]\t icon displayed\n");
|
|
||||||
printf("\t-s, --size [SIZE]\t size of the icon\n");
|
|
||||||
printf("\tdouble click to run CMD\n");
|
|
||||||
printf("\tright click to exit\n");
|
|
||||||
printf("\neg:\n%s -c sudo apt-get update -i TerminalGNUstep.tiff -s 32\n", pname);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ParseCMDLine(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
int i, j, k, size=2;
|
|
||||||
for (i=1; i < argc; i++) {
|
|
||||||
if (!strcmp(argv[i], "-display")) {
|
|
||||||
i++;
|
|
||||||
} else if ( ((!strcmp(argv[i], "--icon")) || (!strcmp(argv[i], "-i"))) && (i+1 < argc) ) {
|
|
||||||
fname = argv[++i];
|
|
||||||
} else if ( ((!strcmp(argv[i], "--size")) || (!strcmp(argv[i], "-s"))) && (i+1 < argc) ) {
|
|
||||||
isize = atoi(argv[++i]);
|
|
||||||
} else if ( ((!strcmp(argv[i], "--command")) || (!strcmp(argv[i], "-c"))) && (i+1 < argc) ) {
|
|
||||||
for (j=i+1; j < argc; j++) {
|
|
||||||
if (argv[j][0] == '-') {
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
size+=1+strlen(argv[j]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cmd = (char *) malloc((size)*sizeof(char));
|
|
||||||
for (k=i+1; k < j; k++) {
|
|
||||||
strcat(cmd, argv[k]);
|
|
||||||
strcat(cmd, " ");
|
|
||||||
}
|
|
||||||
strcat(cmd, "&");
|
|
||||||
i = j-1;
|
|
||||||
} else {
|
|
||||||
print_usage(argv[0]);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((argc < 3) || (!cmd)) {
|
|
||||||
print_usage(argv[0]);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
int b;
|
|
||||||
|
|
||||||
extern int d_depth;
|
|
||||||
extern Window iconwin, win;
|
|
||||||
Visual *visual;
|
|
||||||
XEvent event;
|
|
||||||
Pixmap xpm;
|
|
||||||
Time lastTime=0;
|
|
||||||
|
|
||||||
Imlib_Image image;
|
|
||||||
|
|
||||||
ParseCMDLine(argc, argv);
|
|
||||||
openXwindow(argc, argv, xpm_master, xpm_mask_bits, xpm_mask_width, xpm_mask_height);
|
|
||||||
|
|
||||||
xpm = XCreatePixmap(display, win, 64, 64, d_depth);
|
|
||||||
XFillRectangle(display, xpm, NormalGC, 0, 0, 64, 64);
|
|
||||||
|
|
||||||
if (fname) {
|
|
||||||
visual = DefaultVisual(display, DefaultScreen(display));
|
|
||||||
|
|
||||||
imlib_context_set_dither(1);
|
|
||||||
imlib_context_set_display(display);
|
|
||||||
imlib_context_set_visual(visual);
|
|
||||||
|
|
||||||
image = imlib_load_image(fname);
|
|
||||||
imlib_context_set_image(image);
|
|
||||||
imlib_context_set_drawable(xpm);
|
|
||||||
imlib_render_image_on_drawable_at_size(0, 0, isize, isize);
|
|
||||||
}
|
|
||||||
b = (64-isize)/2;
|
|
||||||
/* Loop Forever */
|
|
||||||
while (1) {
|
|
||||||
/* Process any pending X events. */
|
|
||||||
while (XPending(display)) {
|
|
||||||
XNextEvent(display, &event);
|
|
||||||
switch (event.type) {
|
|
||||||
case Expose:
|
|
||||||
RedrawWindow();
|
|
||||||
XCopyArea(display, xpm, iconwin, NormalGC, 0, 0, isize, isize, b, b);
|
|
||||||
break;
|
|
||||||
case MotionNotify:
|
|
||||||
//~ printf("mouse at: %dx%d\n", event.xbutton.x, event.xbutton.y);
|
|
||||||
break;
|
|
||||||
case ButtonPress:
|
|
||||||
/*printf("ButtonPress\n");*/
|
|
||||||
break;
|
|
||||||
case ButtonRelease:
|
|
||||||
if (event.xbutton.button == Button1) {
|
|
||||||
if (event.xbutton.time - lastTime < 250) {
|
|
||||||
if (system(cmd) == -1) {
|
|
||||||
fprintf(stdout, "Failed to run command:%s\n", cmd);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
lastTime = event.xbutton.time;
|
|
||||||
}
|
|
||||||
} else if (event.xbutton.button == Button3) {
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
/*printf("ButtonRelease\n");*/
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
usleep(10000);
|
|
||||||
}
|
|
||||||
/* we should never get here */
|
|
||||||
return (0);
|
|
||||||
}
|
|
Loading…
Reference in a new issue