Skip to content

Commit

Permalink
Use a constant for minimal window size. Set it to 32 for all dialogs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Monin committed Sep 1, 2008
1 parent bf183b8 commit c6db02f
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/collect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1181,8 +1181,8 @@ CollectWindow *collection_window_new(const gchar *path)

cw->window = window_new(GTK_WINDOW_TOPLEVEL, "collection", PIXBUF_INLINE_ICON_BOOK, NULL, NULL);

geometry.min_width = 32;
geometry.min_height = 32;
geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.min_height = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.base_width = COLLECT_DEF_WIDTH;
geometry.base_height = COLLECT_DEF_HEIGHT;
gtk_window_set_geometry_hints(GTK_WINDOW(cw->window), NULL, &geometry,
Expand Down
4 changes: 2 additions & 2 deletions src/dupe.c
Original file line number Diff line number Diff line change
Expand Up @@ -3125,8 +3125,8 @@ DupeWindow *dupe_window_new(DupeMatchType match_mask)

dw->window = window_new(GTK_WINDOW_TOPLEVEL, "dupe", NULL, NULL, _("Find duplicates"));

geometry.min_width = 32;
geometry.min_height = 32;
geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.min_height = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.base_width = DUPE_DEF_WIDTH;
geometry.base_height = DUPE_DEF_HEIGHT;
gtk_window_set_geometry_hints(GTK_WINDOW(dw->window), NULL, &geometry,
Expand Down
4 changes: 2 additions & 2 deletions src/img-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,8 @@ static ViewWindow *real_view_window_new(FileData *fd, GList *list, CollectionDat

vw->window = window_new(GTK_WINDOW_TOPLEVEL, "view", PIXBUF_INLINE_ICON_VIEW, NULL, NULL);

geometry.min_width = 8;
geometry.min_height = 8;
geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.min_height = DEFAULT_MINIMAL_WINDOW_SIZE;
gtk_window_set_geometry_hints(GTK_WINDOW(vw->window), NULL, &geometry, GDK_HINT_MIN_SIZE);

gtk_window_set_resizable(GTK_WINDOW(vw->window), TRUE);
Expand Down
4 changes: 2 additions & 2 deletions src/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,8 @@ void info_window_new(FileData *fd, GList *list, GtkWidget *parent)
}
gtk_window_set_resizable(GTK_WINDOW(id->window), TRUE);

geometry.min_width = 32;
geometry.min_height = 32;
geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.min_height = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.base_width = DEF_PROPERTY_WIDTH;
geometry.base_height = DEF_PROPERTY_HEIGHT;
gtk_window_set_geometry_hints(GTK_WINDOW(id->window), NULL, &geometry,
Expand Down
4 changes: 2 additions & 2 deletions src/layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@ static void layout_tools_setup(LayoutWindow *lw, GtkWidget *tools, GtkWidget *fi
hints = 0;
}

geometry.min_width = 32;
geometry.min_height = 32;
geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.min_height = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.base_width = TOOLWINDOW_DEF_WIDTH;
geometry.base_height = TOOLWINDOW_DEF_HEIGHT;
gtk_window_set_geometry_hints(GTK_WINDOW(lw->tools), NULL, &geometry,
Expand Down
2 changes: 2 additions & 0 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
#define DEFAULT_THUMB_WIDTH 96
#define DEFAULT_THUMB_HEIGHT 72

#define DEFAULT_MINIMAL_WINDOW_SIZE 32

#define IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT 4096
#define IMAGE_LOADER_READ_BUFFER_SIZE_MIN 512
#define IMAGE_LOADER_READ_BUFFER_SIZE_MAX 16*1024*1024
Expand Down
4 changes: 2 additions & 2 deletions src/pan-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -2377,8 +2377,8 @@ static void pan_window_new_real(FileData *dir_fd)

pw->window = window_new(GTK_WINDOW_TOPLEVEL, "panview", NULL, NULL, _("Pan View"));

geometry.min_width = 8;
geometry.min_height = 8;
geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.min_height = DEFAULT_MINIMAL_WINDOW_SIZE;
gtk_window_set_geometry_hints(GTK_WINDOW(pw->window), NULL, &geometry, GDK_HINT_MIN_SIZE);

gtk_window_set_resizable(GTK_WINDOW(pw->window), TRUE);
Expand Down
4 changes: 2 additions & 2 deletions src/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -3375,8 +3375,8 @@ void print_window_new(FileData *fd, GList *selection, GList *list, GtkWidget *pa
parent, FALSE,
print_window_cancel_cb, pw);

geometry.min_width = 32;
geometry.min_height = 32;
geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.min_height = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.base_width = PRINT_DLG_WIDTH;
geometry.base_height = PRINT_DLG_HEIGHT;
gtk_window_set_geometry_hints(GTK_WINDOW(pw->dialog->dialog), NULL, &geometry,
Expand Down
4 changes: 2 additions & 2 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -2577,8 +2577,8 @@ void search_new(FileData *dir_fd, FileData *example_file)

gtk_window_set_resizable(GTK_WINDOW(sd->window), TRUE);

geometry.min_width = 32;
geometry.min_height = 32;
geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.min_height = DEFAULT_MINIMAL_WINDOW_SIZE;
geometry.base_width = DEF_SEARCH_WIDTH;
geometry.base_height = DEF_SEARCH_HEIGHT;
gtk_window_set_geometry_hints(GTK_WINDOW(sd->window), NULL, &geometry,
Expand Down

0 comments on commit c6db02f

Please sign in to comment.