mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Add source files and man page.
* Add bugtracker to manpage. * Print msg to stderr, when error dialog not available.
This commit is contained in:
parent
10322b45a5
commit
15bee1f543
5 changed files with 11 additions and 2 deletions
|
@ -318,6 +318,8 @@ Rofi supports the following keybindings:
|
||||||
|
|
||||||
**rofi** website can be found at [here](https://davedavenport.github.io/rofi/)
|
**rofi** website can be found at [here](https://davedavenport.github.io/rofi/)
|
||||||
|
|
||||||
|
**rofi** bugtracker can be found [here](https://github.com/DaveDavenport/rofi/issues)
|
||||||
|
|
||||||
## AUTHOR
|
## AUTHOR
|
||||||
|
|
||||||
Qball Cow <qball@gmpclient.org>
|
Qball Cow <qball@gmpclient.org>
|
||||||
|
|
|
@ -422,6 +422,10 @@ Rofi supports the following keybindings:
|
||||||
\fBrofi\fP website can be found at here
|
\fBrofi\fP website can be found at here
|
||||||
.UR https://davedavenport.github.io/rofi/
|
.UR https://davedavenport.github.io/rofi/
|
||||||
.UE
|
.UE
|
||||||
|
.PP
|
||||||
|
\fBrofi\fP bugtracker can be found here
|
||||||
|
.UR https://github.com/DaveDavenport/rofi/issues
|
||||||
|
.UE
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
.PP
|
.PP
|
||||||
Qball Cow
|
Qball Cow
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <stdio.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <rofi.h>
|
#include <rofi.h>
|
||||||
#include <helper.h>
|
#include <helper.h>
|
||||||
|
@ -64,6 +65,8 @@ int helper_parse_setup ( char * string, char ***output, int *length, ... )
|
||||||
error->message );
|
error->message );
|
||||||
#ifdef error_dialog
|
#ifdef error_dialog
|
||||||
error_dialog ( msg );
|
error_dialog ( msg );
|
||||||
|
#else
|
||||||
|
fputs ( msg, stderr );
|
||||||
#endif
|
#endif
|
||||||
g_free ( msg );
|
g_free ( msg );
|
||||||
// print error.
|
// print error.
|
||||||
|
|
|
@ -1553,7 +1553,7 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
|
||||||
if ( state.selected_line != NULL ) {
|
if ( state.selected_line != NULL ) {
|
||||||
// The cast to unsigned in here is valid, we checked if selected_line > 0.
|
// The cast to unsigned in here is valid, we checked if selected_line > 0.
|
||||||
// So its maximum range is 0-2³¹, well within the num_lines range.
|
// So its maximum range is 0-2³¹, well within the num_lines range.
|
||||||
if ( *( state.selected_line ) >= 0 && (unsigned int) ( *( state.selected_line ) ) <= state.num_lines ) {
|
if ( (*( state.selected_line )) >= 0 && (unsigned int) ( *( state.selected_line ) ) <= state.num_lines ) {
|
||||||
state.selected = *( state.selected_line );
|
state.selected = *( state.selected_line );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,6 @@ pid_t execute_generator ( char * cmd )
|
||||||
|
|
||||||
static char **get_script_output ( char *command, unsigned int *length )
|
static char **get_script_output ( char *command, unsigned int *length )
|
||||||
{
|
{
|
||||||
char buffer[1024];
|
|
||||||
char **retv = NULL;
|
char **retv = NULL;
|
||||||
|
|
||||||
*length = 0;
|
*length = 0;
|
||||||
|
@ -81,6 +80,7 @@ static char **get_script_output ( char *command, unsigned int *length )
|
||||||
if ( fd >= 0 ) {
|
if ( fd >= 0 ) {
|
||||||
FILE *inp = fdopen ( fd, "r" );
|
FILE *inp = fdopen ( fd, "r" );
|
||||||
if ( inp ) {
|
if ( inp ) {
|
||||||
|
char buffer[1024];
|
||||||
while ( fgets ( buffer, 1024, inp ) != NULL ) {
|
while ( fgets ( buffer, 1024, inp ) != NULL ) {
|
||||||
retv = g_realloc ( retv, ( ( *length ) + 2 ) * sizeof ( char* ) );
|
retv = g_realloc ( retv, ( ( *length ) + 2 ) * sizeof ( char* ) );
|
||||||
retv[( *length )] = g_strdup ( buffer );
|
retv[( *length )] = g_strdup ( buffer );
|
||||||
|
|
Loading…
Reference in a new issue