Compare commits

...

5 Commits

Author SHA1 Message Date
o9000
4e22e0f4e7 Release 0.13.2 2017-03-19 11:56:48 +01:00
o9000
d6a40c7523 Fix compilation under Linux 2017-03-19 11:41:51 +01:00
o9000
4ee2f4e7de Fix compilation under FreeBSD 2017-03-18 23:06:52 +01:00
o9000
1567e56a09 Update README.md 2017-03-12 17:25:28 +00:00
o9000
639ccbf16c Allow long lines in tint2conf 2017-03-12 17:41:26 +01:00
12 changed files with 50 additions and 41 deletions

View File

@@ -82,7 +82,13 @@ if( NOT IMLIB_BUILD_WITH_X )
message( FATAL_ERROR "Imlib is not built with X support" )
endif( NOT IMLIB_BUILD_WITH_X )
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_definitions( -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE -D_DEFAULT_SOURCE )
else(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_definitions( -D_WITH_GETLINE )
endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
include_directories( ${PROJECT_BINARY_DIR}
src
@@ -243,7 +249,7 @@ endif( RT_LIBRARY )
target_link_libraries( tint2 m )
add_dependencies( tint2 version )
set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -Wpointer-arith -fno-strict-aliasing -pthread -std=c99 ${ASAN_C_FLAGS}" )
set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -Wpointer-arith -fno-strict-aliasing -pthread -std=c11 ${ASAN_C_FLAGS}" )
set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread -fno-strict-aliasing ${ASAN_L_FLAGS} ${BACKTRACE_L_FLAGS}" )
install( TARGETS tint2 DESTINATION bin )

View File

@@ -1,3 +1,7 @@
2017-03-19 0.13.2
- Fixes:
- Fixed compilation under FreeBSD
2017-03-12 0.13.1
- Fixes:
- Fixed compilation with new glibc (issue #625)

View File

@@ -1,5 +1,5 @@
# Latest stable release: 0.13.1
Changes: https://gitlab.com/o9000/tint2/blob/0.13.1/ChangeLog
# Latest stable release: 0.13.2
Changes: https://gitlab.com/o9000/tint2/blob/0.13.2/ChangeLog
Documentation: [doc/tint2.md](doc/tint2.md)
@@ -8,7 +8,7 @@ Compile it with (after you install the [dependencies](https://gitlab.com/o9000/t
```
git clone https://gitlab.com/o9000/tint2.git
cd tint2
git checkout 0.13.1
git checkout 0.13.2
mkdir build
cd build
cmake ..
@@ -87,7 +87,7 @@ tint2 is a simple panel/taskbar made for modern X window managers. It was specif
## Demos
* 0.13.1: [Compact panel, separator, color gradients](https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.1.0.gif)
* 0.12.4: [Executor](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif)
* 0.12.3: [Mouse over effects](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif)
* 0.12: [Distribute size between taskbars, freespace](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif)
* [Compact panel, separator, color gradients](https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.0.gif)
* [Executor](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif)
* [Mouse over effects](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif)
* [Distribute size between taskbars, freespace](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif)

View File

@@ -199,9 +199,9 @@ pre {
</style>
</head>
<body>
<h1 id="latest-stable-release-0-13-1"><span class="md2man-title">Latest</span> <span class="md2man-section">stable</span> <span class="md2man-date">release:</span> <span class="md2man-source">0.13.1</span><a name="latest-stable-release-0-13-1" href="#latest-stable-release-0-13-1" class="md2man-permalink" title="permalink"></a></h1><p>Changes: <a href="https://gitlab.com/o9000/tint2/blob/0.13.1/ChangeLog">https://gitlab.com/o9000/tint2/blob/0.13.1/ChangeLog</a></p><p>Documentation: <a href="manual.html">manual.html</a></p><p>Compile it with (after you install the <a href="https://gitlab.com/o9000/tint2/wikis/Install#dependencies">dependencies</a>):</p><pre class="highlight plaintext"><code>git clone https://gitlab.com/o9000/tint2.git
<h1 id="latest-stable-release-0-13-2"><span class="md2man-title">Latest</span> <span class="md2man-section">stable</span> <span class="md2man-date">release:</span> <span class="md2man-source">0.13.2</span><a name="latest-stable-release-0-13-2" href="#latest-stable-release-0-13-2" class="md2man-permalink" title="permalink"></a></h1><p>Changes: <a href="https://gitlab.com/o9000/tint2/blob/0.13.2/ChangeLog">https://gitlab.com/o9000/tint2/blob/0.13.2/ChangeLog</a></p><p>Documentation: <a href="manual.html">manual.html</a></p><p>Compile it with (after you install the <a href="https://gitlab.com/o9000/tint2/wikis/Install#dependencies">dependencies</a>):</p><pre class="highlight plaintext"><code>git clone https://gitlab.com/o9000/tint2.git
cd tint2
git checkout 0.13.1
git checkout 0.13.2
mkdir build
cd build
cmake ..
@@ -256,10 +256,10 @@ make -j4
</ul>
<h1 id="screenshots">Screenshots<a name="screenshots" href="#screenshots" class="md2man-permalink" title="permalink"></a></h1><h2 id="default-config">Default config:<a name="default-config" href="#default-config" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/uploads/948fa74eca60864352a033580350b4c3/Screenshot_2016-01-23_14-42-57.png" alt="Screenshot_2016-01-23_14-42-57"></p><h2 id="various-configs">Various configs:<a name="various-configs" href="#various-configs" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/wikis/screenshot.png" alt="screenshot"></p><h2 id="demos">Demos<a name="demos" href="#demos" class="md2man-permalink" title="permalink"></a></h2>
<ul>
<li>0.13.1: <a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.1.0.gif">Compact panel, separator, color gradients</a></li>
<li>0.12.4: <a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif">Executor</a></li>
<li>0.12.3: <a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif">Mouse over effects</a></li>
<li>0.12: <a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif">Distribute size between taskbars, freespace</a></li>
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.0.gif">Compact panel, separator, color gradients</a></li>
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif">Executor</a></li>
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif">Mouse over effects</a></li>
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif">Distribute size between taskbars, freespace</a></li>
</ul>
</body>
</html>

View File

@@ -1,4 +1,4 @@
.TH TINT2 1 "2017\-03\-12"
.TH TINT2 1 "2017\-03\-12" 0.13.2
.SH NAME
.PP
tint2 \- lightweight panel/taskbar

View File

@@ -1,4 +1,4 @@
# TINT2 1 "2017-03-12"
# TINT2 1 "2017-03-12" 0.13.2
## NAME
tint2 - lightweight panel/taskbar

View File

@@ -1178,20 +1178,21 @@ void add_entry(char *key, char *value)
gboolean config_read_file(const char *path)
{
FILE *fp;
char line[512];
char *key, *value;
if ((fp = fopen(path, "r")) == NULL)
FILE *fp = fopen(path, "r");
if (!fp)
return FALSE;
while (fgets(line, sizeof(line), fp) != NULL) {
char* line = NULL;
size_t line_size = 0;
while (getline(&line, &line_size, fp) >= 0) {
char *key, *value;
if (parse_line(line, &key, &value)) {
add_entry(key, value);
free(key);
free(value);
}
}
free(line);
fclose(fp);
if (!read_panel_position) {

View File

@@ -643,6 +643,7 @@ void execp_timer_callback(void *arg)
close(pipe_fd[0]);
return;
} else if (child == 0) {
fprintf(stderr, "Executing: %s\n", execp->backend->command);
// We are in the child
close(pipe_fd[0]);
dup2(pipe_fd[1], 1); // 1 is stdout

View File

@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
static gint compare_strings(gconstpointer a, gconstpointer b)
{

View File

@@ -269,10 +269,6 @@ const char *signal_name(int sig)
return "SIGVTALRM: Virtual alarm clock (4.2 BSD).";
case SIGPROF:
return "SIGPROF: Profiling alarm clock (4.2 BSD).";
case SIGWINCH:
return "SIGWINCH: Window size change (4.3 BSD, Sun).";
case SIGIO:
return "SIGIO: Pollable event occurred (System V) / I/O now possible (4.2 BSD).";
// case SIGPWR: return "SIGPWR: Power failure restart (System V).";
case SIGSYS:
return "SIGSYS: Bad system call.";

View File

@@ -63,7 +63,7 @@ target_link_libraries( tint2conf ${X11_T2C_LIBRARIES}
add_definitions( -DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" )
add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\" )
add_definitions( -DGETTEXT_PACKAGE=\"tint2conf\" )
set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread -std=c99" )
set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread -std=c11" )
set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" )
add_subdirectory(po)

View File

@@ -38,13 +38,6 @@ void config_read_file(const char *path)
background_create_new();
gradient_create_new(GRADIENT_CONFIG_VERTICAL);
FILE *fp;
char line[512];
char *key, *value;
if ((fp = fopen(path, "r")) == NULL)
return;
config_has_panel_items = 0;
config_has_battery = 0;
config_battery_enabled = 0;
@@ -54,14 +47,21 @@ void config_read_file(const char *path)
no_items_systray_enabled = 0;
no_items_battery_enabled = 0;
while (fgets(line, sizeof(line), fp) != NULL) {
FILE *fp = fopen(path, "r");
if (fp) {
char* line = NULL;
size_t line_size = 0;
while (getline(&line, &line_size, fp) >= 0) {
char *key, *value;
if (parse_line(line, &key, &value)) {
add_entry(key, value);
free(key);
free(value);
}
}
free(line);
fclose(fp);
}
finalize_gradient();
finalize_bg();