style fixes

This commit is contained in:
Daniel Micay 2015-09-18 18:53:15 -04:00
parent ba63e3c33c
commit 4b08fd998b
1 changed files with 5 additions and 6 deletions

View File

@ -237,13 +237,12 @@ void launch_browser(char *browser, char *url) {
static void set_size_hints(GtkWindow *window, VteTerminal *vte) { static void set_size_hints(GtkWindow *window, VteTerminal *vte) {
static const GdkWindowHints wh = (GdkWindowHints)(GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE | static const GdkWindowHints wh = (GdkWindowHints)(GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE |
GDK_HINT_BASE_SIZE); GDK_HINT_BASE_SIZE);
GdkGeometry hints; const int char_width = (int)vte_terminal_get_char_width(vte);
const int char_height = (int)vte_terminal_get_char_height(vte);
int padding_left, padding_top, padding_right, padding_bottom; int padding_left, padding_top, padding_right, padding_bottom;
get_vte_padding(vte, &padding_left, &padding_top, &padding_right, &padding_bottom); get_vte_padding(vte, &padding_left, &padding_top, &padding_right, &padding_bottom);
const int char_width = (int)vte_terminal_get_char_width(vte); GdkGeometry hints;
const int char_height = (int)vte_terminal_get_char_height(vte);
hints.base_width = char_width + padding_left + padding_right; hints.base_width = char_width + padding_left + padding_right;
hints.base_height = char_height + padding_top + padding_bottom; hints.base_height = char_height + padding_top + padding_bottom;
hints.min_width = hints.base_width; hints.min_width = hints.base_width;
@ -385,7 +384,7 @@ static gboolean draw_cb(const draw_cb_info *info, cairo_t *cr) {
bool active = false; bool active = false;
snprintf(buffer, sizeof(buffer), "%u", i + 1); snprintf(buffer, sizeof(buffer), "%u", i + 1);
if(len) if (len)
active = strncmp(buffer, info->panel->fulltext, len) == 0; active = strncmp(buffer, info->panel->fulltext, len) == 0;
draw_marker(cr, desc, info->hints, x, y, buffer, active); draw_marker(cr, desc, info->hints, x, y, buffer, active);
@ -1053,7 +1052,7 @@ gboolean button_press_cb(VteTerminal *vte, GdkEventButton *event, const config_i
if (event->button == 1) { if (event->button == 1) {
launch_browser(info->browser, match.get()); launch_browser(info->browser, match.get());
} else if(event->button == 3) { } else if (event->button == 3) {
GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
gtk_clipboard_set_text(clipboard, match.get(), -1); gtk_clipboard_set_text(clipboard, match.get(), -1);
} }